Hello there, First let me say that I'm new to both Python and LDAP programming in general, so you can safely assume that I'm coding somewhat blindly.
What I'm trying to do is build a program against a Microsoft Active Directory that will find all group memberships for the current user. Because we have nested groups, it will need to do so recursively. There is a VBScript that I'm using as a basis: http://www.microsoft.com/technet/technetmag/issues/2006/03/ScriptingGuy/default.aspx I wanted to share this before I delve any further to make sure I'm not making any newbie mistakes. My ultimate goal is to build a List of all these Groups, and remove any duplicates that may show up. Here's the current state: ____________________ import active_directory def nestedlookup (group): """ does a recursive lookup """ nested_list = group.memberOf for members in nested_list: print "DESCENDENT: ", members.cn nestedlookup(members) user = active_directory.find_user () print "User:", user.cn group_list = user.memberOf for group in user.memberOf: print "PARENT: ", group.cn nestedlookup(group) ______________________ Many thanks for any advice!
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32