I am trying to search my LDAP directory and I am unable to search with substring filters when the value is a set of attributes and values.
Scenario:
In my python script, I am able to search the LDAP server. Therefore, I will omit code regarding the connection, DN configuration amongst others and focus on the Filter
.
Filter1: (works)
'(&(objectClass=person)(managedObjects=CN=SKSOBHEE-MOBL,OU=Mobile,OU=Production,OU=Windows 7,OU=IT Client,OU=Resources,DC=emea,DC=xx,DC=yy,DC=com)(objectClass=organizationalPerson)(objectClass=user))'
Filter2: (fails)
'(&(objectClass=person)(managedObjects=CN=SKSOBHEE-MOBL*)(objectClass=organizationalPerson)(objectClass=user))'
Searching with Filter1 returns a user but fails with Filter2 when I use the substring.
Searching is done using:
l.search_s(BASE_DN, SCOPE, Filter1, Attrs)
I would appreciate some help on this!
Thank you.
managedObjects
have a substring matching rule? Most DN syntax attributes do not use a substring rule when matching DNs. – Terry GardnerLDAP Admin for Windows
to visually see the tree. – ShailenmanagedObjects
should contain the attribute syntax and all the matching and ordering rules. If there is no substring matching rule, then substrings will not work in the filter. – Terry GardnermanagedObjects
attribute. Link: s14.postimg.org/utfu3swip/pscreen.png . I see that theSubstring
subattribute is empty. Is that the reason why I cannot use wildcards? – Shailensubstring
. – Terry Gardner