Page 1 of 1

LDAP auth error

Posted: Thu Dec 05, 2013 3:34 am
by mon-team
Hi,
I got the following error when i applied ldap authentication settings "LDAP libraries not installed! To install them, log into the server, and run 'yum install php-ldap'."
php-ldap have already been installed
[root@nagiosxi]# rpm -aq | grep php-ldap
php-ldap-5.3.3-26.el6.x86_64

Looking into http error.log --> [Thu Dec 05 08:05:47 2013] [error] [client ] PHP Notice: Undefined offset: 1 in /usr/local/nagiosxi/html/admin/components.php on line 292, referer: http://nagiosxi/nagiosxi/admin/

Could you help me resolve this issue?

I have Nagios XI 2012R2.2 on a CentOS release 6.3

BRegards

Re: LDAP auth error

Posted: Thu Dec 05, 2013 11:45 am
by abrist
Have you restarted apache recently? You may have to do so for the ldap libraries to load:

Code: Select all

service httpd restart 

Re: LDAP auth error

Posted: Fri Dec 06, 2013 8:48 am
by mon-team
OK, the restart of apache has fixed the issue.

Let me ask you another question.
my ldap authentication settings should look like this:
--------------------------------------------------------------------------------------------
Enabled -- checked
LDAP Host – ip_main,ip_backup
Base DN -- dc=y,dc=x
User DN -- uid=[USERNAME],ou=USER_GROUP,dc=y,dc=x
--------------------------------------------------------------------------------------------

We have 2 ldap servers (main and backup). Is it possible to set both the ip in order to guarantee users authentication in case of failure of the main node?
I can't set the user DN(fully distinguished name) because “ou=USER_GROUP” has different values according to the group the user belongs to. Any idea?

Thank for your help

Re: LDAP auth error

Posted: Fri Dec 06, 2013 11:02 am
by sreinhardt
At this point, neither AD nor ldap components really allow for secondary domain controllers. You might be able to do this with some dns trickery to your nagios server, but that is a less than ideal solution. Otherwise we would love it if you could put in a feature request for multi server authentication with ldap on tracker.nagios.com!

Re: LDAP auth error

Posted: Mon Dec 09, 2013 4:02 am
by mon-team
Any idea about my second question?
mon-team wrote: my ldap authentication settings should look like this:
--------------------------------------------------------------------------------------------
Enabled -- checked
LDAP Host – ip_main,ip_backup
Base DN -- dc=y,dc=x
User DN -- uid=[USERNAME],ou=USER_GROUP,dc=y,dc=x
--------------------------------------------------------------------------------------------

I can't set the user DN(fully distinguished name) because “ou=USER_GROUP” has different values according to the group the user belongs to. Any idea?
BR

Re: LDAP auth error

Posted: Mon Dec 09, 2013 10:38 am
by sreinhardt
So are you needing to pull different users from different groups into xi with ldap? Is it possible to create a nagios or nagios_admins group to add them to, and have nagios specifically reference that? Sorry if I'm missing what your asking here.

Re: LDAP auth error

Posted: Mon Dec 09, 2013 11:34 am
by mon-team
You are right.
This is the user fully distinguished name (DN) as defined in our ldap "uid=[USERNAME],ou=USER_GROUP,dc=y,dc=x", where USER_GROUP identifies the group the user belongs to.
Is there any solution that avoids changing on LDAP configuration?
sreinhardt wrote:So are you needing to pull different users from different groups into xi with ldap? Is it possible to create a nagios or nagios_admins group to add them to, and have nagios specifically reference that? Sorry if I'm missing what your asking here.

Re: LDAP auth error

Posted: Mon Dec 09, 2013 11:44 am
by sreinhardt
Short of using a group that all your users, that need to access nagios, belong to not really. We understand this is an issue for some people, but have not had a good suggestion on what people would like to see in place of the current options. If you would, putting a bug\feature request into tracker.nagios.com and suggesting the ldap integration be able to search through multiple groups in order, would be a welcome option! The more detail you can give us on how you would expect it to work, and what would suite your needs, the better!

edit: just realized I suggested a feature request before, but it really is the only way to get things like this rolling on our end. I can suggest it all day long, but if no customers want it too, it will never happen.