[python-ldap] Searching for nested membership in AD groups

Sean Whalen whalenster at gmail.com
Fri Sep 30 14:49:51 EDT 2016


Hi all,

I'm using pyldap, but the same problems occur in python-ldap.

I'm  trying to run a search in Active Directory with this filter, which
should return all of the groups that I am a member of, including nested
groups:

(member:1.2.840.113556.1.4.1941:=CN=Whalen, Sean,OU=Users,OU=Users and
Groups,DC=redacted,DC=net)

This filter is described in
https://msdn.microsoft.com/en-us/library/aa746475(v=vs.85).aspx

This works fine in powershell, but instantly returns 0 results in
python-ldap

Then I tried

(member:1.2.840.113556.1.4.1941:=CN=Whalen\5c, Sean,OU=Users,OU=Users and
Groups,DC=redacted,DC=net)

That ran for about 10 seconds in python-ldap, and returned 0 results.
powershell returned 0 results instantly.

She reverse query (finding all nested members of a group) works fine

(memberof:1.2.840.113556.1.4.1941:=cn=Group1,OU=groupsOU,DC=x)


Any ideas about what's going wrong/how to fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160930/675c7831/attachment.html>


More information about the python-ldap mailing list