TogaMario
asked on
How do I disable a Red Hat user account that has been inactive for 'x' days?
How do I disable a Red Hat (Enterprise Linux 5.3) user account that has been inactive for 'x' days?
I want user accounts that haven't logged into the system after a certain amount of time to be locked.
I want user accounts that haven't logged into the system after a certain amount of time to be locked.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Late, I know, but you can use pam_lastlog to do this without having to use scripts and cron.
To lock out an account after 10 days of inactivity, add, as root, the following line to the auth section of the /etc/pam.d/login file:
auth required pam_lastlog.so inactive=10
To lock out an account after 10 days of inactivity, add, as root, the following line to the auth section of the /etc/pam.d/login file:
auth required pam_lastlog.so inactive=10
ASKER