X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FDEBIAN%2F10-rootpw;h=539f2eb6c3badfe173022b0f7fc0e05959bdfebd;hp=7a7f6177a30e398311f8b1659f61114487947767;hb=591c84435e22df12f2b5121c08578bff7c6bb047;hpb=92bc3e8554ea8442307a69e59619248dda974926 diff --git a/fai/config/scripts/DEBIAN/10-rootpw b/fai/config/scripts/DEBIAN/10-rootpw index 7a7f617..539f2eb 100755 --- a/fai/config/scripts/DEBIAN/10-rootpw +++ b/fai/config/scripts/DEBIAN/10-rootpw @@ -4,8 +4,8 @@ error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code # set root password if [ -n "$ROOTPW" ]; then - $ROOTCMD usermod -p "$ROOTPW" root -else + $ROOTCMD chpasswd --encrypted <<< "root:${ROOTPW}" +elif [ -n "$username" ]; then $ROOTCMD usermod -L root fi