Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

"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?"

share|improve this question
"Could you please share the scripts?" - Show me yours and I'll show you mine. – Dennis Williamson Oct 21 '09 at 4:57

You do know about these, don't you?

  • last
  • lastlog
  • chage
  • /var/log/wtmp
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.