Thanks Kiran!
I fixed my Cut and paste error setting sec_principal,
Used the install default admin password, fixed ctx.lookup() DN,
As you suggested, and it works now.
Thanks very much. A small but necessary step into LDAP Java for me.
Im ready to tackle the next (small) step.
I would like to also ask you or someone, and use my newbie card once
More, in my LDAP Browser with the default install, I see:
DIT
Root DSE (4)
Ou=schema
Cn= multiple names...are these default schema names for various
"sample" or real orgs?
Ou=system...is for the system administrators?
Granted I haven't done enough basics reading....
Lee!
-----Original Message-----
From: Kiran Ayyagari [mailto:[email protected]]
Sent: Wednesday, March 03, 2010 3:25 PM
To: [email protected]
Subject: Re: new to ldap for java
hi Lee
> env.put(Context.SECURITY_AUTHENTICATION,sec_authentication);
> env.put(Context.SECURITY_PRINCIPAL, sec_credentials);
set the variable sec_principal in the above line
> env.put(Context.SECURITY_CREDENTIALS, sec_credentials);
> // specify the password
if you are testing with the default installation then the value of
sec_credentials is "secret" not "admin"
> try {
> ctx = new InitialDirContext(env);
> System.out.println(ctx.lookup("cn=admin"));
again if this is tested against default installation change "cn=admin"
to something like "uid=admin,ou=system" or to "ou=system"
HTH
Kiran Ayyagari