snippetbashTip
nologin — Alternative shell that prevents a user from logging in. More information: <https://manned.org/nologi
Viewed 0 times
thatshellcommandpreventsalternativecliusernologin
linux
Problem
How to use the
nologin command: Alternative shell that prevents a user from logging in. More information: <https://manned.org/nologin.8>.Solution
nologin — Alternative shell that prevents a user from logging in. More information: <https://manned.org/nologin.8>.Set a user's login shell to
nologin to prevent the user from logging in:chsh {{[-s|--shell]}} {{user}} nologinCustomize message for users with the login shell of
nologin:echo "{{declined_login_message}}" > /etc/nologin.txtCode Snippets
Set a user's login shell to `nologin` to prevent the user from logging in
chsh {{[-s|--shell]}} {{user}} nologinCustomize message for users with the login shell of `nologin`
echo "{{declined_login_message}}" > /etc/nologin.txtContext
tldr-pages: linux/nologin
Revisions (0)
No revisions yet.