I want to search a particular ldap-node within groups by unique-member attribute. Something like.
search_filter = 'uniqueMember=mail='testuser.+abc@abc.com',ou=people,dc=myorg,dc=com'
When I search this filer with
conn.search_s(node_dn, ldap.SCOPE_BASE, search_filter, [])
It returns {'info': '', 'desc': 'Bad search filter'}.
Whereas a similar search for search_filter without '+'
search_filter = 'uniqueMember=mail='testuser.abc@abc.com',ou=people,dc=myorg,dc=com'
returns desired output.
I've tried escaping all possible ways. like
a. uniqueMember=mail='testuser.\+abc@abc.com',ou=people,dc=myorg,dc=com
b. uniqueMember=mail='testuser.\\+abc@abc.com',ou=people,dc=myorg,dc=com
c. uniqueMember=mail='testuser.\2Babc@abc.com',ou=people,dc=myorg,dc=com
d. uniqueMember=mail='testuser.\\2Babc@abc.com',ou=people,dc=myorg,dc=com
I tried '\2B' as this is how I could see uniqueMember attribute in apache-directory studio.
I'm using python-ldap 2.2.0 with port389.
Is there anything I'm missing while configuring port389. Please help.