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_d开发者_如何学JAVAc: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.
精彩评论