Hi Zabbix team and users,
I have noticed several mistakes in Zabbix 1.8 manual section 7.3 Remote commands.
1. The remote command to execute Apache should be "host:sudo /etc/init.d/apache restart". Without "sudo" Zabbix agent would fail to start Apache service, as this operation requires root privileges, while Zabbix agent runs as an unprivileged user.
2. The line in /etc/sudoers should be "zabbix ALL=(ALL) NOPASSWD: /etc/init.d/apache restart". Note the "NOPASSWD" keyword, without it sudo would have asked password, and the remote command would fail to execute.
3. The "requiretty" option should be disabled in /etc/sudoers, i.e. put "#" sign in the beginning of "Defaults requiretty" line. Otherwise remote sudo would fail complaining on the lack of a tty.
P.S. Tested in RHEL/CentOS 5.
I have noticed several mistakes in Zabbix 1.8 manual section 7.3 Remote commands.
1. The remote command to execute Apache should be "host:sudo /etc/init.d/apache restart". Without "sudo" Zabbix agent would fail to start Apache service, as this operation requires root privileges, while Zabbix agent runs as an unprivileged user.
2. The line in /etc/sudoers should be "zabbix ALL=(ALL) NOPASSWD: /etc/init.d/apache restart". Note the "NOPASSWD" keyword, without it sudo would have asked password, and the remote command would fail to execute.
3. The "requiretty" option should be disabled in /etc/sudoers, i.e. put "#" sign in the beginning of "Defaults requiretty" line. Otherwise remote sudo would fail complaining on the lack of a tty.
P.S. Tested in RHEL/CentOS 5.
Comment