Posted by Kellen on Sat 5 Mar 2005 at 00:15
I have a machine which has a large number of users, many of whom are inactive. I would like to be able to identify and purge these users and their files. Is there a standard way to do this, and if so, what is it?
lastlog looks promising, but I have the added complication of users who check their email via IMAP (dovecot and imp3), and local users who have multiple accounts and just su to their other accounts. It seems like I could grep the auth and imap log files for this info, but this problem must have previously been solved more elegantly.
So:
This article can be found online at the Debian Administration website at the following bookmarkable URL:
This article is copyright 2005 Kellen - please ask for permission to republish or translate.