Operating System - HP-UX
1833433 Members
3090 Online
110052 Solutions
New Discussion

Can I get the full timestamp from btmp?

 
SOLVED
Go to solution
Gary Cooper_1
Esteemed Contributor

Can I get the full timestamp from btmp?

HP-UX 10.20
When I use listb to see the failed login attempts, it only gives the timestamp in:
DDD MMM dd hh:mm
Is it possible to get access to the year and also the second?

Also, the following is an extract from SecurityFocus Online (http://online.securityfocus.com/bid/3289/discussion):

"The version of 'login' shipped with HP-UX 10.26 does not record unsuccessful login attempts in 'btmp'. The btmp file is used to record bad logins."

Although I'm not using 10.26, I would be very interested to know the difference between "unsuccessful login attempts" and "bad logins"?

Thanks,

Gary Cooper
5 REPLIES 5
John Palmer
Honored Contributor

Re: Can I get the full timestamp from btmp?

Hi Gary,

btmp contains the binary date so you can get year and second but not with lastb.

You could try /usr/sbin/acct/fwtmp < btmp

fwtmp prints pretty much all information from a wtmp/btmp format file. You could use it to get the data and mybe awk to format it.

As to "unsuccessful login attempts" and "bad logins", I'd consider them to be the same thing.

Regards,
John
Robin Wakefield
Honored Contributor

Re: Can I get the full timestamp from btmp?

Hi Gary,

Try:

/usr/sbin/acct/fwtmp < btmp

- this gives you more date info.

Rgds, Robin
Gary Cooper_1
Esteemed Contributor

Re: Can I get the full timestamp from btmp?

The fwtmp tip is exactly what I wanted, but I'm still a little concerned by the comment on the Security Focus web site, that I won't be seeing the whole picture.

Comments appreciated.

Thanks,

Gary
S.K. Chan
Honored Contributor

Re: Can I get the full timestamp from btmp?

What the article might have been trying to say is that "bad login" means the login id that the user is using does not exist in the system whereby "unsuccessful login" means the userid is valid but the password authentication failed. Either way both will be recorded in btmp. Try login as a "bogus" login and a "valid" id with both given a wrong password and btmp will capture both. I do not know if this behavior is true or not in 10.26.
Robin Wakefield
Honored Contributor
Solution

Re: Can I get the full timestamp from btmp?