- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Monitoring user's act
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2001 11:59 PM
10-27-2001 11:59 PM
Monitoring user's act
I want to wirte a script to Monitoring user's act,including every command was the user used until log out.
I hope that script can generate or redirect to a file as i specified.
Which expert can help me to write it?
Thanks.
Jackie Xu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 03:14 AM
10-28-2001 03:14 AM
Re: Monitoring user's act
Hope this helps.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 04:01 AM
10-28-2001 04:01 AM
Re: Monitoring user's act
How to do,please?
Jacie Xu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 05:16 AM
10-28-2001 05:16 AM
Re: Monitoring user's act
export HISTFILE=/tmp/.sh_history.$LOGNAME
This way, when the user logs in, the file /tmp/.sh_history.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 05:36 AM
10-28-2001 05:36 AM
Re: Monitoring user's act
You might consider establishing a 'script' file at the end of the user's $HOME/.profile:
...
script userlog
See the man pages for 'script' for more details.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 06:45 AM
10-28-2001 06:45 AM
Re: Monitoring user's act
putting things in user's profile can be overwritten by the users. A solution would be to put it in /etc/profile.
E.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 06:52 AM
10-28-2001 06:52 AM
Re: Monitoring user's act
and putting it in the /etc/profile will result in the file to be created with the user as its owner thus writtable by user.
E.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 07:31 AM
10-28-2001 07:31 AM
Re: Monitoring user's act
Obviously, the shell history file and my simple suggestion of capturing a session's dialog into a file leave the control of those files in the user's hands. The user can easily remove or null the files used to collect the data.
If you really want to collect and monitor accounting information you need to setup system accounting functionality.
Begin by looking at the man pages for 'last' (man 1 last) and 'acct' (man 1M acct). Have a look too, via:
http://docs.hp.com/
There is also an older white paper in the Technical Knowledge Base (#OALWP06950320) that provides a good overview of accounting in general.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 01:46 PM
10-28-2001 01:46 PM
Re: Monitoring user's act
The suggestion of setting up user
accounting is of course the best
method if you want to capture user's
commands etc. This is about the only
way you monitor without the risk of
the user examining and overwriting files.
Just be aware that if you start using
accounting on all users or even a fair
number your system will consume disk
space, so be aware of this before
you start.
HTH
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2001 03:17 PM
10-28-2001 03:17 PM
Re: Monitoring user's act
In most of the cases, whether monitoring
or not, it makes sense to set the history
for the user profiles:
HISTFILE=$HOME/.sh_history
HISTSIZE=1024 <- (Size in bytes. Default is 128 bytes; you can increase or
decrease it , depending on the disk space,
number of users , necessity )
export HISTFILE HISTSIZE
The above commands is for Posix shell.
For C shell, you would need to use the
"set" syntax.
The history file is not protection
against users who want to cover their tracks,
since it can be edited. The question arises,
what's the motivation for the Monitoring?
In all the production boxes i handle, we
don't do that level of monitoring. If it
is a necessity for you, you would need
to enable the accounting option. (check man acct), but that consumes space and resources.
-raj