monitor/stream bash_history

Nikki Wilson asked:

is there a way to stream/monitor/log bash history to prevent the ability of someone hiding stuff?

would like to monitor and know every little thing that happens so that the list of commands and edited files can be checked and watched.

Would rsync be an ideal way or is there an actual program that can be installed.

My answer:


No you can’t, primarily because it’s trivial for any user to prevent bash from writing the history file in the first place.

If you really want to audit system activity, use the auditd daemon; that’s what it’s for.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.