v-zhuravlev / zbx-smartctl

Templates and scripts for monitoring disks health with Zabbix and smartmontools
https://share.zabbix.com/storage-devices/smartmontools/smart-monitoring-with-smartmontools-lld
GNU General Public License v3.0
245 stars 127 forks source link

Small change in the sudoers file for Ubuntu 16.04 #145

Closed mhaamann closed 1 year ago

mhaamann commented 4 years ago

I had applied the default sudoers file as per installation instructions.

From the /var/log/auth.log i got the following error:

sudo:   zabbix : command not allowed ; TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/local/sbin/smartctl -i -H -A -l error -l background /dev/sdb -d sat

Note that the location of smartctl (/usr/local/sbin/smartctl) is different from the provided sudoers file.

The fix was to add the following lines to the sudoers file

zabbix ALL= (ALL) NOPASSWD: /usr/local/sbin/smartctl