Ad Widget

Collapse

Zabbix agent permission to mount device

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • joaopaulob
    Junior Member
    • Jan 2018
    • 2

    #1

    Zabbix agent permission to mount device

    Hi,

    I created a custom trigger that execute a script (mount_pendrive.sh) to mount a pendrive and write some files.
    The problem the mount command always return code error 1 (no permission to mount).
    I've already add the following entry to the /etc/sudoers but doesn't work.

    HTML Code:
    zabbix ALL=(ALL) NOPASSWD: /usr/bin/mount_pendrive.sh

    any ideia?
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Are you executing with sudo at the beginning of the command line?

    Comment

    • joaopaulob
      Junior Member
      • Jan 2018
      • 2

      #3
      Hi,

      I had to add:

      zabbix ALL=(ALL) NOPASSWD: /bin/mount
      zabbix ALL=(ALL) NOPASSWD: /bin/umount

      That worked

      Comment

      Working...