I found an other way. Now it works with Python too:

>>> from win32com.client import Dispatch
>>> adoCon = Dispatch("ADODB.Connection")
>>> adoCon.Provider = "ADSDSOObject"
>>> adoCon.Open("", "cn=Administrator;cn=Users,dc=strebig,dc=de","AdminsPW")
>>> adoRec = Dispatch("ADODB.Recordset")
>>> adoRec.ActiveConnection = adoCon
>>> adoRec.Source = "<LDAP://dc=strebig,dc=de>;(objectClass=User);Name,ADsPath;SubTree"
>>> adoRec.Open()
>>> while not adoRec.EOF:
...  print adoRec.Fields.Item("ADsPath").Value
...  adoRec.MoveNext()
...  
LDAP://CN=Administrator,CN=Users,DC=strebig,DC=de
LDAP://CN=Gast,CN=Users,DC=strebig,DC=de
LDAP://CN=TsInternetUser,CN=Users,DC=strebig,DC=de
LDAP://CN=NetShowServices,CN=Users,DC=strebig,DC=de
LDAP://CN=IUSR_SPACY,CN=Users,DC=strebig,DC=de
LDAP://CN=IWAM_SPACY,CN=Users,DC=strebig,DC=de
LDAP://CN=krbtgt,CN=Users,DC=strebig,DC=de
LDAP://CN=Clare Feedom,CN=Users,DC=strebig,DC=de
LDAP://CN=Markus MD.,CN=Users,DC=strebig,DC=de
LDAP://CN=SPACY,OU=Domain Controllers,DC=strebig,DC=de
>>> 

Markus

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to