Ad Widget

Collapse

sudo: no tty present and no askpass program specified

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slence
    Member
    • Nov 2014
    • 41

    #1

    sudo: no tty present and no askpass program specified

    Hi,

    I'm trying to get the "Result of "Detect operating system" and have the following error:

    - sudo: no tty present and no askpass program specified

    I've try to put zabbix user in /etc/sudoers , but the error still remain.

    After put the user there, i've restarted the agent.

    I've other graphs that don't have data, says "no data"

    Can someone help me?

    Thanks.
  • kustodian
    Member
    • Oct 2012
    • 33

    #2
    Try to comment out the following line in /etc/sudoers so it looks like this:
    Code:
    #Defaults       requiretty

    Comment

    • slence
      Member
      • Nov 2014
      • 41

      #3
      hi,

      thanks for you reply.

      I don't have that line in sudoers :\

      !

      Comment

      • kustodian
        Member
        • Oct 2012
        • 33

        #4
        Originally posted by slence
        hi,

        thanks for you reply.

        I don't have that line in sudoers :\

        !
        What OS are you using? Have you searched for that line without '#'?

        Comment

        • slence
          Member
          • Nov 2014
          • 41

          #5
          hi:

          The SO:

          Distributor ID: Ubuntu
          Description: Ubuntu 12.04.5 LTS
          Release: 12.04
          Codename: precise


          I've searched for that line and nothing.

          Comment

          • kustodian
            Member
            • Oct 2012
            • 33

            #6
            Then it's because you /etc/sudoers file isn't correctly set for the user which is running zabbix agent. Could you please paste the sudoers line for the zabbix agent user?

            Comment

            • lagos.mc
              Junior Member
              • Jan 2011
              • 6

              #7
              Trying

              cat /etc/sudoers

              Sample:

              %zabbix ALL = (ALL) NOPASSWD: command

              Regards,

              Comment

              • Farmhouse Geek
                Junior Member
                • Mar 2015
                • 2

                #8
                Resolved

                I'm using the 2.4 appliance and was getting this error, I've resolved it:

                The issue was the Zabbix server is actually running as user zabbixs and not zabbix (the agent user)

                You can add teh following to /etc/sudoers or create /etc/sudoers.d/zabbixs with the following

                zabbixs ALL=(ALL) NOPASSWD: /usr/bin/nmap -O *

                Once that was in place OS detection worked like a champ.

                Comment

                • jstefano
                  Member
                  • Sep 2015
                  • 30

                  #9
                  The issue was the Zabbix server is actually running as user zabbixs

                  Originally posted by Farmhouse Geek
                  I'm using the 2.4 appliance and was getting this error, I've resolved it:

                  The issue was the Zabbix server is actually running as user zabbixs and not zabbix (the agent user)

                  You can add teh following to /etc/sudoers or create /etc/sudoers.d/zabbixs with the following

                  zabbixs ALL=(ALL) NOPASSWD: /usr/bin/nmap -O *

                  Once that was in place OS detection worked like a champ.
                  Thank you!!! This solved my problem!!!

                  Jan

                  Comment

                  Working...