0

I am Using Django 4.4, I have managed to authenticate users by using django-auth-ldap.But I can not get all users records to my database. I have tried to follow instructions from this link using the filter (sAMAccountType=805306368), It gives all users and their groups but they cant be updated to django admin panel, Users are only displayed in the debug file only and users can not be binded to login here is how my configurations look like

AUTH_LDAP_SERVER_URI = "mydomain.com"
AUTH_LDAP_CONNECTION_OPTIONS = {
            ldap.OPT_REFERRALS: 0
            }
AUTH_LDAP_BIND_DN = "user@mydomain"
AUTH_LDAP_BIND_PASSWORD = "password"
LDAP_IGNORE_CERT_ERRORS = True
AUTH_LDAP_USER_SEARCH = LDAPSearch(
    "DC=mydomain,Dc=com", ldap.SCOPE_SUBTREE, "(sAMAccountType=805306368)"
)

AUTH_LDAP_GROUP_TYPE = PosixGroupType(name_attr='cn')
Yannis P.
  • 2,745
  • 1
  • 24
  • 39
Hanna
  • 11
  • 2

0 Answers0