Search code examples
djangoldap

django_python3_ldap using multiple OU in LDAP_AUTH_SEARCH_BASE


need some help...

i'm using django_python3_ldap and it works fine when i change settings.py for each run using different LDAP_AUTH_SEARCH_BASE .

userxxx is logged in with LDAP_AUTH_SEARCH_BASEOU=Users,OU=xxx Accounts,OU=ZZZ,DC=domain,DC=local
useryyy is logged in with LDAP_AUTH_SEARCH_BASEOU=Users,OU=yyy Accounts,OU=ZZZ,DC=domain,DC=local

i have tried with

LDAP_AUTH_SEARCH_BASEOU=OU=Users,OU=xxx Accounts,OU=yyy Accounts,OU=ZZZ,DC=domain,DC=local

and this gives noSuchObjec ..... 0000208D: NameErr: DSID-03100241, problem 2001 (NO_OBJECT),

any hint?


Solution

  • i found a solution using backends.py, and by using this i did not need any package. Thanks for some of the guidance