Thanks for the great library.
Is it possible to do a password reset, when the user does not know the current password?
I am able to change the password if the user knows the current password. But also needs to reset the password, if the user forgot the current password. Is this possible at all?
I think you'd have to use a service account to perform the password reset.
I think you'd have to use a service account to perform the password reset.
Thanks, this is my full question on StackOverflow, https://stackoverflow.com/questions/55847431/nodejs-ldapjs-activedirectory-password-reset-without-knowing-current-password
I think you need to use replace instead of add and delete, I believe when you send an add and del together it treats it as a normal reset. When you send only a replace command it's treated like an administrator password reset.
I think you need to use replace instead of add and delete, I believe when you send an add and del together it treats it as a normal reset. When you send only a replace command it's treated like an administrator password reset.
Many thanks, mate, it worked and solved my issue,
const change = new ldap.Change({
operation: 'replace',
modification: { unicodePwd: encodePassword(newPassword) },
});
client.modify(`CN=${name},CN=Users,${server.baseDN}`, change, function(err) {
if (err) {
return err;
}
return true;
});
This is what you mean when you say use replace? @tastypackets
Most helpful comment
I think you need to use replace instead of add and delete, I believe when you send an add and del together it treats it as a normal reset. When you send only a replace command it's treated like an administrator password reset.