Sudo problem for one particular script

Hello,

I created a bash script on a server to monitor RAID health. The script is one of several bash scripts that can be monitored from the Icinga server. However, when I set up monitoring for this script in the exact same way as all the other scripts, the plugin output states:

===
We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. sudo: no tty present and no askpass program specified

Is there any reason why the Icinga server would fail to connect to this script when it’s able to connect to other scripts on the same server?

Please advise.

Thanks,

Mark

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things: #1) Respect the
privacy of others. #2) Think before you type. #3) With great power comes
great responsibility.
sudo: no tty present and no askpass program specified

So, a pretty standard sudo error/warning message…

Is there any reason why the Icinga server would fail to connect to this
script when it’s able to connect to other scripts on the same server?

Please advise.

  1. Please show us your sudoers file (or at least the parts which you believe
    are relevant to running these scripts).

  2. Please also give us more details of the “several bash scripts” you have
    written:

a) are they all in the same directory on the monitored server?

b) do they all have the same ownership and permissions?

c) what are the filenames of the scripts (including the one for checking RAID)?

  1. What is the username you are telling Icinga to run these scripts under?

  2. What is the output on a monitored server if you run the RAID monitoring
    script as that user (not via Icinga):

i) from the command line

ii) remotely via SSH?

Antony.

1 Like

Hello,

The problem was resolved. The “Run on Agent” field was set to “NO” when it should have been set to “Yes”. Thanks nevertheless for trying to help me with this problem.