[python-ldap] Retrieving Members in a large security group

Michael Ströder michael at stroeder.com
Sun Jul 14 02:12:26 CEST 2013


Gary Olivera wrote:
> I have recently been using the search feature to query for users in OUs and
> members in security groups. My member search query for security groups
> works on smaller groups, but when I run the query on big groups it just
> returns an error.
>
> attrs = ['member']
> filter =
> (&(objectCategory=group)(distinguishedName=cn=MyGroup,dc=foo,dc=bar))
> search_dn = 'cn=MyGroup,dc=foo,dc=com'
>
> I have implemented paged querying for OUs and that works correctly. I
> haven't been able to get that to work with security groups. Am I going down
> the right path? How does one deal with security groups with many members.
>
> Any guidance would be greatly appreciated.

You're talking about MS AD. Right?

Seems I already answered that a month ago:
http://mail.python.org/pipermail/python-ldap/2013q2/003251.html

Personally I'd rather search member entries with filter (memberOf=<group-DN>). 
I don't know your requirements though.

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20130714/784e8bc8/attachment.bin>


More information about the python-ldap mailing list