1838590 Members
3747 Online
110128 Solutions
New Discussion

last login date

 
SOLVED
Go to solution
Sanjiv Sharma_1
Honored Contributor

last login date

Upon login the user receive a message showing the last login date in HP-UX 11.11 with trusted mode configuration.

For example:
login: abcdefg
Password:
Last successful login for abcdefg: Tue Apr 24 10:02:20 SST-8 2007 on pts/ta
Last unsuccessful login for abcdefg: Tue Apr 17 16:37:50 SST-8 2007
Please wait...checking for disk quotas

From which file does it execute the command/scripts to give the last login date? Thanks in advance.
Everything is possible
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: last login date

Those data are stored in the TCB database. You can examine them using the getprpw command or use a text editor to view the files directly in /tcb/files/auth/first_char_of_login/login.

Note: The times are stored in epoch seconds.
If it ain't broke, I can fix that.
Peter Godron
Honored Contributor

Re: last login date

Patrick Wallek
Honored Contributor
Solution

Re: last login date

In trusted mode you can see this information by:

Last successful
# /usr/lbin/getprpw -m slogint abcdefg

Last unsuccessful
# /usr/lbin/getprpw -m ulogint abcdefg

(where abcdefg is the appropriate user id)
Patrick Wallek
Honored Contributor

Re: last login date

And since you are on 11.11, there is a man page for getprpw that gives details on what you can get from the getprpw command.

If you do:

/usr/lbin/getprpw abcdefg

You will see a lot of info about the user.
Sanjiv Sharma_1
Honored Contributor

Re: last login date

/usr/lbin/getprpw did help to some extent. Thanks
Everything is possible