Re: save commands history.

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

 



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@xxxxxxxxxxxxxx < /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.


-- 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