added sudo rule to allow zabbix to execute smartctl
This commit is contained in:
parent
ddf6abe85f
commit
4dc55a82c9
1 changed files with 13 additions and 0 deletions
|
|
@ -22,6 +22,19 @@ in
|
|||
pkgs.smartmontools
|
||||
];
|
||||
users.users.zabbix-agent.extraGroups = [ "systemd-journal" ];
|
||||
|
||||
#allow zabbix-agent to run smartctl
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "zabbix-agent" ];
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.smartmontools}/bin/smartctl";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
# vim: set et ts=2 sw=2 ai:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue