We use eDirectory. I am trying to learn how to change a user's password from .net code.
I have tried the following:
|
Code:
|
DirectoryAttributeModification modifyUserPassword = new DirectoryAttributeModification();
modifyUserPassword.Operation = DirectoryAttributeOperation.Replace;
modifyUserPassword.Name = "userPassword";
modifyUserPassword.Add(newPass);
ModifyRequest modifyRequest = new ModifyRequest(userToSetPw, modifyUserPassword);
DirectoryResponse response = connection.SendRequest(modifyRequest); |
I have also tried to delete and add the attribute.
I get a "Success" response, but the password doesn't actually change. I can even see that the attribute "userPassword" contains the password that I tried to set. So, I think I may be changing the wrong attribute.
Help please?