2

I get to my log in page, submit my credentials and I get redirected saying my credentials are wrong. My logging doesn't even to seem to work, which I'm assuming the django-auth-ldap config isn't even set up correctly. Any further help would be greatly appreciated. It is a possibility that my logging may be incorrect, but I followed the docs exactly for that.

Thank you!

import logging
logger = logging.getLogger('django_auth_ldap')
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.DEBUG) 


# LDAP Settings
AUTH_LDAP_START_TLS = True
# Required LDAP Settings
AUTH_LDAP_SERVER_URI = "ldap://xxxxx.xxx.xxx.xxx"

AUTH_LDAP_BIND_DN = ''
AUTH_LDAP_BIND_PASSWORD = ''                                    
AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=people,dc=xxx,dc=xxx,dc=xxx"
AUTH_LDAP_BASE_DN = "dc=xxx,dc=xxx,dc=xxx"
AUTH_LDAP_REQUIRE_GROUP = "cn=users,ou=groups,dc=xxx,dc=xxx,dc=xxx"
AUTH_LDAP_GROUP_TYPE = PosixGroupType(name_attr="cn")
AUTH_LDAP_VERSION = 3                                                            # LDAP version

# Optional
AUTH_LDAP_FIELD_USERAUTH = "uid"                     # The field from which the user authentication shall be done.
AUTH_LDAP_FIELD_AUTHUNIT = "people"                  # The organisational unit in which your users shall be found.
AUTH_LDAP_FIELD_USERNAME = "uid"                     # The field from which to draw the username (Default 'uid'). (Allows non-uid/non-dn custom fields to be used for login.)                     # Should django try the directory for the user's email ('mail')?
AUTH_LDAP_ATTR_MAP = {
    "username": "uid",
    "email": "mailRoutingAddress",
    }
Zach Mance
  • 95
  • 9

0 Answers0