blob: c23319ff7a3b233fc70a87df97701744464d9e85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
'\" t
.\" Title: nologin
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.15
.\" Date: 2022-05-11
.\" Manual: System Administration
.\" Source: util-linux 2.38.1
.\" Language: English
.\"
.TH "NOLOGIN" "8" "2022-05-11" "util\-linux 2.38.1" "System Administration"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
. mso www.tmac
. am URL
. ad l
. .
. am MTO
. ad l
. .
. LINKSTYLE blue R < >
.\}
.SH "NAME"
nologin \- politely refuse a login
.SH "SYNOPSIS"
.sp
\fBnologin\fP [\fB\-V\fP] [\fB\-h\fP]
.SH "DESCRIPTION"
.sp
\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.
.sp
If the file \fI/etc/nologin.txt\fP exists, \fBnologin\fP displays its contents to the user instead of the default message.
.sp
The exit status returned by \fBnologin\fP is always 1.
.SH "OPTIONS"
.sp
\fB\-c\fP, \fB\-\-command\fP \fIcommand\fP
.sp
\fB\-\-init\-file\fP
.sp
\fB\-i\fP \fB\-\-interactive\fP
.sp
\fB\-\-init\-file\fP \fIfile\fP
.sp
\fB\-i\fP, \fB\-\-interactive\fP
.sp
\fB\-l\fP, \fB\-\-login\fP
.sp
\fB\-\-noprofile\fP
.sp
\fB\-\-norc\fP
.sp
\fB\-\-posix\fP
.sp
\fB\-\-rcfile\fP \fIfile\fP
.sp
\fB\-r\fP, \fB\-\-restricted\fP
.sp
These shell command\-line options are ignored to avoid \fBnologin\fP error.
.sp
\fB\-h\fP, \fB\-\-help\fP
.RS 4
Display help text and exit.
.RE
.sp
\fB\-V\fP, \fB\-\-version\fP
.RS 4
Print version and exit.
.RE
.SH "NOTES"
.sp
\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.
.sp
\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.
.SH "HISTORY"
.sp
The \fBnologin\fP command appeared in 4.4BSD.
.SH "AUTHORS"
.sp
.MTO "kzak\(atredhat.com" "Karel Zak" ""
.SH "SEE ALSO"
.sp
\fBlogin\fP(1),
\fBpasswd\fP(5),
\fBpam_nologin\fP(8)
.SH "REPORTING BUGS"
.sp
For bug reports, use the issue tracker at \c
.URL "https://github.com/util\-linux/util\-linux/issues" "" "."
.SH "AVAILABILITY"
.sp
The \fBnologin\fP command is part of the util\-linux package which can be downloaded from \c
.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."
|