Operating System - HP-UX
1832973 Members
2699 Online
110048 Solutions
New Discussion

Need to know how the system shows your last sucessful and un-sucessful login time.

 
Amruth
Regular Advisor

Need to know how the system shows your last sucessful and un-sucessful login time.

Hello admins,

As far as i know if a server is a trusted one it is shown by default.

But do anybody know where it is mentioned to display these when you login.

Need to know this for a security Audit.

THanks in Advance.
AM
If i am doing the same way you are doing to me then what is the difference between us.
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Need to know how the system shows your last sucessful and un-sucessful login time.

last
takes data from /var/adm/wtmp
lastb
takes data from /var/adm/btmp

strings command will get you raw data.

last -R

lastb -R

Gets you the host the login came from.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Amruth
Regular Advisor

Re: Need to know how the system shows your last sucessful and un-sucessful login time.

Hi,

Wants to know where you specify in the system (in one of the config files) so that it will get displayed while you login.

Thanks,
AM
If i am doing the same way you are doing to me then what is the difference between us.
Sridhar Bhaskarla
Honored Contributor

Re: Need to know how the system shows your last sucessful and un-sucessful login time.

HI,

It's the 'login' process that displays this information if the system is trusted. It gets the information from 'btmp|wtmp' files under /var/adm/ directory.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Need to know how the system shows your last sucessful and un-sucessful login time.

I don't think you cannot change that behaviour. '/usr/bin/login' that runs when a user logs in will display last successful and unsuccessful logins if the system is trusted.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Need to know how the system shows your last sucessful and un-sucessful login time.

*** I don't think you can change that behaviour*** Fat finger.

-Sri
PS: 0 points pls.
You may be disappointed if you fail, but you are doomed if you don't try
Amruth
Regular Advisor

Re: Need to know how the system shows your last sucessful and un-sucessful login time.

I do agree with you man.

Regards,
AM
If i am doing the same way you are doing to me then what is the difference between us.
MarkSyder
Honored Contributor

Re: Need to know how the system shows your last sucessful and un-sucessful login time.

How about putting two lines in the user's .profile:

last|grep `whoami`|head -2
lastb|grep `whoami`|head -1

The reason for head -2 on the last command is that head -1 would only show you the current login.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing