commands.sh

nologin

linux

Alternative shell that prevents a user from logging in.

More info →

Options (1)

-s, --shellboolean

Set a user's login shell to `nologin` to prevent the user from logging in

Example: chsh {{[-s|--shell]}} {{user}} nologin

Examples (2)

Set a user's login shell to `nologin` to prevent the user from logging in

chsh [-s|--shell] user nologin

Customize message for users with the login shell of `nologin`

echo "declined_login_message" > /etc/nologin.txt
made by @shridhargupta | data from tldr-pages