First time here? Check out the FAQ!

Revision history  [back]

I was able to figure this out. in askbot/deps/django_authopenid/backends.py, I had to add a line to bind to the server (our server requires authentication prior to being able to search the tree).

 32         user_filter = "({0}={1})".format(askbot_settings.LDAP_USERID_FIELD,
 33                                          username)
 34 
 35         # Attempt at doing a simple bind to the ldap server
 36         # This is needed before being alllowed to search the ldap tree
 37         ldap_session.simple_bind_s("full_path_to_admin_user", "password")
 38 
 39         # search ldap directory for user
 40         res = ldap_session.search_s(askbot_settings.LDAP_BASEDN, ldap.SCOPE_SUBTREE, user_filter, None)

I was able to figure this out. in askbot/deps/django_authopenid/backends.py, I had to add a line to bind to the server (our server requires authentication prior to being able to search the tree).

 32         user_filter = "({0}={1})".format(askbot_settings.LDAP_USERID_FIELD,
 33                                          username)
 34 
 35         # Attempt at doing a simple bind to the ldap server
 36         # This is needed before being alllowed to search the ldap tree
 37         ldap_session.simple_bind_s("full_path_to_admin_user", "password")
 38 
 39         # search ldap directory for user
 40         res = ldap_session.search_s(askbot_settings.LDAP_BASEDN, ldap.SCOPE_SUBTREE, user_filter, None)
Non    e)