Ad Widget

Collapse

remote command permissions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • radamand
    Member
    • Aug 2008
    • 89

    #1

    remote command permissions?

    Is there any way to get a remote command to execute as a different user WITHOUT using sudo?

    I have tried running the agentd as root but the remote command still tries to execute as 'zabbix'.
  • Murilex
    Senior Member
    • Nov 2009
    • 124

    #2
    Hi Radamand.

    Once I've heard of a problem similar to yours and the solution were to use the following entries in /etc/sudoers file:

    Code:
    # Cmnd alias specification
    Cmnd_Alias ZABBIXCMD = PUT_HERE_YOUR_REAL_COMMAND_FOLLOWED_BY_PARAMETERS_IF_EXIST
    # ZABBIX special privileges
    zabbix  ALL=NOPASSWD:   ZABBIXCMD
    In zabbix_agentd.conf file you will have to use something like this:

    UserParameter=YOUR_COMMAND_ALIAS,sudo YOUR_REAL_COMMAND_FOLLOWED_BY_PARAMETERS_IF_EXIST

    This way, zabbix agent will be able to run ZABBIXCMD with special privileges and without be issued with a password.
    Last edited by Murilex; 03-09-2010, 03:20.

    Comment

    • radamand
      Member
      • Aug 2008
      • 89

      #3
      let me try again, "WITHOUT using sudo".

      Comment

      Working...