save commands history.

joe joe at idiglobal.com
Tue Mar 16 14:20:24 UTC 2004


Ed Wilts wrote:
> 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....
> 
True, I didn't know how linux savvy of a user he was dealing with. Ours 
wasn't and this worked for us.





More information about the redhat-list mailing list