i would be a bit worried about accidental passwords getting into the syslog. i have typed passwords out of habit when they were not required or before a remote system responds only to have the password end up as a bash command. i then have to go into the .bash_history file and remove them.
This is a very cool solution!<p>Unfortunately, it does not log the output of the command. For those that need to log absolutely everything, check out:<p><a href="https://github.com/jpschewe/rootsh" rel="nofollow">https://github.com/jpschewe/rootsh</a><p>rootsh is a wrapper shell for bash and logs everything.
there is also a library intended to do this.
snoopy logger, can easily be preloaded on linux to make it work without changing the existing applications<p><a href="https://github.com/renard/snoopylogger" rel="nofollow">https://github.com/renard/snoopylogger</a>