ldap or active directory module

John Gordon gordon at panix.com
Fri Sep 9 14:35:31 EDT 2016


In <mailman.80.1473414113.2411.python-list at python.org> Robert Clove <cloverobert at gmail.com> writes:

> I want to find if the particular group exist in my active directory

Search on the group's DN, specifying SCOPE_BASE as the search scope.  If
you get a result, then the group exists, otherwise it doesn't.

> also another function to find the user in a particular group

Do the same search as above, returning the "member" attribute.  Get
the search result and then inspect the list of returned members.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list