LDAP integration and DNs with * in them

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
StuartQF
Posts: 7
Joined: Tue Apr 08, 2014 12:11 pm

LDAP integration and DNs with * in them

Post by StuartQF »

Hi,

I've configured LDAP integration with my domains DN, but all of our users are under OUs with three *** in the name - don't ask me why, I don't understand that decision.
When I attempt to import users, I see the list of OUs but can't view anything beneath the ones with the * characters.
If I change the base DN to an OU with some of my users in it and use the \2A escape character, I can import the users in that OU.

Any chance I'm missing something simple?

I have version 5.3.2 installed, and the LDAP component is version 1.0.6
Last edited by dwhitfield on Wed Nov 23, 2016 2:53 pm, edited 1 time in total.
Reason: marking with green check mark
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: LDAP integration and DNs with * in them

Post by dwhitfield »

For clarity, you are using LDAP / Active Directory Integration? We are only here until 2PM US Central today, so you have about 2 hours to get me that so I can start digging. Otherwise, maybe a community member will have an answer over the weekend.
StuartQF
Posts: 7
Joined: Tue Apr 08, 2014 12:11 pm

Re: LDAP integration and DNs with * in them

Post by StuartQF »

LDAP/AD - That's correct
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: LDAP integration and DNs with * in them

Post by dwhitfield »

So, I think it's safe to say at this point you aren't missing something simple. Can you show us how you are escaping each of the three *? Also, can you give us the complete OU names? If can't/aren't comfortable with that information being public, can you PM it to me? If you PM it, I'll look at it on Monday. If you post to the thread, a community member might be able to help out.

EDIT: LDAP info received.
StuartQF
Posts: 7
Joined: Tue Apr 08, 2014 12:11 pm

Re: LDAP integration and DNs with * in them

Post by StuartQF »

PM Sent
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: LDAP integration and DNs with * in them

Post by dwhitfield »

Those look find to me. Could you PM me your profile? Admin > System Config > System Profile (click "Show Profile" in XI 5 onwards) Thanks!

Same deal with updating the post after you've sent. :)

UPDATE: Profile received and shared with techs.
StuartQF
Posts: 7
Joined: Tue Apr 08, 2014 12:11 pm

Re: LDAP integration and DNs with * in them

Post by StuartQF »

PM sent with system profile
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: LDAP integration and DNs with * in them

Post by ssax »

Please edit this file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/ldap_ad_integration/adLDAP/src/classes/adLDAPFolders.php
Around line 122, change this code:

Code: Select all

$filter .= '(!(distinguishedname=' . $ou . ',' . $this->adldap->getBaseDn() . ')))';
To this:

Code: Select all

$filter .= '(!(distinguishedname=' . str_replace("*", "\*", $ou) . ',' . $this->adldap->getBaseDn() . ')))';
Then try it again and let us know if that resolves the issue for you.

Thank you
StuartQF
Posts: 7
Joined: Tue Apr 08, 2014 12:11 pm

Re: LDAP integration and DNs with * in them

Post by StuartQF »

That worked perfectly!

Thank you!
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: LDAP integration and DNs with * in them

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
Locked