I am attempting to pull info from an LDAP server (Active Directory), but cannot specify an OU. In other words, I need to search users in all OU's, not a specific one.
Here is what works: con = ldap.initialize("ldap://server.local") con.simple_bind_s('[EMAIL PROTECTED]', pass) result = con.search_ext_s('OU=some office, DN=server, DN=local', ldap.SCOPE_SUBTREE, "sAMAccountName=username", ['mail'])[0][1] for i in result: print "%s = %s" (i, result[i]) But i really need it to not require an OU. When I remove that part, it breaks. Or it just won't find the user. Is there a proper syntax for this that I'm missing? Maybe a different search function? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---