1837016 Members
2229 Online
110111 Solutions
New Discussion

users login

 
Sanjiv Sharma_1
Honored Contributor

users login

Hi,

I have a rp8400 with HP-UX 11.11.

How can I findout who all users has login to this server for the last 3 days and also at what time and what all jobs has been done by them?

Thanks,
Raje.
Everything is possible
5 REPLIES 5
Patrick Chim
Trusted Contributor

Re: users login

Hi,

You can use 'last' and 'lastb' command for your need. Just man last will give you the options to fulfill your requirement !

It will read two binary file /var/adm/wtmp and /var/adm/btmp to gather the login information. You can housekeep this 2 files so that you will have a daily login statistics report !

Regards,
Patrick
Michael Tully
Honored Contributor

Re: users login

Hi,

You can use the 'last' command to find what users have logged in the last three days as long your 'wtmp' file has bee going for this long.
As far as to what commands users are running, you could look into their .sh_history files in their home directory, but this won't tell you when. The only proper way is to turn on system auditing, and this takes valuable system resources and disk space to log it. If you haven't got this turned on, then it does not work retrospective.

Regards
Michael
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: users login

you can use the 'last' command.

Also you can


#cp /var/adm/wtmp /tmp/wtmp

# /usr/sbin/acct/fwtmp < /tmp/wtmp > /tmp/wtmp.ascii

In the case of monitoring the jobs you should enable auditing on the system.

Thanks


open the ascii file and check out the logins.
Michael Tully
Honored Contributor

Re: users login

In regards to what users are doing and be able to log it, this discussion was interesting.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xde3ac4c76f92d611abdb0090277a778c,00.html
Anyone for a Mutiny ?
Paula J Frazer-Campbell
Honored Contributor

Re: users login

Hi

This will help:-

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x37857d4cf554d611abdb0090277a778c,00.html


Paula
If you can spell SysAdmin then you is one - anon