Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tracking Commands used at command prompt in AIX

Status
Not open for further replies.

azrinakil

IS-IT--Management
Nov 13, 2002
2
MY
Dear Unix gurus,
Is there any way to track commands used by users at command prompts (AIX machine)? Can it be kept in a log that is not accesible by the users? We are using /bin/sh.

regards
aixman
 
Try `strings .sh_history` in the users home directory. The only user that can see this file is root

Cheers
 
root is not the only file to be able to see the shell history file; the user can edit and delete it themselves if they want to as it will be owned by them. The only difference is that since it is a dot file, it will only show up when using the -a option to ls.

Dave
 

And if the user turns off history nothing will be written to the file.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
you can modify the $HISTFILE variable to be whatever you would like, but as for keeping the user away from it, not sure about that, perhaps do some sort of output duplication. I set my $HISTFILE var like this:

export HISTFILE=~myhome/shist/.sh_history.`hostname`

which lets me have a separate history on each server. my home is in a nfs-mount and generally accessible on all of our machines. perhaps you can do something creative with a nfs-mounted history directory.

IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top