nologin
Alternative shell that prevents a user from logging in. More information: <https://manned.org/nologin.5>.
Install
- All systems
-
curl cmd.cat/nologin.sh
- Debian
-
apt-get install login
- Ubuntu
-
apt-get install login
- Alpine
-
apk add util-linux
- Arch Linux
-
pacman -S util-linux
- Kali Linux
-
apt-get install login
- CentOS
-
yum install util-linux
- Fedora
-
dnf install util-linux
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install login
- OS X
-
brew install util-linux
- Raspbian
-
apt-get install login
- Dockerfile
- dockerfile.run/nologin
- Docker
-
docker run cmd.cat/nologin nologin
powered by Commando
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
© tl;dr; authors and contributors