1NOLOGIN(8) System Administration NOLOGIN(8)
2
3
4
6 nologin - politely refuse a login
7
9 nologin [-V] [-h]
10
12 nologin displays a message that an account is not available and exits
13 non-zero. It is intended as a replacement shell field to deny login
14 access to an account.
15
16 If the file /etc/nologin.txt exists, nologin displays its contents to
17 the user instead of the default message.
18
19 The exit status returned by nologin is always 1.
20
22 -c, --command command
23 --init-file
24 -i --interactive
25 --init-file file
26 -i, --interactive
27 -l, --login
28 --noprofile
29 --norc
30 --posix
31 --rcfile file
32 -r, --restricted
33
34 These shell command-line options are ignored to avoid nologin
35 error.
36
37 -h, --help
38 Display help text and exit.
39
40 -V, --version
41 Display version information and exit.
42
44 nologin is a per-account way to disable login (usually used for system
45 accounts like http or ftp). nologin(8) uses /etc/nologin.txt as an
46 optional source for a non-default message, the login access is always
47 refused independently of the file.
48
49 pam_nologin(8) PAM module usually prevents all non-root users from log‐
50 ging into the system. pam_nologin(8) functionality is controlled by
51 /var/run/nologin or the /etc/nologin file.
52
54 The nologin command appeared in 4.4BSD.
55
57 Karel Zak ⟨kzak@redhat.com⟩
58
60 login(1), passwd(5), pam_nologin(8)
61
63 The nologin command is part of the util-linux package and is available
64 from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
65 linux/⟩.
66
67
68
69util-linux November 2019 NOLOGIN(8)