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

Reply via email to