1

I'm building a django website and trying to implement LDAP to it.

Whenever I call ldap.set_option(), I get this error:

ValueError: option error

Any idea why this is happening?

This is the document I'm following.

Thanks for looking into this and greatly appreciate your help!

user1443144
  • 97
  • 1
  • 2
  • 6

1 Answers1

0

http://packages.python.org/django-auth-ldap/#auth-ldap-global-options

Is AUTH_LDAP_GLOBAL_OPTIONS defined and does it have items in it?

Perhaps it is not defined?

dm03514
  • 54,664
  • 18
  • 108
  • 145
  • This is how i have it and still getting the error: ldap_cert_path = '/apps/essweb/qa_ldap.cert' AUTH_LDAP_GLOBAL_OPTIONS = { ldap.OPT_X_TLS_CACERTFILE: False, } ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,ldap_cert_path) – user1443144 Jul 23 '12 at 17:25
  • Also...above is in settings.py And added 'GLOBAL_OPTIONS': {}, under 'class LDAPSettings(object):' in 'django_auth_ldap/backend.py'. – user1443144 Jul 23 '12 at 17:40
  • This is the error i'm seeing on my browser. Any help is appreciated! ValueError at /admin/ option error Request Method: POST Request URL: http://0.0.0.0:8080/admin/ Django Version: 1.4 Exception Type: ValueError Exception Value: option error Exception Location: /apps/thhweb/python/lib/python2.6/site-packages/python_ldap-2.4.10-py2.6-linux-x86_64.egg/ldap/functions.py in _ldap_function_call, line 63 Python Executable: /apps/essweb/python/bin/python Python Version: 2.6. – user1443144 Jul 23 '12 at 21:28