How Do i get last lgin date for all my users

Dale J Chatham dale.chatham at gmail.com
Thu Apr 11 08:47:43 EDT 2013


With the caveat that on most Linux systems, the logs roll at 0400 Sunday 
morning. Logs contain info from the previous Sunday onward, so you may 
have to go through maillog, maillog.1, maillog.2 and so on to get info 
on users who logon inrequently.

On 04/11/2013 07:42 AM, Charles Bradshaw wrote:
> Your maillog contains the info you require.
>
> As root on a linux install try:
> # cat /var/log/maillog | grep login
> ....
>
> Which should give you a list of all login details up to the last date
> stamp on maillog (or whatever your log file is named).
>
> Your syslog is your friend.
> Brad
>
> On Thu, 2013-04-11 at 10:15 +0200, Marc Patermann wrote:
>> Dale J Chatham schrieb (10.04.2013 21:49 Uhr):
>>
>>> Assuming Linux?UNIX,
>>> log onto the machine, run the command: last
>> This does only work, if IMAP users are system users - which most of the
>> time is not the case.
>>
>>> Perl is your friend.
>> Pass your imap log for "User logged in". Extract username and timestamp.
>>    Update the users entry in your data store with the timestamp.
>>
>> Maybe your syslog daemon can do something like that for you.
>>
>>
>> Marc
>> ----
>> Cyrus Home Page: http://www.cyrusimap.org/
>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>> To Unsubscribe:
>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
>
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


-- 
Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote. -Benjamin Franklin

The strongest reason for people to retain the right to keep and bear 
arms is, as a last resort, to protect themselves against tyranny in 
government. -Thomas Jefferson

The Constitution shall never be construed….to prevent the people of the 
United States who are peaceable citizens from keeping their own arms. 
-Samuel Adams



More information about the Info-cyrus mailing list