1833827 Members
2161 Online
110063 Solutions
New Discussion

Old Users on HP-UX 11.0

 
SOLVED
Go to solution
Brian Ham
Advisor

Old Users on HP-UX 11.0

Is there an easy way to check when users last logged in to a HP-UX system? Perhaps a report of last login?
8 REPLIES 8
Jeffrey Davis_1
Frequent Advisor
Solution

Re: Old Users on HP-UX 11.0

Hi, how about the 'last' command. Check it out.
S.K. Chan
Honored Contributor

Re: Old Users on HP-UX 11.0

# last | more
==> "last" command queries the /etc/utmp and /etc/wtmp file

someone_4
Honored Contributor

Re: Old Users on HP-UX 11.0

hi,
wtmp and btmp.
you can turn the logging on by doing the commands
last
and
lastb

There is alost a last -R option that tells you where they come from. If you have allot of activity watch the logs they do grow.

Richard
Helen French
Honored Contributor

Re: Old Users on HP-UX 11.0

Hi Brian:

try these commands:

# last
# lastb

Check the man pages for details. These commands takes inputs from /var/adm/wtmp (record for all login and logouts) and /var/adm/btmp (record for bad logins)

HTH,
Shiju
Life is a promise, fulfill it!
MANOJ SRIVASTAVA
Honored Contributor

Re: Old Users on HP-UX 11.0

Hi Brian

Do a last | more , this will give users logging in decending order .


Manoj Srivastava
Roger Baptiste
Honored Contributor

Re: Old Users on HP-UX 11.0

hi,

last command is one option. You can also look at /var/adm/syslog/syslog.log file for login connections.

HTH
raj
Take it easy.
hpuxrox
Respected Contributor

Re: Old Users on HP-UX 11.0

I always use,

last -R

So I can see where they are comming from.
Mark Fenton
Esteemed Contributor

Re: Old Users on HP-UX 11.0

Brian,

last should work out of the box. lastb may need a kick --
cd to /var/adm/syslog and touch btmp if it doesn't exist. This will queue the system to start recording failed login attempts.

Because btmp may contain passwords or other details of a user account, it is a good idea to ensure it has r/w permissions for owner (root) only.

Best regards.