I want to add the PATH of the default for the user where a shell is set in /etc/passwd by /sbin/nologin.
I write PATH in /etc/csh.login or /etc/profile,csh in case of bash or csh is OK.
What about
/sbin/nologin?
Linux – /sbin/nologin default PATH
linuxlogin
Best Answer
If you set the shell for an account to
/sbin/nologin
(on my system it's/usr/sbin/nologin
) then if someone tries to login under that account, they will get a message that says the account is unavailable. There is no PATH or /etc/csh.login or /etc/profile for that situation.This is separate from the
/etc/nologin
file. If that file exists, no user other than root can login. The contents of that file will be displayed if they try. This is useful when the administrator is about to do a shutdown or otherwise change the runlevel of the system and doesn't want additional users logging in.