How to lock local users(using SSH keys for login) based on inactivity in Red Hat Enterprise Linux 6/7
Issue
- How do I lock user accounts based on inactivity which use SSH keys (and not password) for login in RHEL 6/7?
- I tried configuring pam_lastlog.so module to local local users based on inactivity but it doesn't work for users which use SSH keys for login.
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- pam_lastlog.so
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.