1 .TH NOLOGIN 8 "November 2019" "util-linux" "System Administration"
3 nologin \- politely refuse a login
10 displays a message that an account is not available and exits non-zero. It is
11 intended as a replacement shell field to deny login access to an account.
13 If the file /etc/nologin.txt exists, nologin displays its contents to the
14 user instead of the default message.
16 The exit code returned by
21 \fB\-c\fR, \fB\-\-command\fR \fIcommand\fR
25 \fB\-i\fR \fB\-\-interactive\fR
27 \fB\-\-init-file\fR \fIfile\fR
29 \fB\-i\fR, \fB\-\-interactive\fR
31 \fB\-l\fR, \fB\-\-login\fR
39 \fB\-\-rcfile\fR \fIfile\fR
41 \fB\-r\fR, \fB\-\-restricted\fR
43 These shell command-line options are ignored to avoid nologin error.
44 .IP "\fB\-h\fR, \fB\-\-help\fR"
45 Display help text and exit.
46 .IP "\fB-V\fR, \fB\-\-version\fR"
47 Display version information and exit.
50 is a per-account way to disable login (usually used for system accounts like http or ftp).
52 uses /etc/nologin.txt as an optional source for a non-default message, the login
53 access is always refused independently of the file.
56 PAM module usually prevents all non-root users from logging into the system.
58 functionality is controlled by /var/run/nologin or the /etc/nologin file.
70 command appeared in 4.4BSD.
72 The nologin command is part of the util-linux package and is available from
73 .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/