Debian Codegraph @

upstream/debian-unstable/man8/pam_tty_audit.8

raw
1 '\" t
2 .\" Title: pam_tty_audit
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_TTY_AUDIT" "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_tty_audit \- Enable or disable TTY auditing for specified users
32 .SH "SYNOPSIS"
33 .HP \w'\fBpam_tty_audit\&.so\fR\ 'u
34 \fBpam_tty_audit\&.so\fR [disable=\fIpatterns\fR] [enable=\fIpatterns\fR]
35 .SH "DESCRIPTION"
36 .PP
37 The pam_tty_audit PAM module is used to enable or disable TTY auditing\&. By default, the kernel does not audit input on any TTY\&.
38 .SH "OPTIONS"
39 .PP
40 disable=patterns
41 .RS 4
42 For each user matching
43 \fB\fIpatterns\fR\fR, disable TTY auditing\&. This overrides any previous
44 \fBenable\fR
45 option matching the same user name on the command line\&. See NOTES for further description of
46 \fB\fIpatterns\fR\fR\&.
47 .RE
48 .PP
49 enable=patterns
50 .RS 4
51 For each user matching
52 \fB\fIpatterns\fR\fR, enable TTY auditing\&. This overrides any previous
53 \fBdisable\fR
54 option matching the same user name on the command line\&. See NOTES for further description of
55 \fB\fIpatterns\fR\fR\&.
56 .RE
57 .PP
58 open_only
59 .RS 4
60 Set the TTY audit flag when opening the session, but do not restore it when closing the session\&. Using this option is necessary for some services that don\*(Aqt
61 \fBfork()\fR
62 to run the authenticated session, such as
63 \fBsudo\fR\&.
64 .RE
65 .PP
66 log_passwd
67 .RS 4
68 Log keystrokes when ECHO mode is off but ICANON mode is active\&. This is the mode in which the tty is placed during password entry\&. By default, passwords are not logged\&. This option may not be available on older kernels (3\&.9?)\&.
69 .RE
70 .SH "MODULE TYPES PROVIDED"
71 .PP
72 Only the
73 \fBsession\fR
74 type is supported\&.
75 .SH "RETURN VALUES"
76 .PP
77 PAM_SESSION_ERR
78 .RS 4
79 Error reading or modifying the TTY audit flag\&. See the system log for more details\&.
80 .RE
81 .PP
82 PAM_SUCCESS
83 .RS 4
84 Success\&.
85 .RE
86 .SH "NOTES"
87 .PP
88 When TTY auditing is enabled, it is inherited by all processes started by that user\&. In particular, daemons restarted by a user will still have TTY auditing enabled, and audit TTY input even by other users unless auditing for these users is explicitly disabled\&. Therefore, it is recommended to use
89 \fBdisable=*\fR
90 as the first option for most daemons using PAM\&.
91 .PP
92 To view the data that was logged by the kernel to audit use the command
93 \fBaureport \-\-tty\fR\&.
94 .PP
95 The
96 \fB\fIpatterns\fR\fR
97 are comma separated lists of glob patterns or ranges of uids\&. A range is specified as
98 \fImin_uid\fR:\fImax_uid\fR
99 where one of these values can be empty\&. If
100 \fImin_uid\fR
101 is empty only user with the uid
102 \fImax_uid\fR
103 will be matched\&. If
104 \fImax_uid\fR
105 is empty users with the uid greater than or equal to
106 \fImin_uid\fR
107 will be matched\&.
108 .PP
109 Please note that passwords in some circumstances may be logged by TTY auditing even if the
110 \fBlog_passwd\fR
111 is not used\&. For example, all input to an ssh session will be logged \- even if there is a password being typed into some software running at the remote host because only the local TTY state affects the local TTY auditing\&.
112 .SH "EXAMPLES"
113 .PP
114 Audit all administrative actions\&.
115 .sp
116 .if n \{\
117 .RS 4
118 .\}
119 .nf
120 session required pam_tty_audit\&.so disable=* enable=root
121
122 .fi
123 .if n \{\
124 .RE
125 .\}
126 .sp
127 .SH "SEE ALSO"
128 .PP
129 \fBaureport\fR(8),
130 \fBpam.conf\fR(5),
131 \fBpam.d\fR(5),
132 \fBpam\fR(7)
133 .SH "AUTHOR"
134 .PP
135 pam_tty_audit was written by Miloslav Trmač <mitr@redhat\&.com>\&. The log_passwd option was added by Richard Guy Briggs <rgb@redhat\&.com>\&.