From: Christian Heller Date: Tue, 19 Oct 2021 20:14:47 +0000 (+0200) Subject: Explicitely set Bash as shell on plom creation, instead of by default template. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/todos?a=commitdiff_plain;h=68d58adc75e40479d56e5ca09d5b48beaafab9e1;p=config Explicitely set Bash as shell on plom creation, instead of by default template. --- diff --git a/bullseye/etc_files/server/etc/default/useradd b/bullseye/etc_files/server/etc/default/useradd deleted file mode 100644 index bc711fe..0000000 --- a/bullseye/etc_files/server/etc/default/useradd +++ /dev/null @@ -1,37 +0,0 @@ -# Default values for useradd(8) -# -# The SHELL variable specifies the default login shell on your -# system. -# Similar to DSHELL in adduser. However, we use "sh" here because -# useradd is a low level utility and should be as general -# as possible -SHELL=/bin/bash -# -# The default group for users -# 100=users on Debian systems -# Same as USERS_GID in adduser -# This argument is used when the -n flag is specified. -# The default behavior (when -n and -g are not specified) is to create a -# primary user group with the same name as the user being added to the -# system. -# GROUP=100 -# -# The default home directory. Same as DHOME for adduser -# HOME=/home -# -# The number of days after a password expires until the account -# is permanently disabled -# INACTIVE=-1 -# -# The default expire date -# EXPIRE= -# -# The SKEL variable specifies the directory containing "skeletal" user -# files; in other words, files such as a sample .profile that will be -# copied to the new user's home directory when it is created. -# SKEL=/etc/skel -# -# Defines whether the mail spool should be created while -# creating the account -# CREATE_MAIL_SPOOL=yes - diff --git a/bullseye/setup_scripts/init_user_and_keybased_login.sh b/bullseye/setup_scripts/init_user_and_keybased_login.sh index f237a84..5c238b9 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 && '\ + 'useradd -m plom -s /bin/bash && '\ '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 21a8062..35075d0 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' +ssh root@"${server}" 'useradd -m plom -s /bin/bash' 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/'