How To Log Bash History to Syslog
jablonskis.org
How To Log Bash History to Syslog
1–10 of 14 posts
Re: How To Log Bash History to Syslog
#2Re: How To Log Bash History to Syslog
#3What does history -a do? Seems to write the history to disc and not produce something to pipe into logger. How does this work?
Re: How To Log Bash History to Syslog
#4What does history -a do? Seems to write the history to disc and not produce something to pipe into logger. How does this work?
Re: How To Log Bash History to Syslog
#5What does history -a do? Seems to write the history to disc and not produce something to pipe into logger. How does this work?
With bash putting a command in I've never used it, but I assume >() uses a command as though it were a writable file. So instead of history -a file writing to file, he does history -a >(logger) to write to the logger command. Seems pretty clever to me.
Re: How To Log Bash History to Syslog
#6Re: How To Log Bash History to Syslog
#7Re: How To Log Bash History to Syslog
#8i 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.
These tend to be the same folks who think that using "sudo" is a waste of time and serves no purpose. Not that I've ever accidentally rebooted a box, of course. :P
Re: How To Log Bash History to Syslog
#9Re: How To Log Bash History to Syslog
#10What does history -a do? Seems to write the history to disc and not produce something to pipe into logger. How does this work?
It appends the "new" history lines to a $HISTFILE by default, unless other file is specified.