Password Modify

Modifies an entry’s userPassword attribute as described in RFC 3062.

Connection conn = DefaultConnectionFactory.getConnection("ldap://directory.ldaptive.org");
try {
  conn.open();
  PasswordModifyOperation modify = new PasswordModifyOperation(conn);
  modify.execute(new PasswordModifyRequest("uid=dfisher,ou=people,dc=ldaptive,dc=org", new Credential("oldPass"), new Credential("newPass")));
} finally {
  conn.close();
}

This operation can also be used to generate passwords:

Connection conn = DefaultConnectionFactory.getConnection("ldap://directory.ldaptive.org");
try {
  conn.open();
  PasswordModifyOperation modify = new PasswordModifyOperation(conn);
  Response<Credential> response = modify.execute(new PasswordModifyRequest("uid=dfisher,ou=people,dc=ldaptive,dc=org"));
  Credential genPass = response.getResult();

} finally {
  conn.close();
}

Provider Support

JNDI JLDAP Apache LDAP UnboundID OpenDJ
Functionality exists in the provider API and has been confirmed
Functionality does not exist in the provider API
Functionality exists in the provider API, but did not work in our test environment
? Functionality exists in the provider API, but has not been integrated into the ldaptive provider