Skip to content

Instantly share code, notes, and snippets.

@gionn
Last active October 6, 2015 05:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gionn/2941287 to your computer and use it in GitHub Desktop.
Save gionn/2941287 to your computer and use it in GitHub Desktop.
Nagios/Icinga: "Warning: This plugin must be either run as root or setuid root."

Nagios: plugins needing root privilege

the check_dhcp, check_icmp and maybe others plugins require root privileges to run, because of the low-level packet mangling that they perform. but, in the interest of the "safe default", these plugins will not be installed with the suid bit set. there are two recommended ways about overriding this on your system:

  • set the suid bit with dpkg-statoverride:

dpkg-statoverride --update --add root nagios 4750 $plugin

where $plugin is the specific plugin you want to grant such privileges.

  • use sudo to grant the permissions and modify your plugin config

of these two, the first is recommended because it's the simplest and has the same effect as the second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment