1844011 Members
3611 Online
110226 Solutions
New Discussion

HISTFILE

 
Olebile Molefi
Occasional Contributor

HISTFILE

How do I create a histfile for particular users so as I can have means of auditing?
4 REPLIES 4
Pedro Sousa
Honored Contributor

Re: HISTFILE

Hi Olebile!
just add this to the .profile from each user:
HISTFILE=$HOME/.sh_history
export HISTFILE

good luck.
Stefan Schulz
Honored Contributor

Re: HISTFILE

Put the following in the profile (.dtprofile or .profile) of your users:

HISTFILE=/directory/.sh_history.$LOGNAME
export HISTFILE

Where directory is any directory you want. You could place all histfiles of all users in one directory. Problem is, that the location for your histfile should be no NFS mount. Thats why i put the histfiles in the /tmp directory locally.


Hope this helps. Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Mark Mitchell
Trusted Contributor

Re: HISTFILE

put this in the etc/profile for all users

HISTFILE=$HOME/.sh_history
export HISTFILE