mods[1] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, slchanged);
ctx.modifyAttributes(last_dn + "," + search_base, mods);
ctx.close();
} catch (AttributeModificationException e) {
throw new LdapChangeException(last_dn, "Unable to change password");
} catch (NamingException e) {
Logger.getLogger(Ldap.class.getName()).log(Level.SEVERE, "Naming error at LDAP server", e);
throw new LdapChangeException(last_dn, "Naming error connecting to LDAP server");
}
}