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

NAME

6       pam_lastlog - PAM module to display date of last login and perform
7       inactive account lock out
8

SYNOPSIS

10       pam_lastlog.so [debug] [silent] [never] [nodate] [nohost] [noterm]
11                      [nowtmp] [noupdate] [showfailed] [inactive=<days>]
12                      [unlimited]
13

DESCRIPTION

15       pam_lastlog is a PAM module to display a line of information about the
16       last login of the user. In addition, the module maintains the
17       /var/log/lastlog file.
18
19       Some applications may perform this function themselves. In such cases,
20       this module is not necessary.
21
22       If the module is called in the auth or account phase, the accounts that
23       were not used recently enough will be disallowed to log in. The check
24       is not performed for the root account so the root is never locked out.
25

OPTIONS

27       debug
28           Print debug information.
29
30       silent
31           Don't inform the user about any previous login, just update the
32           /var/log/lastlog file. This option does not affect display of bad
33           login attempts.
34
35       never
36           If the /var/log/lastlog file does not contain any old entries for
37           the user, indicate that the user has never previously logged in
38           with a welcome message.
39
40       nodate
41           Don't display the date of the last login.
42
43       noterm
44           Don't display the terminal name on which the last login was
45           attempted.
46
47       nohost
48           Don't indicate from which host the last login was attempted.
49
50       nowtmp
51           Don't update the wtmp entry.
52
53       noupdate
54           Don't update any file.
55
56       showfailed
57           Display number of failed login attempts and the date of the last
58           failed attempt from btmp. The date is not displayed when nodate is
59           specified.
60
61       inactive=<days>
62           This option is specific for the auth or account phase. It specifies
63           the number of days after the last login of the user when the user
64           will be locked out by the module. The default value is 90.
65
66       unlimited
67           If the fsize limit is set, this option can be used to override it,
68           preventing failures on systems with large UID values that lead
69           lastlog to become a huge sparse file.
70

MODULE TYPES PROVIDED

72       The auth and account module type allows to lock out users which did not
73       login recently enough. The session module type is provided for
74       displaying the information about the last login and/or updating the
75       lastlog and wtmp files.
76

RETURN VALUES

78       PAM_SUCCESS
79           Everything was successful.
80
81       PAM_SERVICE_ERR
82           Internal service module error.
83
84       PAM_USER_UNKNOWN
85           User not known.
86
87       PAM_AUTH_ERR
88           User locked out in the auth or account phase due to inactivity.
89
90       PAM_IGNORE
91           There was an error during reading the lastlog file in the auth or
92           account phase and thus inactivity of the user cannot be determined.
93

EXAMPLES

95       Add the following line to /etc/pam.d/login to display the last login
96       time of an user:
97
98               session  required  pam_lastlog.so nowtmp
99
100
101       To reject the user if he did not login during the previous 50 days the
102       following line can be used:
103
104               auth  required  pam_lastlog.so inactive=50
105
106

FILES

108       /var/log/lastlog
109           Lastlog logging file
110

SEE ALSO

112       limits.conf(5), pam.conf(5), pam.d(5), pam(8)
113

AUTHOR

115       pam_lastlog was written by Andrew G. Morgan <morgan@kernel.org>.
116
117       Inactive account lock out added by Tomáš Mráz <tm@t8m.info>.
118
119
120
121Linux-PAM Manual                  12/18/2019                    PAM_LASTLOG(8)
Impressum