Sudo updated and now sudo scripts fail: NRPE: Unable to read

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by jdalrymple »

gormank wrote:I guessed the debugging was to be done on the nagios server since rsyslog isn't used on monitored servers...
Skip all the rsyslog nonsense and just enable debugging on the monitored server (nrpe.cfg) then look for related entries in /var/log/messages.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by gormank »

I already did that and posted the results:

Sep 10 21:18:14 txslm2mlapp002 nrpe[21169]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by tgriep »

The following line isn't in my sudoers file.

Code: Select all

Defaults requiretty
Maybe the sudo upgrade has an issue with this line overriding the other line.
Try removing that and see if the works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by jdalrymple »

gormank wrote:I already did that and posted the results:

Sep 10 21:18:14 txslm2mlapp002 nrpe[21169]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
My apologies - I misunderstood your statement.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by gormank »

I commented the following 2 lines, tested and no change.
Defaults requiretty
Defaults !visiblepw
I then commented the last line and tested. Still no change...
Defaults:nagios !requiretty
I added the following, tested and no change.
nagios ALL=(ALL) NOPASSWD: ALL
Removed the changes to put things back to original.

I did a tail -f /var/log/audit/audit.log while running the failing check, and nonfailing ones. Nothing logged.

What's next?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by ssax »

What is the output when you run these commands on it?

Code: Select all

su - nagios
sudo /usr/local/nagios/libexec/check_vxvm
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by ssax »

Woops, sorry, looks like you already did that in your first post.

Please PM or attach your entire /etc/sudoers and entire nrpe.cfg
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by gormank »

Yep, the commands work fine as the nagios user.
Files attached...

I checked to see is selinux might be the denying but only see 2 entries that appear not to be related.
sealert -a /var/log/audit/audit.log

I guess next on my end is checking to see if its the AD integration, once I figure out how.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by lmiltchev »

Can you try commenting out the "Defaults requiretty" line (line 56), so that it would look like this:

Code: Select all

#Defaults    requiretty
Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Sudo updated and now sudo scripts fail: NRPE: Unable to

Post by gormank »

No change.
Locked