I've set /etc/nologin to contain a custom message, so when users with the /usr/sbin/nologin shell defined in passwd will try to log in, this custom message will appear on their terminal before throwing them out.
Problem is - this error appears for ALL users, even for root (with /bin/bash defined...)
from the nologin man page:
NAME nologin - prevent unprivileged users from logging into the system
DESCRIPTION If the file /etc/nologin exists and is readable, login(1) will allow access only to root. Other users will be shown the contents of this file and their logins will be refused.
FILES /etc/nologin
Ideas?
Linux mybox02 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
/etc/passwd
look like?/etc/ssh/sshd_config
?nologin
the shell you should put your message into/etc/nologin.txt
instead,/etc/nologin
will override the shell for non root users--though perhaps for root users via ssh as well. . . I'm not sure about that part