1PAM_SECURETTY(8)               Linux-PAM Manual               PAM_SECURETTY(8)
2
3
4

NAME

6       pam_securetty - Limit root login to special devices
7

SYNOPSIS

9       pam_securetty.so [debug]
10

DESCRIPTION

12       pam_securetty is a PAM module that allows root logins only if the user
13       is logging in on a "secure" tty, as defined by the listing in the
14       securetty file. pam_securetty checks at first, if /etc/securetty
15       exists. If not and it was built with vendordir support, it will use
16       <vendordir>/securetty. pam_securetty also checks that the securetty
17       files are plain files and not world writable. It will also allow root
18       logins on the tty specified with console= switch on the kernel command
19       line and on ttys from the /sys/class/tty/console/active.
20
21       This module has no effect on non-root users and requires that the
22       application fills in the PAM_TTY item correctly.
23
24       For canonical usage, should be listed as a required authentication
25       method before any sufficient authentication methods.
26

OPTIONS

28       debug
29           Print debug information.
30
31       noconsole
32           Do not automatically allow root logins on the kernel console
33           device, as specified on the kernel command line or by the sys file,
34           if it is not also specified in the securetty file.
35

MODULE TYPES PROVIDED

37       Only the auth module type is provided.
38

RETURN VALUES

40       PAM_SUCCESS
41           The user is allowed to continue authentication. Either the user is
42           not root, or the root user is trying to log in on an acceptable
43           device.
44
45       PAM_AUTH_ERR
46           Authentication is rejected. Either root is attempting to log in via
47           an unacceptable device, or the securetty file is world writable or
48           not a normal file.
49
50       PAM_BUF_ERR
51           Memory buffer error.
52
53       PAM_CONV_ERR
54           The conversation method supplied by the application failed to
55           obtain the username.
56
57       PAM_INCOMPLETE
58           The conversation method supplied by the application returned
59           PAM_CONV_AGAIN.
60
61       PAM_SERVICE_ERR
62           An error occurred while the module was determining the user's name
63           or tty, or the module could not open the securetty file.
64
65       PAM_USER_UNKNOWN
66           The module could not find the user name in the /etc/passwd file to
67           verify whether the user had a UID of 0. Therefore, the results of
68           running this module are ignored.
69

EXAMPLES

71           auth  required  pam_securetty.so
72           auth  required  pam_unix.so
73
74
75

SEE ALSO

77       securetty(5), pam.conf(5), pam.d(5), pam(8)
78

AUTHOR

80       pam_securetty was written by Elliot Lee <sopwith@cuc.edu>.
81
82
83
84Linux-PAM Manual                  09/03/2021                  PAM_SECURETTY(8)
Impressum