08-20-2008
70,
0
Join Date: May 2008
Last Activity: 28 February 2010, 8:51 AM EST
Posts: 70
Thanks Given: 0
Thanked 0 Times in 0 Posts
Well, I don't have any easy solution but I would do that with join command.
1] I would use files: ${server}_locked.txt - because of later usage of join command
2] ${server}_locked.txt file structure:
number_of_days_user_is_locked<a char that username cannot contain>user
3] if you run the script once a day you have old information about users of a given server and fresh ones. You join old file with the new one and you know to which user you have to update the number of days. Then you use the join command again and use the flag -a (prints unpairable lines) which gives you users which should have 0 as the number of locked days.
I know it's generally described but I hope it still helps a little.