Problem binding to Active Directory

Rudy Schockaert rudy.schockaert at
Fri Mar 24 09:47:38 CET 2006

I use the following script:

from win32com.client import GetObject, Dispatch

default_naming_context =
ad = GetObject("LDAP:").OpenDSObject("LDAP://%s" % default_naming_context,
user, password, 1 + 512)

If user & password contain a correct value the script works. According to
the ADSI documentation, replacing user and password with NULLstrings should
use the credentials of the currently logged on user. In VBScript this works,
but in Python I get different errormessages depending on what I pass as
value to these parameters.

Can somebody tell me how to do this? How can I pass a NULL-string here

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list