Ad Widget

Collapse

User permissions for UserParameter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NotTheFace
    Junior Member
    • Feb 2012
    • 10

    #1

    User permissions for UserParameter

    Hi,

    I have a custom UserParameter which needs to be run as root. Is there any way to change the user that check runs as, for only that check. I'd rather not have the agent itself run as root. Or is this something best fixed at the OS level.

    Thanks in advance,
  • JBo
    Senior Member
    • Jan 2011
    • 310

    #2
    Hi,

    Originally posted by NotTheFace
    I have a custom UserParameter which needs to be run as root. Is there any way to change the user that check runs as, for only that check. I'd rather not have the agent itself run as root. Or is this something best fixed at the OS level.
    You can use sudo to run a command as root.
    In zabbix_agentd.conf, replace:
    Code:
    UserParameter=my_parameter, my_command
    with:
    Code:
    UserParameter=my_parameter, sudo my_command
    In /etc/sudoers, add:
    Code:
    zabbix  ALL=NOPASSWD: my_command
    Regards,
    JBo

    Comment

    • NotTheFace
      Junior Member
      • Feb 2012
      • 10

      #3
      Thanks, but annoyingly the Solaris machine doesn't have sudo installed. I guess then that the correct fix is something at the OS level rather than internal of Zabbix.

      Thanks

      Comment

      Working...