Operating System - HP-UX
1838653 Members
4034 Online
110128 Solutions
New Discussion

Re: How to find last login time

 
san_intel3
Occasional Advisor

How to find last login time

Is there any command which can give last login time of all user accounts on the server??
Basically I want to find all users who ever not logged into the account since past 120 days...Is there any way to do this task??
3 REPLIES 3
Peter Godron
Honored Contributor

Re: How to find last login time

Hi,
you have been on the forums just over 1 month, but have yet to reward any of the 30 answers given.

Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.

"man last" will help you with your current question, but only if you have not messed with /var/adm/wtmp.
Reshma Malusare
Trusted Contributor

Re: How to find last login time

Hi San,
1] Finger -->
By default, finger lists for each user_name on the system:

Login name,
Full given name,
erminal write status (if write permission is denied),
Idle time, <---
Login time, <---
User's home directory and login shell,
ny plan the user has placed in file .plan in their home directory,
Project on which they are working from the file .project, also in the home directory,
office location and phone number (if known),
last time the user received the mail, and last time the user read the mail.


2]last-->
indicate last logins of users and ttys
The last command searches backwards through the file /var/adm/wtmps (which contains a record of all logins and logouts) for information about a user, a tty, or any group of users and ttys


Peter Godron
Honored Contributor

Re: How to find last login time

Hi (again),
and if you use the ITRC search facility you can also find:
"Last login and disused accout checking?"
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=145580