]> git.ipfire.org Git - thirdparty/util-linux.git/blob - login-utils/nologin.8
d7be1f90ee9fe51cc95fefc3fb01901fec9d4c95
[thirdparty/util-linux.git] / login-utils / nologin.8
1 .TH NOLOGIN 8 "November 2019" "util-linux" "System Administration"
2 .SH NAME
3 nologin \- politely refuse a login
4 .SH SYNOPSIS
5 .B nologin
6 .RB [ \-V ]
7 .RB [ \-h ]
8 .SH DESCRIPTION
9 .B nologin
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.
12 .PP
13 If the file /etc/nologin.txt exists, nologin displays its contents to the
14 user instead of the default message.
15 .PP
16 The exit status returned by
17 .B nologin
18 is always 1.
19 .PP
20 .SH OPTIONS
21 \fB\-c\fR, \fB\-\-command\fR \fIcommand\fR
22 .br
23 \fB\-\-init-file\fR
24 .br
25 \fB\-i\fR \fB\-\-interactive\fR
26 .br
27 \fB\-\-init-file\fR \fIfile\fR
28 .br
29 \fB\-i\fR, \fB\-\-interactive\fR
30 .br
31 \fB\-l\fR, \fB\-\-login\fR
32 .br
33 \fB\-\-noprofile\fR
34 .br
35 \fB\-\-norc\fR
36 .br
37 \fB\-\-posix\fR
38 .br
39 \fB\-\-rcfile\fR \fIfile\fR
40 .br
41 \fB\-r\fR, \fB\-\-restricted\fR
42 .IP
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.
48 .SH NOTES
49 .B nologin
50 is a per-account way to disable login (usually used for system accounts like http or ftp).
51 .BR nologin (8)
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.
54 .PP
55 .BR pam_nologin (8)
56 PAM module usually prevents all non-root users from logging into the system.
57 .BR pam_nologin (8)
58 functionality is controlled by /var/run/nologin or the /etc/nologin file.
59 .SH AUTHORS
60 .UR kzak@redhat.com
61 Karel Zak
62 .UE
63 .SH SEE ALSO
64 .BR login (1),
65 .BR passwd (5),
66 .BR pam_nologin (8)
67 .SH HISTORY
68 The
69 .B nologin
70 command appeared in 4.4BSD.
71 .SH AVAILABILITY
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/
74 Linux Kernel Archive
75 .UE .