[python-ldap] ldap.AUTH_UNKNOWN: {'result': -6, 'desc': 'Unknown authentication method', 'ctrls': [], 'info': 'SASL(-4): no mechanism available: '}
Christopher Paul
chris.paul at rexconsulting.net
Tue Jan 25 20:10:49 EST 2022
Hello python-ldap users,
What am I doing wrong? The same settings work in an "$HOME/.ldaprc" file.
$ python3
Python 3.6.8 (default, Sep 10 2021, 09:13:53)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ldap
>>> ldap.__version__
'3.3.1'
>>> import ldap.sasl
>>> conn = ldap.initialize ("ldap://ldap.lab.local")
>>> conn.set_option(ldap.OPT_X_TLS_CERTFILE, '/home/fuu/.tls/cert.pem')
>>> conn.set_option(ldap.OPT_X_TLS_KEYFILE, '/home/fuu/.tls/key.pem')
>>> conn.set_option(ldap.OPT_X_TLS_CACERTDIR, '/etc/openldap/tls/cacerts/')
>>> conn.sasl_external_bind_s()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line
492, in sasl_external_bind_s
self.sasl_non_interactive_bind_s('EXTERNAL',serverctrls,clientctrls,sasl_flags,authz_id)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line
486, in sasl_non_interactive_bind_s
self.sasl_interactive_bind_s('',auth,serverctrls,clientctrls,sasl_flags)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line
476, in sasl_interactive_bind_s
return
self._ldap_call(self._l.sasl_interactive_bind_s,who,auth,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls),sasl_flags)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line
340, in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
File "/usr/lib64/python3.6/site-packages/ldap/compat.py", line 46, in
reraise
raise exc_value
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line
324, in _ldap_call
result = func(*args,**kwargs)
ldap.AUTH_UNKNOWN: {'result': -6, 'desc': 'Unknown authentication
method', 'ctrls': [], 'info': 'SASL(-4): no mechanism available: '}
thanks,
Chris Paul
Rex Consulting, Inc
email: chris.paul at rexconsulting.net
web: http://www.rexconsulting.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-ldap/attachments/20220125/bda85551/attachment.html>
More information about the python-ldap
mailing list