If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
Taken from a newsgroup post
Subject: Re: Need to generate a report on Users that log in to the server References: <firstname.lastname@example.org> From: email@example.com (John DuBois) Date: 17 Jan 2003 03:23:03 GMT In article <firstname.lastname@example.org>, lalaker <email@example.com> wrote: > I have been given a task to generate a report, something like an >audit report, for all the user that: >1. have logged into the server >2. No. of times failed to login to the server >3. Accounts that have been locked etc.... Try this: ftp://ftp.armory.com/pub/scripts/lastlogin To run it you will need: ftp://ftp.armory.com/pub/scobins/gawk The header mentions a couple of other bits you can pick up for full functionality, but you won't need them to do this: $ lastlogin -Ha -rlBk User Last Login #Unsuc L root Wed Dec 18 01:45 1 - spcecdt Mon Jan 13 03:49 - - ... 'a' causes the report to list all "real users". The "Last Login" field will be "-" for those who have never logged in. #Unsuc is the number of consecutive unsuccessful login attempts. The L field will be "L" for those whose accounts are locked. The #Unsuc and L report data come from the TCB database and so are only available if lastlogin is run by root. There are many other options: ftp://ftp.armory.com/pub/scripts/help_pages/lastlogin John -- John DuBois firstname.lastname@example.org KC6QKZ/AE https://www.armory.com/~spcecdt/
Got something to add? Send me email.
Anyone who puts a small gloss on a fundamental technology, calls it proprietary, and then tries to keep others from building on it, is a thief. (Tim O'Reilly)