--- source/passdb/pdb_ldap.c.orig Tue Feb 14 15:38:07 2006 +++ source/passdb/pdb_ldap.c Tue Feb 14 16:03:47 2006 @@ -1664,8 +1664,18 @@ if (!ldap_state->is_nds_ldap) { if (!ldapsam_can_pwchange_exop(ldap_state->smbldap_state)) { - DEBUG(2, ("ldap password change requested, but LDAP " - "server does not support it -- ignoring\n")); + LDAPMod **mods = NULL; + smbldap_set_mod(&mods, LDAP_MOD_REPLACE, "userPassword", + pdb_get_plaintext_passwd(newpwd)); + rc = smbldap_modify(ldap_state->smbldap_state, dn, mods); + ldap_mods_free(mods, True); + if (rc != LDAP_SUCCESS) { + DEBUG(2,("Failed modify userPassword for user %s: %s\n", + pdb_get_username(newpwd), ldap_err2string(rc))); + return NT_STATUS_UNSUCCESSFUL; + } + DEBUG(2,("Successfully modify userPassword for user %s\n", + pdb_get_username(newpwd))); return NT_STATUS_OK; } }