469,645 Members | 1,150 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Python/ADSI Problem

Hello,

I have problem with the following code:

rootdse = ldap.OpenDSObject(ROOTDSE_URL, USER_NAME, PASSWORD, opts)
nc = rootdse.Get("defaultNamingContext")
uri = "LDAP://%s/%s" % (SERVER_NAME, nc)
dc = ldap.OpenDSObject(uri, USER_NAME, PASSWORD, opts)
cnUsers = dc.GetObject("top", "Users") ## <-- exception is thrown here

The last line throws an exception:
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0,
-2147016654), None)

I've tried several variants, such as:
GetObject(None, "Users"),
GetObject("", "CN=Users"),
GetObject(u"", u"CN=Users")

with no success. Similar code in C++ works perfectly, i.e. the binding
URLs, flags, etc. seem to be correct.

Anything obvious I've missed?

Thanks,

Ondra

--
____________________________\\--//_________________________
Ondrej Krajicek \\// kr******@ics.muni.cz
Institute of Computer Science,||Masaryk University Brno, CR
_____________________________//\\__________________________
Jul 18 '05 #1
0 1232

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.