X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=autoconfig.functions;h=70bb1257e507e1bc8962c33fab9f6b27bdc8937b;hb=refs%2Ftags%2Fv0.9.50;hp=b890f4ca21259bbc4ad0d0df3d1e828779a7fd2a;hpb=8a3d2ff3a55bf5fe28e1bce5c2fcc79d0a54a2b2;p=grml-autoconfig.git diff --git a/autoconfig.functions b/autoconfig.functions index b890f4c..70bb125 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -1053,7 +1053,7 @@ if checkbootparam 'ssh' ; then SSH_PASSWD='' SSH_PASSWD="$(getbootparam 'ssh' 2>>$DEBUG)" config_userlocal - einfo "Bootoption ssh found, trying to set password for user $localuser" + einfo "Bootoption ssh found, trying to set password for root and user $localuser" [ -z "$localuser" ] && eend 1 eindent if [ -z "$SSH_PASSWD" ] ; then @@ -1082,20 +1082,21 @@ if checkbootparam 'ssh' ; then # finally check if we have a password we can use: if [ -n "$SSH_PASSWD" ] ; then # chpasswd sucks, seriously. + chpass_options="" if chpasswd --help 2>&1 | grep -q -- '-m,' ; then - echo "$localuser:$SSH_PASSWD" | chpasswd -m - else - echo "$localuser:$SSH_PASSWD" | chpasswd + chpass_options="-m" fi + echo "$localuser:$SSH_PASSWD" | chpasswd $chpass_options + echo "root:$SSH_PASSWD" | chpasswd $chpass_options fi - einfo "Starting secure shell server in background for user $localuser" + einfo "Starting secure shell server in background for root and user $localuser" /etc/init.d/rmnologin start >>$DEBUG 2>>$DEBUG /etc/init.d/ssh start >>$DEBUG 2>>$DEBUG & eend $? eindent - ewarn "Warning: please change the password for user $localuser as soon as possible!" + ewarn "Warning: please change the password for root and user $localuser as soon as possible!" eoutdent fi } @@ -1475,7 +1476,7 @@ if checkbootparam 'startx' && ! echo "$CMDLINE" | grep -q 'startx.*nostartx' ; t config_userlocal cat>|/etc/init.d/xstartup<