Hi all,
I am getting the "netscape.ldap.LDAPException: error result (50); Insufficient access" during the .compare() method.Althogh the given user is authenticated properlly.
here is the code which I am using
doAuthenticate(){
try {
ld.connect( host, 389);
ld.authenticate("uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot", "admin123");
this.userdn = "uid=admin,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot";
LDAPAttribute attr = new LDAPAttribute("uniqueMember", userdn);
// Test for group membership
System.out.println("log -5 ==> creating attribute");
boolean attrMatch = ld.compare(groupdn, attr);
// Display the test results
if (attrMatch) {
System.out.println("\nIS A GROUP MEMBER!\n");
} else {
System.out.println("\nIS NOT A GROUP MEMBER!\n");
}
} catch (LDAPReferralException e) {
// Ignore referrals...
} catch (LDAPException e) {
System.out.println(e.toString());
}finally{
if ((ld != null) && ld.isConnected()) {
try {
ld.disconnect();
System.out.println("Conection closed");
} catch (LDAPException e) {
System.out.println("Error: " + e.toString());
}
}
}
}
Thanks