private static void ChangePasswordReplace()

in src/Zyborg.PassCore.PasswordProvider.LDAP/LdapPasswordChangeProvider.cs [148:155]


        private static void ChangePasswordReplace(string newPassword, ILdapConnection ldap, string userDN)
        {
            // If you don't have the rights to Add and/or Delete the Attribute, you might have the right to change the password-attribute.
            // In this case uncomment the next 2 lines and comment the region 'Change Password by Delete/Add'
            var attribute = new LdapAttribute("userPassword", newPassword);
            var ldapReplace = new LdapModification(LdapModification.Replace, attribute);
            ldap.Modify(userDN, new[] { ldapReplace }); // Change with Replace
        }