When using Grml as a rescue distribution for dedicated server it is
typically necessary to change the root password manually as user
expect to be able to login into the rescue system directly as root.
This patch modified the behaviour of the ssh bootoption and will set
the root password to the same value as for the grml user.
SSH_PASSWD=''
SSH_PASSWD="$(getbootparam 'ssh' 2>>$DEBUG)"
config_userlocal
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
[ -z "$localuser" ] && eend 1
eindent
if [ -z "$SSH_PASSWD" ] ; then
# finally check if we have a password we can use:
if [ -n "$SSH_PASSWD" ] ; then
# chpasswd sucks, seriously.
# finally check if we have a password we can use:
if [ -n "$SSH_PASSWD" ] ; then
# chpasswd sucks, seriously.
if chpasswd --help 2>&1 | grep -q -- '-m,' ; then
if chpasswd --help 2>&1 | grep -q -- '-m,' ; then
- echo "$localuser:$SSH_PASSWD" | chpasswd -m
- else
- echo "$localuser:$SSH_PASSWD" | chpasswd
+ 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"
fi
einfo "Starting secure shell server in background for user $localuser"