You are only browsing one thread in the discussion! All comments are available on the post page.

Return

spencer ,

You can create sudoers rules that allow users to run specific commands with root privileges.

Create a file in /etc/sudoers.d with the contents:

zabbix ALL=(ALL:ALL) NOPASSWD: /sbin/zfs status

This will grant the zabbix user the ability to run /sbin/zfs status as root without a password. However, they will need to run the command with sudo. If you want to allow that user to run additional commands, just add them to the end of that line like this:

zabbix ALL=(ALL:ALL) NOPASSWORD: /sbin/zfs status, /sbin/zpool status

leaskovski OP ,
@leaskovski@kbin.social avatar

Thats a better way! I didn't realise the sudoers could be restricted to commands! Thanks

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • All magazines