I'm trying to change a LDAP password from Node JS using LDAPJS. The LDAP server is embedded in our SAMBA server.
client.bind("CN=<myadministratorchain>", "<administratorpassword>", function(err) {
if(err) {
return done(err);
}
var change = new ldap.Change({
operation: "replace",
modification: {
userPassword : "mynewpassword",
}
});
client.modify("<theuserDN>", change, function(err) {
done(err);
});
});
Bind and modify are both OK. I can see a new property userPassword in my SAMBA user manager but my password isn't changed when I try to connect with my those credentials.
I've tried to use exop function but it doesn't work as well.
Is there a way to change a SAMBA user's password from Node JS ?
Thanks for your help.