JMapMyLDAP
JMapMyLDAP copied to clipboard
User DN / Filter issue?
Hi Shaun
I noticed a slight issue with the User DN / Filter field
(sAMAccountName=[username]) - works fine
however if i try and add an extra filter to limit the return like so:
(&(sAMAccountName=[username])(company=Company Name)) - fails
(company=Company Name) works fine in the all user filter over cli and brings back the users but it fails when used as a user filter..
Have I misunderstood how that field is used?
I have had to turn auto register off and rely on cron updates of the users..
Kiran
Hi Kiran, The best way to create the correct filters is to use the Default LDAP Search application within Windows. Like LDP.exe which can be installed trough the Features.
This was the only way for me to create the correct filters. The filter must be excepted by the LDAP part of the Active Directory
This may be related to the same issue I am having.
It tries to bind directly instead of searching for the DN is there is a space in the filter field.
File: /libraries/shmanic/ldap/ldap.php Line Num: 1224 Line: $useSearch = (preg_match('/(?<!\S)()/', $this->user_qry)) ? true : false;
Is the one that looks to be causing it for me. Since I'm not a great coder I just changed it to $useSearch = true;
I filter everything by group membership