Operating System - HP-UX
1834456 Members
2972 Online
110067 Solutions
New Discussion

How to find the login time for specific period

 
rajeshkanna
Occasional Advisor

How to find the login time for specific period

Hi,

I am trying to generate the report to get login details of my project members from QC.

Anybody can help me the tips to get the details.

Thanks in Advance
Regards,
Rajesh
9 REPLIES 9
Suraj K Sankari
Honored Contributor

Re: How to find the login time for specific period

Hi,

you can used "last" to see who is login when but its depending on /var/wtmp file or else you need to enable auditing for more information see the man pages of auditing.

Suraj
Ganesan R
Honored Contributor

Re: How to find the login time for specific period

Hi,

"last" and "lastb" is the command to give login/logout details and bad login details respectively.

If you need login details for specific users you can grep with user name from those command outputs
Best wishes,

Ganesh.
avizen9
Esteemed Contributor

Re: How to find the login time for specific period

Hello Rajesh,
you can use last command to get information, if you require more detail info need to look in /var/adm/syslog/syslog.log file, below is sample like which will generate when anybody will login, hope this will help, thanks,

May 14 13:25:44 testserver1.domain.com inetd[17786]: telnet/tcp: Connection from avipc (10.61.42.232) at Thu May 14 13:25:44 2009
Sajjad Sahir
Honored Contributor

Re: How to find the login time for specific period


Dear Rajesh

last is the best command


thanks and regards

Sajjad Sahir
vaishakh k
Advisor

Re: How to find the login time for specific period

Hai Rajesh,

For you better to check with ,

#last -R -5 username (eg:root)

It will shows the last 5 login details of that specific user. It will also shows from which ip adress the user is logged in.

Hope this will help you..
Taifur
Respected Contributor

Re: How to find the login time for specific period

Hi Rajesh,

For login details you can check
#more /var/adm/wtmps
#more /var/adm/utmps

or you can use last command
#last
check man pages of last.

check below link in detais
http://docs.hp.com/en/B2355-60103/utmp.4.html

New files:
http://docs.hp.com/en/B2355-60103/wtmps.4.html
http://docs.hp.com/en/B2355-60103/utmps.4.html


If it helps, pls assign point.

Rgds//
Taifur
rajeshkanna
Occasional Advisor

Re: How to find the login time for specific period

Hi All,

Thanks for your reply.

Regards,
Rajesh
Suraj K Sankari
Honored Contributor

Re: How to find the login time for specific period

Hi Rajesh,

Please assign some points who give there valuable time for your problem.

To know how to assign points please go through the below link.


http://forums13.itrc.hp.com/service/forums/helptips.do?#33

Suraj
Sp4admin
Trusted Contributor

Re: How to find the login time for specific period

As stated above you can check the "last" and the "lastb" command to ee check logins and logouts.

sp,