In some cases (like Oracle Cloud) the root account is disabled

This commit is contained in:
Timothy Redaelli 2021-08-04 19:18:07 +02:00
parent d99769e0b0
commit 2c894d01a9

View file

@ -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