Reputation: 43
I wanted to bring to your attention an issue we are facing with the LDAP filter in MS Active Directory.
It has come to our notice that when applying a wildcard (*) filter to the group attribute in the ldapsearch command, it is not working as expected. However, when using the complete value, the command works properly.
This issue seems to be specific to MS Active Directory server as both commands work fine in OpenLDAP. It would be appreciated if you could investigate why this issue is occurring and suggest a resolution for it.
working command:
/usr/bin/ldapsearch -x -o ldif-wrap=no -D "cn=Manager,dc=learnitguide,dc=net" -b "dc=learnitguide,dc=net" -l 10 -w <Pass> -H ldap://<ip>:<port> "(memberUid=uid=ldap_test3,ou=People,dc=learnitguide,dc=net)"
# LDAPv3
# base <ou=People,dc=learnitguide,dc=net> with scope subtree
# filter: (memberUid=uid=ldap_test3,ou=People,dc=learnitguide,dc=net)
# requesting: ALL
dn: cn=LDAP_GRP4,ou=People,dc=learnitguide,dc=net
objectClass: posixGroup
objectClass: top
cn: LDAP_GRP4
gidNumber: 91878
memberUid: uid=ldap_test3,ou=People,dc=learnitguide,dc=net
memberUid: uid=ldap_test11,ou=People,dc=learnitguide,dc=net
memberUid: ldap_test12
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
non working command:
/usr/bin/ldapsearch -x -o ldif-wrap=no -D "cn=Manager,dc=learnitguide,dc=net" -b "dc=learnitguide,dc=net" -l 10 -w <Pass> -H ldap://<ip>:<port> "(memberUid=uid=ldap_test3*)"
# LDAPv3
# base <ou=People,dc=learnitguide,dc=net> with scope subtree
# filter: (memberUid=uid=ldap_test3*)
# requesting: ALL
# search result
search: 2
result: 0 Success
# numResponses: 1
Upvotes: 0
Views: 25