This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JNDI Tutorial/LDAP examples/OpenLDAP  RSS feed

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm teaching myself elementary JNDI using Sun's JNDI Tutorial. The tutorial has name/file service provider exercises and directory/ldap service provider exercises. No problem with the naming service exercises (using an fs provider service I downloaded from Sun), but question about the ldap (and I know nothing to speak of about ldap):

I'm using SDK 1.4.2, so I've got the ldap service provider built in.I downloaded and installed (on Windows XP) a Win32 bundling of OpenLDAP from Lucas Bergman. To my amazement, my JNDI Tutorial directory service exercises connect to the OpenLDAP server. But the exercises require loading tutorial.ldif into the directory server, and I can't get past an "invalid credentials" error when running ldapadd.exe.

I know the problem concerns the directory server config file ldap.conf and Access Control. I've looked through the Quick Start and man for OpenLDAP and tried to hack out a ldap.conf that works, but I'm working in the blind. If my diagnosis is right, then I'm looking for the simplest but correct ldap.conf, with a superuser who can bind/write anything. Any help appreciated in validating my diagnosis and giving me a ldap.conf I can use.

Here's what I'm putting in at the command line:

I'm prompted for and enter password "secret." I get back an
error message.

Here is my ldap.conf file, copied from an example given in the OpenLDAP manual, with my (perhaps erroneous) changes of Unix directory syntax to that of Windows:
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try lower-case 'w' on the command line.
 
Randy Gibbons
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I had tried that too. Since I posted the note, with some more hacks of the slapd.conf file (to be honest, when I posted the note, I was mistakenly editing the ldap.conf file ), I got around the "invalid credentials" error. I got it to the point where ldapadd was trying to load the tutorial.ldif file but errored out with something like "no attributes new or changed." My problem at this point is that I don't know enough about ldap to even see if there are any roots/databases in there that I can add the tutorial.ldif contents to as a subcontext, or enough to create an o=JNDITutorial root to work off (one or the other is necessary, according to the Preparations part of the JNDI Tutorial). Since my intention was to learn JNDI and not LDAP, I've burned enough time on this unless someone has successfully loaded the tutorial's tutorial.ldif file and can tell me how they did this. (A possible variable in my case is that I installed OpenLDAP as a set of Windows binaries pulled down from the Web, and I don't know if the initial database has any or different content from what one would get building the system from the OpenLDAP source [something no way now how I'm going to try to do!]).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!