Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6249093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:10:32+00:00 2026-05-24T13:10:32+00:00

Our ldap is set up so that we have multiple different organizational units (ou).

  • 0

Our ldap is set up so that we have multiple different organizational units (ou). I currently have a django project using django_auth_ldap to connect to our ldap server so people can login with their ldap credentials. However I can only get it to work for one ou when I need it to work with multiple ones. I currently have it set up as thus

import ldap
from django_auth_ldap.config import LDAPSearch

AUTH_LDAP_SERVER_URI = "ldap://ldap.example.net"
AUTH_LDAP_BIND_DN = ""
AUTH_LDAP_BIND_PASSWORD = ""
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=people_1,dc=example,dc=net",
   ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
AUTH_LDAP_USER_ATTR_MAP = {"first_name": "givenName",
                           "last_name": "sn",
                           "email": "email",
                           }

This works to get people from the people_1 group. How can I set it up so that it will also select from another container such as people_2? I have tried just adding “ou=people_1,ou=people_2” which doesn’t seem to work. I am still fairly new to understanding ldap so I apologize if this may be in fact something trivial to fix and just haven’t been searching properly to find the answer. Took me awhile to just get django_auth_ldap just to work for me (extremely happy when I did!).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:10:32+00:00Added an answer on May 24, 2026 at 1:10 pm

    Change the base object to dc=example,dc=net: then the search scope of subtree you have specified will search all subtrees under dc=example,dc=net. For more information about the LDAP search request and response operations, see my blog entry “Using ldapsearch”. Even though the examples use command-line tools, the concepts will assist you.

    Also, as a good programming practice, you should supply a size limit and a time limit. The defaults for these parameters differ based on your API and may not suit your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble running a complex query against our company LDAP server. I'm using
Our dev shop currently uses Visual SourceSafe. We all know how that could end
We have our own web server hosting our website that is open to the
First, the set up: I have a script that executes several tasks after a
I have an SVN server, and I'd like to use our LDAP server for
I'm trying to configure Tomcat to connect to an LDAP server on our network,
Our project uses XJC to generate Java classes from an XSD. I'm using JAVA
We a new gerrit 2.2.1 server using LDAP authentication in our corporate environment. We
When querying with LDAP against our Active Directory structure to look up user accounts,
Our company is currently writing a GUI automation testing tool for compact framework applications.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.