save commands history.

joe joe at idiglobal.com
Mon Mar 15 18:43:34 UTC 2004


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






Manuel Aróstegui Ramirez wrote:
>  --- Mohamed Kerbachi <Mohamed.Kerbachi at OTALGERIE.com>
> escribió: > Hello,
> 
>>Is there way to save the commands history of a user
>>in other place than $HOME where he can't delete it ?
>>
>>Thanks.
> 
> 
> Maybe you can change .bash_history permission and
> group in order to not allow the user removed it.
> 
> Look at man chmod, man chown and man chgrp
> 
> Cheers
> 
> 
>>
>>-- 
>>redhat-list mailing list
>>unsubscribe
>>
> 
> mailto:redhat-list-request at redhat.com?subject=unsubscribe
> 
>>https://www.redhat.com/mailman/listinfo/redhat-list 
> 
> 
> =====
> --
> 
> Manuel Aróstegui Linux user 200896
> 
> ___________________________________________________
> Yahoo! Messenger - Nueva versión GRATIS
> Super Webcam, voz, caritas animadas, y más...
> http://messenger.yahoo.es
> 
> 





More information about the redhat-list mailing list