Page 2 of 2

Re: Command line check and GUI not matching

Posted: Mon Nov 17, 2014 11:50 am
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!

Re: Command line check and GUI not matching

Posted: Mon Nov 17, 2014 2:06 pm
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)

Re: Command line check and GUI not matching

Posted: Mon Nov 17, 2014 2:48 pm
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?

Re: Command line check and GUI not matching

Posted: Mon Nov 17, 2014 4:13 pm
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?

Re: Command line check and GUI not matching

Posted: Mon Nov 17, 2014 5:08 pm
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] ?