Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Searching down an LDAP tree

 
Steve Wood
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

We have the following query:

(&(objectcategory=group)(member=cn=User Name,ou=MyCompany,dc=mycompany,dc=com))

But when we run it (against Active Directory), it only searches for users in root ou folder (i.e. MyCompany). We have a whole bunch of ou's under this, but it doesn't search down the tree - it only searches that immediate folder.

Any ideas?

As a result, if the user isn't in MyCompany, but perhaps in a sub-folder, they aren't found - which is a bit limiting!

I'm not sure if this is active directory or just plain LDAP.

Help is greatly appreciated.

Cheers,

Steve
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are making the ldap search request using jndi, you would have to use Subtree Search scope in the search control.
This will enable search in subtrees also.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic