nologin
Alternative shell that prevents a user from logging in. More information: https://manned.org/nologin.5.
-
Set a user's login shell to
nologin
to prevent the user from logging in:
chsh -s {{user}} nologin
-
Customize message for users with the login shell of
nologin
:
echo "{{declined_login_message}}" > /etc/nologin.txt
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.