Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ldap
- from django_auth_ldap.config import LDAPSearch
- AUTHENTICATION_BACKENDS = [
- 'django_auth_ldap.backend.LDAPBackend',
- ]
- AUTH_LDAP_START_TLS = False
- AUTH_LDAP_ALWAYS_UPDATE_USER = False
- AUTH_LDAP_SERVER_URI = 'ldap://ip_address:389'
- AUTH_LDAP_BIND_DN = ''
- AUTH_LDAP_BIND_PASSWORD = ''
- AUTH_LDAP_USER_SEARCH = LDAPSearch('DC=example,DC=com', ldap.SCOPE_SUBTREE, '(sAMAccountName=%(user)s)')
- AUTH_LDAP_CONNECTION_OPTIONS = {
- ldap.OPT_REFERRALS: 0,
- }
- ERROR search_s('DC=example,DC=com', 2, '(sAMAccountName=user)') raised OPERATIONS_ERROR({'desc': 'Operations error', 'info': '00000000: LdapErr: DSID-0C090627, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, vece'})
- DEBUG search_s('DC=example,DC=com', 2, '(sAMAccountName=%(user)s)') returned 0 objects:
- DEBUG Authentication failed for user: failed to map the username to a DN.
Add Comment
Please, Sign In to add comment