Operating System - HP-UX
1834827 Members
2461 Online
110070 Solutions
New Discussion

Re: How can I check last login

 
SOLVED
Go to solution
Ali Imran Abbas
Regular Advisor

How can I check last login

How can I check when was the hpunix server was logged in last time and what is his login id?
2 REPLIES 2
Kenan Erdey
Honored Contributor
Solution

Re: How can I check last login

Hi,

last |head -2 shows you and the user logged in before you.

id shows you user id.

Kenan.
Computers have lots of memory but no imagination
James R. Ferguson
Acclaimed Contributor

Re: How can I check last login

Hi:

# last username

...will return the last login times and locations for any "username" (if any exist).

Be advised that this requires '/var/adm/wtmp' to be present for logging to occur. If the file doesn't exist, 'touch' it. Its permissions should be 664 with an ownership of "adm:adm".

Regards!

...JRF...