I am having trouble searching an exchange 2003 ldap server. I can use
ldapsearch just fine against exchange, but python-ldap gives me a
strange error: Here is an example of what I get. Does anyone have any
suggestions?
>>> l = ldap.open('10.13.1.11', 389)
>>> l.protocol_version = 3
>>> l.simple_bind_s('ser...@ci...', 'password')
>>> l.search_s('dc=cimplify, dc=net', ldap.SCOPE_SUBTREE, 'mail=mr...@ci...', ['cn'])
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/tmp/python-ldap-1.9.999.pre04/debian/tmp/usr/lib/python2.1/site-packages/ldap/ldapobject.py", line 410, in search_s
File "/tmp/python-ldap-1.9.999.pre04/debian/tmp/usr/lib/python2.1/site-packages/ldap/ldapobject.py", line 414, in search_st
File "/tmp/python-ldap-1.9.999.pre04/debian/tmp/usr/lib/python2.1/site-packages/ldap/ldapobject.py", line 355, in result
File "/tmp/python-ldap-1.9.999.pre04/debian/tmp/usr/lib/python2.1/site-packages/ldap/ldapobject.py", line 59, in _ldap_call
File "/tmp/python-ldap-1.9.999.pre04/debian/tmp/usr/lib/python2.1/site-packages/ldap/__init__.py", line 31, in _ldap_call
ldap.OPERATIONS_ERROR: {'desc': 'Operations error', 'info': '00000000: LdapErr: DSID-0C0905FF, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece'}
I know that the parameters are correct: as I say, the following works fine:
ldapsearch -h 10.13.1.15 -x -W -D "ser...@ci..." \
-b dc=cimplify,dc=net "mail=mr...@ci..."
Thanks for any suggestions you can offer.
-Mark Roach
|