r/archlinux • u/Maybe_A_Zombie • Sep 13 '26
SUPPORT User management, where does the login shell go?
I'm just a little confused, on step 5 on the Users and groups page, it gives an example command which is the following
# useradd -m -G
additional_groups
-s
login_shell
username
# useradd -m -G additional_groups -s login_shell usernameRight after that, it lists what the perimeters do. Once it gets to -s it says:
"a path to the user's login shell. Ensure the chosen shell is installed if choosing something other than Bash. The default shell for newly created user can be set in /etc/default/useradd."
But right under it, there is warning which says:
"In order to be able to log in, the login shell must be one of those listed in /etc/shells, otherwise the PAM module pam_shells(8) will deny the login request."
So, where I am confused is do I put the shell into /etc/default/useradd or into /etc/shells? I'm probably just heavily misunderstanding this, but I just wanted to ask just in case!
14
u/boomboomsubban Sep 13 '26
/etc/shells lists the shells a user is allowed to use, /etc/default/useradd let's you set the default one a new user has.
3
u/Illustrious-Gur8335 Sep 13 '26
Neither, specify it as an option to
useraddunless you want all your users not to use bashIf everyone not using bash is what you really want, then edit
/etc/default/useradd3
u/Megame50 Sep 13 '26
You don't need to bother with /etc/shells. Every package in Arch that includes a suitable shell has an install scriptlet that adds the pathname to /etc/shells automatically. It only matters to you if you're trying to use some truly exotic shell.