directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <ayyagariki...@gmail.com>
Subject Re: new to ldap for java
Date Wed, 03 Mar 2010 20:25:11 GMT
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

Mime
View raw message