Re: save commands history.

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

 



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@xxxxxxxxxxxxxx < /home/whoever/.bash_history
fi






Manuel Aróstegui Ramirez wrote:
 --- Mohamed Kerbachi <Mohamed.Kerbachi@xxxxxxxxxxxxx>
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@xxxxxxxxxx?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




--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux