I was wondering if anyone out there could help me. I have a 'log file' generated from the /var/log/secure that tells me my clients logging in.
I have the file trimmed down so I see the following:
May 2 18:19:17 user1 x.x.x.1
May 2 18:19:18 user2 x.x.x.2
May 2 18:19:21 user3 x.x.x.3
May 3 18:19:26 user1 x.x.x.1
May 3 18:19:27 user2 x.x.x.2
May 3 18:19:34 user3 x.x.x.3
May 4 18:19:39 user1 x.x.x.1
May 4 18:19:53 user2 x.x.x.2
May 5 18:22:50 user1 x.x.x.1
I can insert the above into mysql into a single table with the fields:
month, day, time, user, user_ip
My question is how can I build queries that would let me know that the last time user2 connected was May 4th at 18:19
and user3 has been MIA since May3rd 18:19?
My goal is to have an admin web page to let a co-worker see the non connecting offenders. I tried log watch, but that will not let me know that user3 is not logging in with out comparing - I have over 250 clients connecting...
Am I going about this the right way or is there an easier way? Your help is greatly appreciated!!


