1PAM_LASTLOG(8) Linux-PAM Manual PAM_LASTLOG(8)
2
3
4
6 pam_lastlog - PAM module to display date of last login and perform
7 inactive account lock out
8
10 pam_lastlog.so [debug] [silent] [never] [nodate] [nohost] [noterm]
11 [nowtmp] [noupdate] [showfailed] [inactive=<days>]
12
14 pam_lastlog is a PAM module to display a line of information about the
15 last login of the user. In addition, the module maintains the
16 /var/log/lastlog file.
17
18 Some applications may perform this function themselves. In such cases,
19 this module is not necessary.
20
21 If the module is called in the auth or account phase, the accounts that
22 were not used recently enough will be disallowed to log in. The check
23 is not performed for the root account so the root is never locked out.
24
26 debug
27 Print debug information.
28
29 silent
30 Don't inform the user about any previous login, just update the
31 /var/log/lastlog file.
32
33 never
34 If the /var/log/lastlog file does not contain any old entries for
35 the user, indicate that the user has never previously logged in
36 with a welcome message.
37
38 nodate
39 Don't display the date of the last login.
40
41 noterm
42 Don't display the terminal name on which the last login was
43 attempted.
44
45 nohost
46 Don't indicate from which host the last login was attempted.
47
48 nowtmp
49 Don't update the wtmp entry.
50
51 noupdate
52 Don't update any file.
53
54 showfailed
55 Display number of failed login attempts and the date of the last
56 failed attempt from btmp. The date is not displayed when nodate is
57 specified.
58
59 inactive=<days>
60 This option is specific for the auth or account phase. It specifies
61 the number of days after the last login of the user when the user
62 will be locked out by the module. The default value is 90.
63
65 The auth and account module type allows to lock out users which did not
66 login recently enough. The session module type is provided for
67 displaying the information about the last login and/or updating the
68 lastlog and wtmp files.
69
71 PAM_SUCCESS
72 Everything was successful.
73
74 PAM_SERVICE_ERR
75 Internal service module error.
76
77 PAM_USER_UNKNOWN
78 User not known.
79
80 PAM_AUTH_ERR
81 User locked out in the auth or account phase due to inactivity.
82
83 PAM_IGNORE
84 There was an error during reading the lastlog file in the auth or
85 account phase and thus inactivity of the user cannot be determined.
86
88 Add the following line to /etc/pam.d/login to display the last login
89 time of an user:
90
91 session required pam_lastlog.so nowtmp
92
93
94 To reject the user if he did not login during the previous 50 days the
95 following line can be used:
96
97 auth required pam_lastlog.so inactive=50
98
99
101 /var/log/lastlog
102 Lastlog logging file
103
105 pam.conf(5), pam.d(5), pam(8)
106
108 pam_lastlog was written by Andrew G. Morgan <morgan@kernel.org>.
109
110 Inactive account lock out added by Tomáš Mráz <tm@t8m.info>.
111
112
113
114Linux-PAM Manual 05/18/2017 PAM_LASTLOG(8)