SASL response is not a SASL BindRequest
Stuart Bishop
stuart.b at commonground.com.au
Sun Mar 23 11:44:50 CET 2003
Hi.
I'm getting stuck with SASL authentication - I believe my code is
correct so
I'd like to get an opinion on if the bug lies with my code, python-ldap
pre6
or CommuniGate Pro (the LDAP server). I can bind using bind_simple_s.
My code:
import ldap
import ldap.sasl
login_dn = 'uid=zen,cn=commongroundpublishing.com,o=Common Ground'
password = 'secret'
l = ldap.open('localhost')
auth = ldap.sasl.digest_md5(login_dn,password)
l.sasl_bind_s('',auth)
l.unbind()
The result:
SASL/DIGEST-MD5 authentication started
Traceback (most recent call last):
File "t.py", line 9, in ?
l.sasl_bind_s('',auth)
File "/usr/local/lib/python2.1/site-packages/ldap/ldapobject.py",
line 162, in sasl_bind_s
return self._ldap_call(self._l.sasl_bind_s,who,auth)
File "/usr/local/lib/python2.1/site-packages/ldap/ldapobject.py",
line 94, in _ldap_call
result = apply(func,args,kwargs)
ldap.LOCAL_ERROR: {'desc': 'Local error', 'info': ''}
Server log:
20:55:14.83 5 LDAP connection request from [127.0.0.1], socket=27
20:55:14.83 4 LDAP-00540([127.0.0.1]) got connection on [127.0.0.1],
port 389
20:55:14.83 5 LDAP-00540([127.0.0.1]) input request(27): 02 01 01 60
16 02 01 03 04 03 7A 65 6E A3 0C 04 0A 44 49 47 45 53 54 2D 4D 44 35
20:55:14.83 5 LDAP-00540([127.0.0.1]) out: 30 5D 02 01 01 61 58 0A 01
0E 04 00 04 00 04 4F 6E 6F 6E 63 65 3D 22 35 34 30 61 31 30 34 38 34 31
33 33 31 34 61 63 6F 6D 6D 6F 6E 67 72 6F 75 6E 64 70 75
20:55:14.83 5 LDAP-00540([127.0.0.1]) input request(5): 02 01 02 42 00
20:55:14.83 1 LDAP-00540([127.0.0.1]) SASL response is not a SASL
BindRequest
20:55:14.83 1 LDAP-00540([127.0.0.1]) BIND failed: SASL protocol has
been interrupted
20:55:14.83 5 LDAP-00540([127.0.0.1]) out: 30 2E 02 01 01 61 29 0A 01
31 04 00 04 22 53 41 53 4C 20 70 72 6F 74 6F 63 6F 6C 20 68 61 73 20 62
65 65 6E 20 69 6E 74 65 72 72 75 70 74 65 64
20:55:14.83 3 LDAP-00540([127.0.0.1]) read failed. Error
Code=connection closed by peer
20:55:14.83 4 LDAP-00540([127.0.0.1]) closing connection
20:55:14.83 4 LDAP-00540([127.0.0.1]) releasing stream
--
Stuart Bishop <stuart.b at commonground.com.au>
More information about the python-ldap
mailing list