Debian Codegraph @

upstream/debian-unstable/man8/pam_securetty.8

raw
1 '\" t
2 .\" Title: pam_securetty
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 06/29/2025
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_SECURETTY" "8" "06/29/2025" "Linux\-PAM" "Linux\-PAM Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 pam_securetty \- Limit root login to special devices
32 .SH "SYNOPSIS"
33 .HP \w'\fBpam_securetty\&.so\fR\ 'u
34 \fBpam_securetty\&.so\fR [debug]
35 .SH "DESCRIPTION"
36 .PP
37 pam_securetty is a PAM module that allows root logins only if the user is logging in on a "secure" tty, as defined by the listing in the
38 securetty
39 file\&. pam_securetty checks at first, if
40 /etc/securetty
41 exists\&. If not and it was built with vendordir support, it will use
42 /securetty\&. pam_securetty also checks that the
43 securetty
44 files are plain files and not world writable\&. It will also allow root logins on the tty specified with
45 \fBconsole=\fR
46 switch on the kernel command line and on ttys from the
47 /sys/class/tty/console/active\&.
48 .PP
49 This module has no effect on non\-root users and requires that the application fills in the
50 \fBPAM_TTY\fR
51 item correctly\&.
52 .PP
53 For canonical usage, should be listed as a
54 \fBrequired\fR
55 authentication method before any
56 \fBsufficient\fR
57 authentication methods\&.
58 .SH "OPTIONS"
59 .PP
60 debug
61 .RS 4
62 Print debug information\&.
63 .RE
64 .PP
65 noconsole
66 .RS 4
67 Do not automatically allow root logins on the kernel console device, as specified on the kernel command line or by the sys file, if it is not also specified in the
68 securetty
69 file\&.
70 .RE
71 .SH "MODULE TYPES PROVIDED"
72 .PP
73 Only the
74 \fBauth\fR
75 module type is provided\&.
76 .SH "RETURN VALUES"
77 .PP
78 PAM_SUCCESS
79 .RS 4
80 The user is allowed to continue authentication\&. Either the user is not root, or the root user is trying to log in on an acceptable device\&.
81 .RE
82 .PP
83 PAM_AUTH_ERR
84 .RS 4
85 Authentication is rejected\&. Either root is attempting to log in via an unacceptable device, or the
86 securetty
87 file is world writable or not a normal file\&.
88 .RE
89 .PP
90 PAM_BUF_ERR
91 .RS 4
92 Memory buffer error\&.
93 .RE
94 .PP
95 PAM_CONV_ERR
96 .RS 4
97 The conversation method supplied by the application failed to obtain the username\&.
98 .RE
99 .PP
100 PAM_INCOMPLETE
101 .RS 4
102 The conversation method supplied by the application returned PAM_CONV_AGAIN\&.
103 .RE
104 .PP
105 PAM_SERVICE_ERR
106 .RS 4
107 An error occurred while the module was determining the user\*(Aqs name or tty, or the module could not open the
108 securetty
109 file\&.
110 .RE
111 .PP
112 PAM_USER_UNKNOWN
113 .RS 4
114 The module could not find the user name in the
115 /etc/passwd
116 file to verify whether the user had a UID of 0\&. Therefore, the results of running this module are ignored\&.
117 .RE
118 .SH "EXAMPLES"
119 .PP
120 .if n \{\
121 .RS 4
122 .\}
123 .nf
124 auth required pam_securetty\&.so
125 auth required pam_unix\&.so
126
127 .fi
128 .if n \{\
129 .RE
130 .\}
131 .sp
132 .SH "SEE ALSO"
133 .PP
134 \fBsecuretty\fR(5),
135 \fBpam.conf\fR(5),
136 \fBpam.d\fR(5),
137 \fBpam\fR(7)
138 .SH "AUTHOR"
139 .PP
140 pam_securetty was written by Elliot Lee <sopwith@cuc\&.edu>\&.