LDAP/AD Configuration: Search Operations Error

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
jgreen
Posts: 1
Joined: 06 Mar 2015, 15:06

LDAP/AD Configuration: Search Operations Error

Post by jgreen »

Having issues with LDAP/AD configuration.

I get the following error notices on the page:

APPLICATION ERROR #1400
LDAP Authentication Failed.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

&&

SYSTEM WARNING: 'ldap_search(): Search: Operations error' in '/var/www/html/mantisbt/core/ldap_api.php' line 358

I turned on the log and these are the messages I get:
2015-03-06 09:02 CST ldap Binding to LDAP server
2015-03-06 09:02 CST ldap Attempting connection to LDAP URI 'lab.dsrglobal.com:3268'.
2015-03-06 09:02 CST ldap Connection accepted by LDAP server
2015-03-06 09:02 CST ldap Setting LDAP protocol version to 3
2015-03-06 09:02 CST ldap Attempting anonymous bind to ldap server
2015-03-06 09:02 CST ldap Bind to ldap server successful
2015-03-06 09:02 CST ldap Searching for (&(sAMAccountName=administrator))
2015-03-06 09:02 CST ldap ERROR #1: Operations error
2015-03-06 09:02 CST ldap ldap search failed


And here is my config:
#LDAP/AD Config
$g_login_method = LDAP;
$g_ldap_server = 'lab.{mydomain}.com:3268';
$g_ldap_bind_dn = 'CN={binduser},CN=Users,DC=lab,DC={mydomain},DC=com';
$g_ldap_bind_password = '{bind user pass}';
$g_ldap_root_dn = 'CD=Users,DC=lab,DC={mydomain},DC=com';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_protocol_version = 3;
$g_ldap_follow_referrals = OFF;


I notice the log says it's attempting an anonymous bind, should it be authenticating with my bind user?
I have no clue what is going on with the search error though. Any help would be greatly appreciated.
minhduc
Posts: 1
Joined: 15 Aug 2015, 02:19

Re: LDAP/AD Configuration: Search Operations Error

Post by minhduc »

Hey guy,

I also faced this problem and follow this instruction and to fix this sucessfully : viewtopic.php?f=2&t=23214&hilit=active+directory

It means that you use should use OU on $g_ldap_root_dn ( ex: $g_ldap_root_dn = 'OU=Users,DC=lab,DC={mydomain},DC=com'; ) so far I don't know why need to follow up.

[quote][/quote]And ensure the all users need to authentication is under 'OU=Users,DC=lab,DC={mydomain},DC=com';

About your config, i found out the line : $g_ldap_root_dn = 'CD=Users,DC=lab,DC={mydomain},DC=com';
It seems you get typo error at CN=Users to CD=Users right ?

Hope this help you !
Duc
Post Reply