- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Command history
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
06-30-2003 06:36 AM
06-30-2003 06:36 AM
Command history
Sometimes it happens that a user did something and I want to see what commands he gave out from his terminal session but it's not listed in .sh_history or in similar file. Sometimes even happens that the history file is deleted.
A would appreciate any ideas...
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 06:38 AM
06-30-2003 06:38 AM
Re: Command history
Look into trusted system. I think you can audit a user's activities with it.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 06:39 AM
06-30-2003 06:39 AM
Re: Command history
script filename
in their .profile....
but this would capture all stdin stdout and stderr
you would have some large files on your system if you didn't clean them
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 06:49 AM
06-30-2003 06:49 AM
Re: Command history
Check whether HISTFILE is exported for all users. If its not exported then you cannot see the command history in .sh_history file.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 07:04 AM
06-30-2003 07:04 AM
Re: Command history
# man lastcomm
If you activate accounting do not forget to check the size of /var even extend it.
Kind regards,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 07:48 AM
06-30-2003 07:48 AM
Re: Command history
You could have their HISTFILE go to a folder other than their default home folder, one that they don't have priviledges to delete like /var/adm. That will not keep them from editing the files if that is what you think is happening.
I think Auditing is your best bet.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 07:53 AM
06-30-2003 07:53 AM
Re: Command history
...and that means that everybody gets 'trusted'. So you can count a space being chewed up, and the need to review these files.
Or, you can look into a third party software that allows you to record everything a person or persons does on a toggle on/off basis. That way you don't get the all or nothing effect of a trusted system.
We went with PowerBroker from Symark. We use it for spot monitory/checking of folks, and use the tools to set up customized root permissions (and record the activity).
Cause everyone..needs choices,
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 01:08 PM
06-30-2003 01:08 PM
Re: Command history
If you use trusted system it write all
what done in the system.
You can also use script command that will
save all what done in the prompt.
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2003 01:16 PM
06-30-2003 01:16 PM
Re: Command history
export HISTFILE=$HOME/.sh_history
Just to be sure, create the shell history file in every user's directory. Assuming (again) that all users have their HOME in the /home directory, do this one time:
umask 077
export PATH=/usr/bin
for MYHOME in /home/*
do
MYUSER=$(basename $MYHOME)
touch $MYHOME/.sh_history
chown $MYUSER $HOME/.sh_history
done
Note that if the users are doing something complicated like running an Xwindow emulator and using CDE to manage their screens, there are more steps required.
Bill Hassell, sysadmin