, 1 min read

Linux pam and /etc/shells

Original post is here eklausmeier.goip.de/blog/2015/10-05-linux-pam-and-etcshells.


I learned the hard way that a user in /etc/passwd not having a shell specified in /etc/shells is not able to log-on.

On Ubuntu /etc/shells looks like this:

/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/tmux
/usr/bin/screen

On Arch it looks like this:

/bin/sh
/bin/bash

So if you provide a user with shell /usr/bin/bash, he cannot log-in, thanks to pam_shells.so.

See man shells, man pam_shells, and authentication error with shell=/usr/bin/bash.

Also see Creating User Account With Empty Password on Linux.