1827457 Members
5449 Online
109965 Solutions
New Discussion

Login Check question

 
SOLVED
Go to solution
Robie Lutsey
Frequent Advisor

Login Check question

Hey guys! I have a quick question. I know there is an HP-UX command to find out the login times for users for like the last 100 logins or something. I'm sure one of you knows what I am talking about. Thanks guys!!
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Login Check question

lastb is what you are looking for. Man lastb for details.
If it ain't broke, I can fix that.
John Carr_2
Honored Contributor

Re: Login Check question

Hi

try command last

John.
John Carr_2
Honored Contributor

Re: Login Check question

Hi

try command last

or

last | grep username

John.
John Carr_2
Honored Contributor

Re: Login Check question

Cliffard

the difference between last and lastb is that the later is for bad login attempts not actuall succesful logins.

John
S.K. Chan
Honored Contributor

Re: Login Check question

Depends on the size of /var/adm/wtmp and how frequent it's been re-cycled, you may not get up to the last 100.
# /usr/bin/last | more
Darrell Allen
Honored Contributor

Re: Login Check question

Hi,

Good answers. Note that if wtmp doesn't exist, last will tell you so. You'll have to create it if you want login info recorded. Also, wtmp will grow without a limit so you need to truncate it periodically.

man last and wtmp for more info.

Oh yeah, "last -100" will list the last 100 logins provided wtmp has that much info recorded. You can also use "last -100 loginid" for the last 100 logins of loginid.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Robie Lutsey
Frequent Advisor

Re: Login Check question

You guys rock.... Thanks.