Unable to import users from LDAP

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RichardPopleVM
Posts: 5
Joined: Tue Jul 19, 2016 9:02 am

Unable to import users from LDAP

Post by RichardPopleVM »

Hi support - I'm unable to import LDAP users to NagiosXI - no users show up, screenshot attached.

nagios version: Nagios XI 5.3.4
Linux Distribution and version? CentOS Linux release 7.3.1611 (Core)
32 or 64bit? x86_64
VMware Image or Manual Install of XI? Manual
ldap version: OpenLDAP: slapd 2.4.40

Nothing gets added to:
/var/log/httpd/*error_log
during the attempt to import users.

I don't think it's a network issue as I get a successful response from
ldapsearch -h 10.176.134.65 xxxxxxxxxxxxxxxx
from the cli on the server hosting NagiosXI.

Please advise.

Thanks

Richard
You do not have the required permissions to view the files attached to this post.
Last edited by dwhitfield on Wed Dec 28, 2016 12:44 pm, edited 1 time in total.
Reason: removing profile for security purposes
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to import users from LDAP

Post by ssax »

Run this command to enable debugging:

Code: Select all

sed -i 's/\/\/ Otherwise check authentication/ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);/g' /usr/local/nagiosxi/html/includes/components/ldap_ad_integration/ldap_ad_integration.inc.php
Then run this tail command, replicate the blank screen, and then send me the entire output from the tail command:

Code: Select all

tail -f /var/log/httpd/*error_log

After you've done that, run this command:

Code: Select all

sed -i 's/ldap_read($this->ldapConnection, NULL/ldap_read($this->ldapConnection, ""/g' /usr/local/nagiosxi/html/includes/components/ldap_ad_integration/basicLDAP.php

Then run this tail command, replicate the blank screen, and then send me the entire output from the tail command:

Code: Select all

tail -f /var/log/httpd/*error_log

When you are done, revert the changes with these commands:

Code: Select all

sed -i 's/ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);/\/\/ Otherwise check authentication/g' /usr/local/nagiosxi/html/includes/components/ldap_ad_integration/ldap_ad_integration.inc.php
sed -i 's/ldap_read($this->ldapConnection, ""/ldap_read($this->ldapConnection, NULL/g' /usr/local/nagiosxi/html/includes/components/ldap_ad_integration/basicLDAP.php
RichardPopleVM
Posts: 5
Joined: Tue Jul 19, 2016 9:02 am

Re: Unable to import users from LDAP

Post by RichardPopleVM »

Requested output attached.
You do not have the required permissions to view the files attached to this post.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Unable to import users from LDAP

Post by dwhitfield »

Are there any special characters in your users? If so, what are the characters?
RichardPopleVM
Posts: 5
Joined: Tue Jul 19, 2016 9:02 am

Re: Unable to import users from LDAP

Post by RichardPopleVM »

No - userids are just alpha/numeric combinations.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to import users from LDAP

Post by ssax »

Try editing this file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/ldap_ad_integration/basicLDAP.php
Around line 74, cange this code:

Code: Select all

        if ($ret) {
            $this->baseDn = $this->findBaseDn();
        }
To this:

Code: Select all

//        if ($ret) {
//            $this->baseDn = $this->findBaseDn();
//        }
Then test it again and see if it's working now.

If it's still not working, please run this command again (only if you reverted) and then try again:

Code: Select all

sed -i 's/ldap_read($this->ldapConnection, NULL/ldap_read($this->ldapConnection, ""/g' /usr/local/nagiosxi/html/includes/components/ldap_ad_integration/basicLDAP.php

Thank you
RichardPopleVM
Posts: 5
Joined: Tue Jul 19, 2016 9:02 am

Re: Unable to import users from LDAP

Post by RichardPopleVM »

I did both of those and still the same ie 'No users or computers found in this object.'

I re-did the previous debug line and attached another error log tail in case it's any different.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to import users from LDAP

Post by ssax »

Let's move this into a ticket, please email [email protected] with a descriptive subject and detailed body and please include a link back to this thread so that we can get a remote session setup.

Thank you
RichardPopleVM
Posts: 5
Joined: Tue Jul 19, 2016 9:02 am

Re: Unable to import users from LDAP

Post by RichardPopleVM »

Done.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to import users from LDAP

Post by ssax »

Locking the topic as we've received your support ticket, we will continue support through the ticket.

Thank you
Locked