[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" ]
  mail admin yourdomain com < /home/whoever/.bash_history

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 ?


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


redhat-list mailing list

mailto:redhat-list-request redhat com?subject=unsubscribe



Manuel Aróstegui Linux user 200896

Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...

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