mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 11:47:42 +00:00
18 lines
455 B
Plaintext
18 lines
455 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, linux]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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}} nologin`
|
|
|
|
- Customize message for users with the login shell of `nologin`:
|
|
|
|
`echo "{{declined_login_message}}" > /etc/nologin.txt`
|