Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

LDAP search in "lower" ou ?

 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I need to do a fairly simple search in a directory using javax.naming.directory.InitialDirContext:


What I need to search is structured like this:
cn=<name>+uid=12345, ou=People, ou=Bureau of the Public Debt, ou=Department of the Treasury,o=U.S. Government,c=US

The code always returns "Not found" when executed for a uid known to be present. My question is, can the search be set to recursively descend or must I create a subcontext directly above the cn? Part of the problem is that I need to do a Department-wide search and do not know the bureau necessarily.
 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried creating a SearchControls object:

Still not finding the target. Is the fact that the search target is a partial CN a factor?
 
Douglas Kent
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now finding the target: new code However,
not finding all the attributes. Using an LDAP browser, can see the email attribute of the target, but not able to get it from the program. See code
The email attribute is there, but it does not show up in the log.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic