From 2c894d01a97555070b152a425b1390b4ba9a38d2 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Wed, 4 Aug 2021 19:18:07 +0200 Subject: [PATCH] In some cases (like Oracle Cloud) the root account is disabled --- vps2arch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vps2arch b/vps2arch index ef772f4..2dba63d 100755 --- a/vps2arch +++ b/vps2arch @@ -137,7 +137,7 @@ install_packages() { restore_root_pass() { # If the root password is not set, use vps2arch - if egrep -q '^root:.?:' "/root.$cpu_type/root.passwd"; then + if egrep -q '^root:[^$]' "/root.$cpu_type/root.passwd"; then echo "root:vps2arch" | chpasswd else sed -i '/^root:/d' /etc/shadow