Script for checking the nologin accounts and then disable the account
Posted
by suma
on Server Fault
See other posts from Server Fault
or by suma
Published on 2009-10-21T04:41:07Z
Indexed on
2010/04/29
4:07 UTC
Read the original article
Hit count: 291
linux
|server-security
"Could you please share the scripts which does the below ?"
I have written a script that scans all the relevent logs daily, makes a list of people that have had any activity that day, and maintains database (just a text file) of users and the last time they logged in.
Then I have a second script that examines the database for dates more than x days ago, an notifies the user and administrator 2 weeks prior to locking the account. And if there are any dates more than x+y days ago, deletes the account altogether.
This seems to be working for me - but I would like to use a non-proprietary solution if one is available.
"Could you please share the scripts?"
© Server Fault or respective owner