Page 1 of 2

Nagios XI Active Directory Auth, receiving error upon login

Posted: Thu Mar 21, 2013 11:43 am
by jkeith
I've recently installed Nagios XI and things have been going great so far. One issue I've run in to is LDAP/Active Directory authentication. I've tried using both the AD and LDAP components available on the exchange and neither seem to work.

If I install/configure the LDAP component using the web GUI, nothing happens. Upon logging in using my domain credentials, it says bad username/password. So I know it's not working, just not sure why.

If I install/configure the AD component using the web GUI, nothing happens, very similar to the LDAP component. If I ssh in to my Nagios XI box and configure the following file (/usr/local/nagiosxi/html/includes/components/active_directory/adLDAP/adLDAP.php) by hand, including elevated LDAP service account credentials, I receive the following error:
exception 'adLDAPException' with message 'Bind to Active Directory failed. Check the login credentials and/or server details. AD said: Invalid credentials' in /usr/local/nagiosxi/html/includes/components/active_directory/adLDAP/adLDAP.php:383 Stack trace: #0 /usr/local/nagiosxi/html/includes/components/active_directory/adLDAP/adLDAP.php(341): adLDAP->connect() #1 /usr/local/nagiosxi/html/includes/components/active_directory/active_directory.inc.php(394): adLDAP->__construct(Array) #2 /usr/local/nagiosxi/html/login.php(300): active_directory_component_check_authentication('process_auth_in...', Array) #3 /usr/local/nagiosxi/html/login.php(356): check_login_credentials('jkeith', '********', Array, Array) #4 /usr/local/nagiosxi/html/login.php(61): do_login() #5 /usr/local/nagiosxi/html/login.php(31): route_request() #6 /usr/local/nagiosxi/html/login.php(2): sg_load('100590ECD861869...') #7 {main}
I've tried multiple domain admin accounts, service accounts, base DN's, domain controllers, really everything I can think of.

Any ideas?

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Thu Mar 21, 2013 12:14 pm
by sreinhardt
Have you created the associated accounts for the users that you wish to log in as? AD authentication does not by default allow anyone in AD to login, as nagios would have no way to know who has what rights and hosts to view.

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Thu Mar 21, 2013 12:18 pm
by jkeith
Sure have, multiple accounts. :(

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Thu Mar 21, 2013 1:20 pm
by abrist
jkeith wrote:Sure have, multiple accounts. :(
The user names of the nagios XI users must be *exactly* the same as their ldap/ad user names. Any hints in the logs on the AD/LDAP auth box?

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Mon Mar 25, 2013 10:12 am
by jkeith
I understand and I assure you, they are exactly the same usernames.

I'll check the LDAP logs but if they don't provide any hints, there is nothing else I can check? Seems like this should "just work" and it most definitely isn't. :|

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Mon Mar 25, 2013 11:22 am
by sreinhardt
One thing I would be sure to do, is not use the LDAP plugin with AD, and vice versa. While it may work, they are designed for different systems (AD and Bind). I would also suggest against manually modifying the php script holding your credentials. Are you using multiple DCs? Have you specified a base DN other than users?

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Mon Mar 25, 2013 11:43 am
by jkeith
So I've used both methods... would you suggest me focusing on "Active Directory Integration" rather than LDAP?

You're suggesting against manually modifying the PHP script. Since the web GUI doesn't allow me to add credentials, is it okay for me to add credentials manually to the PHP script?

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Mon Mar 25, 2013 12:25 pm
by jkeith
I've restored the PHP script back to default. I've only added my ldap lookup account and still the error persists. If I remove the ldap lookup account, AD authentication is bypassed it seems because it immediately states my "invalid password" as it's attempting to authenticate locally.

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Mon Mar 25, 2013 3:30 pm
by abrist
Is your auth environment AD-based (AD) or Bind-based (ldap/bind)?

Re: Nagios XI Active Directory Auth, receiving error upon l

Posted: Tue Mar 26, 2013 6:37 pm
by jkeith
Only AD.