login time

  • Follow


Is there any command I can run to give me the last login date/time of a
user?
Thanks,
Dave

0
Reply dacooley (120) 11/23/2005 3:29:26 PM

Dave wrote:
> Is there any command I can run to give me the last login date/time of a
> user?

Yes. The last command:

$ last -1 root
root      console                       Wed Nov 16 12:25 - 12:40  (00:15)
$


--chris
0
Reply Chris 11/23/2005 3:35:21 PM


In article <dm22gc$kjh$1@new-usenet.uk.sun.com>,
 Chris Gerhard <Chris.Gerhard@sun.com> wrote:

> Dave wrote:
> > Is there any command I can run to give me the last login date/time of a
> > user?
> 
> Yes. The last command:
> 
> $ last -1 root
> root      console                       Wed Nov 16 12:25 - 12:40  (00:15)
> $
> 
> 
> --chris

But only if you haven't recycled wtmp, which grows with every 
login/logout.

-- 
DeeDee, don't press that button!  DeeDee!  NO!  Dee...



0
Reply Michael 11/23/2005 8:08:45 PM

Michael Vilain <vilain@spamcop.net> wrote:
> In article <dm22gc$kjh$1@new-usenet.uk.sun.com>,
> Chris Gerhard <Chris.Gerhard@sun.com> wrote:
> 
>> Dave wrote:
>> > Is there any command I can run to give me the last login date/time of a
>> > user?
>> 
>> Yes. The last command:
>> 
>> $ last -1 root
>> root      console                       Wed Nov 16 12:25 - 12:40  (00:15)
>> $
>> 
>> 
>> --chris
> 
> But only if you haven't recycled wtmp, which grows with every 
> login/logout.
> 

And if you cycle wtmp you can use /usr/sbin/acct/runacct just before, to
make a /var/adm/acct/sum/loginlog file, which has the last login date
of every local user. You need to have proces-accounting installed for this
to work

HTH, Erik

0
Reply news 11/27/2005 6:00:00 PM

3 Replies
918 Views

(page loaded in 0.062 seconds)

Similiar Articles:













7/21/2012 4:02:24 AM


Reply: