Please login or register. May 20, 2018, 09:40:00 AM

Author Topic: bash not send log to syslog  (Read 1046 times)

0 Members and 1 Guest are viewing this topic.

sobic

  • Jr. Member
  • **
  • Posts: 5
  • Karma: +0/-0
bash not send log to syslog
« on: November 02, 2017, 06:02:58 AM »
I installed the bash(http://download.aixtools.net/tools/archive/aixtools.gnu.bash.4.4.12.1.I) and make the adjustments as described on the page(http://www.aixtools.net/index.php/bash), but the data does not appear in the file /tmp/bash_history.out.
Is this option accurately enabled this feature?

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1075
  • Karma: +0/-0
Re: bash not send log to syslog
« Reply #1 on: November 02, 2017, 10:58:05 AM »
Well, it should send to syslog, but I'll have to check my instructions.

Please send the line from /etc/syslog.conf.

Note - something that may "go wrong" is if the syslog output file does not exist before you start or refresh the syslogd (stopsrc -s syslogd; startsrc -s syslogd) || refresh -s syslogd

HOWEVER - I see my notes were when I tested bash-4.3.X - I'll double check with bash-4.4

Michael

sobic

  • Jr. Member
  • **
  • Posts: 5
  • Karma: +0/-0
Re: bash not send log to syslog
« Reply #2 on: November 02, 2017, 11:38:34 AM »
*.emerg;*.alert;*.crit;*.err;*.warning;*.notice;*.info;*.debug  @10.0.0.40
user.info               /tmp/bash_history.out     rotate time 1d

in the file, I see entries of my tests with static routes, but I do not see entries from bash:

cat /tmp/bash_history.out
Nov  2 07:01:19 testhost user:info syslog: 127.0.0.1 host 10.0.0.211: gateway 127.0.0.1
Nov  2 07:04:25 testhost user:info syslog: newroute: 10.0.0.211 host 10.0.0.211

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1075
  • Karma: +0/-0
Re: bash not send log to syslog
« Reply #3 on: November 02, 2017, 11:51:57 AM »
You were correct. I had forgottten to edit/define the variable SYSLOG_HISTORY - so the details were never begin written.

Repackaged as aixtools.gnu.bash-4.4.12.2 at http://download.aixtools.net/tools/gnu/aixtools.gnu.bash.4.4.12.2.I

Thanks for reporting!

root@x064:[/data/prj/gnu/bash/bash-4.4.12]cat /var/log/bash/history.log
Nov  2 11:37:57 x064 user:info ./bash[188558]: HISTORY: PID=188558 UID=0 ls -l

root@x064:[/data/prj/gnu/bash/bash-4.4.12]tail -1 /etc/syslog.conf
user.info       /var/log/bash/history.log       rotate size 1m files 10


sobic

  • Jr. Member
  • **
  • Posts: 5
  • Karma: +0/-0
Re: bash not send log to syslog
« Reply #4 on: November 03, 2017, 02:13:47 AM »
It works now. Thank you very much for your work.