How to clear lastlog record of an inactive user using pam_lastlog
Issue
- User is unable to login to system after being inactive for certain period when using pam_lastlog
- Authentication failure for user after being set inactive by pam_lastlog
- Errors like below is seen under /var/log/secure
Jan 21 20:45:08 server login: pam_lastlog(login:auth): user username inactive for xxx days - denied
Jan 21 20:46:29 server login: pam_lastlog(login:auth): user username inactive for xxx days - denied
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.