Command line check and GUI not matching

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Command line check and GUI not matching

Post by sreinhardt »

Could you post the /etc/sudoers and /etc/sudoers.d/nagiosxi files? I have a feeling you are correct, that a duplicate entry is causing the issue. Let's have a look and see what needs to be changed!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
notverynick
Posts: 62
Joined: Wed Jun 13, 2012 8:47 am

Re: Command line check and GUI not matching

Post by notverynick »

Cheers, files attached, I have also attached the sudoers.old file I created at the start of this process.

(had to edit as I missed the extension warning. All files uploaded as .txt)
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: Command line check and GUI not matching

Post by lmiltchev »

I believe you are getting this error as you commented out line 110. Change it, so that it would look like this:

Code: Select all

User_Alias      NAGIOSXI=nagios
Save and exit. Did this fix your issue?
Be sure to check out our Knowledgebase for helpful articles and solutions!
notverynick
Posts: 62
Joined: Wed Jun 13, 2012 8:47 am

Re: Command line check and GUI not matching

Post by notverynick »

Sadly that's where I started.

I can revert back to the original sudoers and I get the duplicate alias error, the alias is defined in /etc/sudoers.d/nagiosxi and then again in the /etc/sudoers I assume that as the /etc/sudoers.d/nagiosxi is imported via the include BEFORE the alias definition in /etc/sudoers that's why the /etc/sudoers errors.

The state I'm in now (as per the attached) gives me no errors and I am able to sudo correctly, BUT my check script (in which I am using sudo) is now requireing the nagios user to provide a password, even though I seemingly explicitly say NOPASSWD in the sudoers file?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Command line check and GUI not matching

Post by abrist »

This is very odd - It must have something to do with check_hop. Maybe it is running another command that needs sudo. Can you open a ticket by emailing [email protected] ?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked