简体   繁体   中英

Authenticate different users in ldap present in different ou

Consider that I have two users ,user1 and user2 are under the following base_dc respectively

:base_dc:ou="ABC",ou="DEF",DC="XXX" :base_dc:ou="HIJ",ou="POQ",DC="XXX"

Now my question is , while logging into the application I would be taking the username and password and used to have the above (any 1) configuration in my config/ldap_config.yml file and used to authenticate. Now that there are 2 different users in different OU , I am finding it bit difficult as how to write a single base_dc so that ldap can search the user in the active directory and authenticate. As of now there are no additional parameters associated with the users like phoneNumber and stuff.

So can anyone suggest what might be the solution ? Or how should I handle this situation ? Thanks in Advance

If your DC=XXX means that both the users are in the same domain, set your search base to dc=XXX.

Where you run into trouble is when you have two non-overlapping base DN's.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM