This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Security and the fly likes Searching down an LDAP tree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Searching down an LDAP tree" Watch "Searching down an LDAP tree" New topic
Author

Searching down an LDAP tree

Steve Wood
Ranch Hand

Joined: Jan 08, 2003
Posts: 137
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

Joined: Feb 25, 2007
Posts: 1638

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.


apigee, a better way to API!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Searching down an LDAP tree
 
Similar Threads
Weblogic 10.3.5 & Windows 2003 Active Directory NO User but Groups
How to configure Tomcat for authentication against Active Directory of Windows Server 2003
ldap authentication. JNDIRealm
Brainstorming: authentication problems
Windows Authentication Using Tomcat 5.0