From: Christian Heller Date: Thu, 21 Oct 2021 21:38:29 +0000 (+0200) Subject: Do not set shell in init_user scripts as its absence alerts to not having run setup_s... X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/test?a=commitdiff_plain;h=bd4708e9b51d1ee9fe130791bcbd53688730b0b9;p=config Do not set shell in init_user scripts as its absence alerts to not having run setup_server.sh. --- diff --git a/bullseye/setup_scripts/init_user_and_keybased_login.sh b/bullseye/setup_scripts/init_user_and_keybased_login.sh index 5c238b9..f237a84 100755 --- a/bullseye/setup_scripts/init_user_and_keybased_login.sh +++ b/bullseye/setup_scripts/init_user_and_keybased_login.sh @@ -46,7 +46,7 @@ export SSHPASS="${PW_ROOT}" # would require setting a password for user plom otherwise not needed. sshpass -e scp ~/.ssh/id_rsa.pub root@"${server}":/tmp/authorized_keys sshpass -e ssh root@"${server}" \ - 'useradd -m plom -s /bin/bash && '\ + 'useradd -m plom && '\ 'mkdir /home/plom/.ssh && '\ 'chown plom:plom /home/plom/.ssh && '\ 'chown plom:plom /tmp/authorized_keys && '\ diff --git a/bullseye/setup_scripts/init_user_login.sh b/bullseye/setup_scripts/init_user_login.sh index 35075d0..21a8062 100755 --- a/bullseye/setup_scripts/init_user_login.sh +++ b/bullseye/setup_scripts/init_user_login.sh @@ -31,7 +31,7 @@ echo 'Asking for new root password.' ssh root@"${server}" "passwd" # Set up plom's ~/.ssh/authorized_keys from root's. -ssh root@"${server}" 'useradd -m plom -s /bin/bash' +ssh root@"${server}" 'useradd -m plom' ssh root@"${server}" 'mkdir /home/plom/.ssh' ssh root@"${server}" 'chown plom:plom /home/plom/.ssh' ssh root@"${server}" 'cp /root/.ssh/authorized_keys /home/plom/.ssh/'