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

NAME

6       pam_tty_audit - Enable or disable TTY auditing for specified users
7

SYNOPSIS

9       pam_tty_audit.so [disable=patterns] [enable=patterns]
10

DESCRIPTION

12       The pam_tty_audit PAM module is used to enable or disable TTY auditing.
13       By default, the kernel does not audit input on any TTY.
14

OPTIONS

16       disable=patterns
17           For each user matching patterns, disable TTY auditing. This
18           overrides any previous enable option matching the same user name on
19           the command line. See NOTES for further description of patterns.
20
21       enable=patterns
22           For each user matching patterns, enable TTY auditing. This
23           overrides any previous disable option matching the same user name
24           on the command line. See NOTES for further description of patterns.
25
26       open_only
27           Set the TTY audit flag when opening the session, but do not restore
28           it when closing the session. Using this option is necessary for
29           some services that don't fork() to run the authenticated session,
30           such as sudo.
31
32       log_passwd
33           Log keystrokes when ECHO mode is off but ICANON mode is active.
34           This is the mode in which the tty is placed during password entry.
35           By default, passwords are not logged. This option may not be
36           available on older kernels (3.9?).
37

MODULE TYPES PROVIDED

39       Only the session type is supported.
40

RETURN VALUES

42       PAM_SESSION_ERR
43           Error reading or modifying the TTY audit flag. See the system log
44           for more details.
45
46       PAM_SUCCESS
47           Success.
48

NOTES

50       When TTY auditing is enabled, it is inherited by all processes started
51       by that user. In particular, daemons restarted by an user will still
52       have TTY auditing enabled, and audit TTY input even by other users
53       unless auditing for these users is explicitly disabled. Therefore, it
54       is recommended to use disable=* as the first option for most daemons
55       using PAM.
56
57       To view the data that was logged by the kernel to audit use the command
58       aureport --tty.
59
60       The patterns are comma separated lists of glob patterns or ranges of
61       uids. A range is specified as min_uid:max_uid where one of these values
62       can be empty. If min_uid is empty only user with the uid max_uid will
63       be matched. If max_uid is empty users with the uid greater than or
64       equal to min_uid will be matched.
65
66       Please note that passwords in some circumstances may be logged by TTY
67       auditing even if the log_passwd is not used. For example, all input to
68       an ssh session will be logged - even if there is a password being typed
69       into some software running at the remote host because only the local
70       TTY state affects the local TTY auditing.
71

EXAMPLES

73       Audit all administrative actions.
74
75           session   required pam_tty_audit.so disable=* enable=root
76
77
78

SEE ALSO

80       aureport(8), pam.conf(5), pam.d(5), pam(8)
81

AUTHOR

83       pam_tty_audit was written by Miloslav Trmač <mitr@redhat.com>. The
84       log_passwd option was added by Richard Guy Briggs <rgb@redhat.com>.
85
86
87
88Linux-PAM Manual                  03/09/2020                  PAM_TTY_AUDIT(8)
Impressum