3 .\" Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.15
6 .\" Manual: System Administration
7 .\" Source: util-linux 2.37.4
10 .TH "NOLOGIN" "8" "2022-02-14" "util\-linux 2.37.4" "System Administration"
28 . LINKSTYLE blue R < >
31 nologin \- politely refuse a login
34 \fBnologin\fP [\fB\-V\fP] [\fB\-h\fP]
37 \fBnologin\fP displays a message that an account is not available and exits non\-zero. It is intended as a replacement shell field to deny login access to an account.
39 If the file \fI/etc/nologin.txt\fP exists, \fBnologin\fP displays its contents to the user instead of the default message.
41 The exit status returned by \fBnologin\fP is always 1.
44 \fB\-c\fP, \fB\-\-command\fP \fIcommand\fP
48 \fB\-i\fP \fB\-\-interactive\fP
50 \fB\-\-init\-file\fP \fIfile\fP
52 \fB\-i\fP, \fB\-\-interactive\fP
54 \fB\-l\fP, \fB\-\-login\fP
62 \fB\-\-rcfile\fP \fIfile\fP
64 \fB\-r\fP, \fB\-\-restricted\fP
66 These shell command\-line options are ignored to avoid \fBnologin\fP error.
68 \fB\-h\fP, \fB\-\-help\fP
70 Display help text and exit.
73 \fB\-V\fP, \fB\-\-version\fP
75 Display version information and exit.
79 \fBnologin\fP is a per\-account way to disable login (usually used for system accounts like http or ftp). \fBnologin\fP uses \fI/etc/nologin.txt\fP as an optional source for a non\-default message, the login access is always refused independently of the file.
81 \fBpam_nologin\fP(8) PAM module usually prevents all non\-root users from logging into the system. \fBpam_nologin\fP(8) functionality is controlled by \fI/var/run/nologin\fP or the \fI/etc/nologin\fP file.
84 The \fBnologin\fP command appeared in 4.4BSD.
87 .MTO "kzak\(atredhat.com" "Karel Zak" ""
95 For bug reports, use the issue tracker at \c
96 .URL "https://github.com/karelzak/util\-linux/issues" "" "."
99 The \fBnologin\fP command is part of the util\-linux package which can be downloaded from \c
100 .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."