save commands history.

Ed Wilts ewilts at ewilts.org
Tue Mar 16 01:34:51 UTC 2004


On Mon, Mar 15, 2004 at 11:43:34AM -0700, joe wrote:
> We had a user that kept editing his history file so we changed the 
> /etc/profile script to email us a copy of it everytime he logs in. You 
> could also copy it, but if he logs in again before you look at it, he 
> could override the copy.
> 
> Try adding this to your /etc/profile script. This assumes they use bash.
> 
> if [ "$USER" = "whoever" ]
> then
>   mail admin at yourdomain.com < /home/whoever/.bash_history
> fi

And what prevents him from clearing the log in his logout script?
You'll just get a nice empty file mailed to you every time he logs
in....

-- 
Ed Wilts, Mounds View, MN, USA
mailto:ewilts at ewilts.org
Member #1, Red Hat Community Ambassador Program





More information about the redhat-list mailing list