[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: save commands history.



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 yourdomain com < /home/whoever/.bash_history
fi






Manuel Aróstegui Ramirez wrote:
 --- Mohamed Kerbachi <Mohamed Kerbachi 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 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






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]