X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FDEBIAN%2F10-rootpw;h=7a7f6177a30e398311f8b1659f61114487947767;hp=c1ee0b18f725043592835d9091eef6e53b60c7e5;hb=bc3037fe2075e33b0035fc0689f44a60381638f9;hpb=2773c14668a490a1254a63541e1ef9fd3377104b diff --git a/fai/config/scripts/DEBIAN/10-rootpw b/fai/config/scripts/DEBIAN/10-rootpw index c1ee0b1..7a7f617 100755 --- a/fai/config/scripts/DEBIAN/10-rootpw +++ b/fai/config/scripts/DEBIAN/10-rootpw @@ -3,6 +3,10 @@ error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code # set root password -$ROOTCMD usermod -p "$ROOTPW" root +if [ -n "$ROOTPW" ]; then + $ROOTCMD usermod -p "$ROOTPW" root +else + $ROOTCMD usermod -L root +fi exit $error