<h2>Troubleshooting Microsoft AD Spoke Password Policy Issues</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Instructions</h3><section><p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;">The actions which depend on password policies may fail because of issues in the policies.</p> <ol style="margin-bottom: 0cm; margin-top: 0px;"><li style="font-size: 14pt;"><strong>Reset AD User Password</strong></li><li style="font-size: 14pt;"><strong>Change User Password</strong></li></ol> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 14.0pt;">What is Password Policy and where to check for policy on domain controller?</span></p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;">A password policy is a set of rules designed to enhance computer security by encouraging users to employ strong passwords and use them properly. A password policy is often part of an organization's official regulations and may be taught as part of security awareness training. Either the password policy is merely advisory, or the computer systems force users to comply with it. Some governments have national authentication frameworks that define requirements for user authentication to government services, including requirements for passwords. Following is the reference,</p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-policy">https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-policy</a></p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;">Using Group Policy Management Console, configure the policy settings in the following location. For more information, see <a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/previous-versions/windows/desktop/gpmc/group-policy-management-console-portal">Group Policy Management Console</a></p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><strong>Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy</strong></p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;">See the following topics from Microsoft Documentation for detailed information on password policy management</p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <table class="MsoTableGrid" style="width: 506.7pt; background: white; border-collapse: collapse; border: none;" border="1" cellspacing="0" cellpadding="0"><tbody><tr style="height: 14.65pt;"><td style="border: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><strong><span style="font-family: 'Segoe UI', sans-serif; color: black;">Topic</span></strong></p> </td><td style="border: solid windowtext 1.0pt; border-left: none; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><strong><span style="font-family: 'Segoe UI', sans-serif; color: black;">Description</span></strong></p> </td></tr><tr style="height: 46.95pt;"><td style="border: solid windowtext 1.0pt; border-top: none; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="color: black;"><a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/enforce-password-history"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Enforce password history</span></a></span></p> </td><td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Describes the best practices, location, values, policy management, and security considerations for the <strong><span style="font-family: 'Segoe UI', sans-serif;">Enforce password history</span></strong> security policy setting.</span></p> </td></tr><tr style="height: 46.0pt;"><td style="border: solid windowtext 1.0pt; border-top: none; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="color: black;"><a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/maximum-password-age"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Maximum password age</span></a></span></p> </td><td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Describes the best practices, location, values, policy management, and security considerations for the <strong><span style="font-family: 'Segoe UI', sans-serif;">Maximum password age</span></strong> security policy setting.</span></p> </td></tr><tr style="height: 46.95pt;"><td style="border: solid windowtext 1.0pt; border-top: none; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="color: black;"><a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/minimum-password-age"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Minimum password age</span></a></span></p> </td><td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Describes the best practices, location, values, policy management, and security considerations for the <strong><span style="font-family: 'Segoe UI', sans-serif;">Minimum password age</span></strong> security policy setting.</span></p> </td></tr><tr style="height: 46.0pt;"><td style="border: solid windowtext 1.0pt; border-top: none; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="color: black;"><a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/minimum-password-length"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Minimum password length</span></a></span></p> </td><td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Describes the best practices, location, values, policy management, and security considerations for the <strong><span style="font-family: 'Segoe UI', sans-serif;">Minimum password length</span></strong> security policy setting.</span></p> </td></tr><tr style="height: 46.0pt;"><td style="border: solid windowtext 1.0pt; border-top: none; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="color: black;"><a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Password must meet complexity requirements</span></a></span></p> </td><td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Describes the best practices, location, values, and security considerations for the <strong><span style="font-family: 'Segoe UI', sans-serif;">Password must meet complexity requirements</span></strong> security policy setting.</span></p> </td></tr><tr style="height: 46.95pt;"><td style="border: solid windowtext 1.0pt; border-top: none; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="color: black;"><a style="color: #0563c1; text-decoration: underline;" href="https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/store-passwords-using-reversible-encryption"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Store passwords using reversible encryption</span></a></span></p> </td><td style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0cm 5.4pt 0cm 5.4pt;" valign="top"> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-family: 'Segoe UI', sans-serif; color: black;">Describes the best practices, location, values, and security considerations for the <strong><span style="font-family: 'Segoe UI', sans-serif;">Store passwords using reversible encryption</span></strong> security policy setting.</span></p> </td></tr></tbody></table> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"><strong><span style="font-size: 16.0pt;">Common Errors:</span></strong></p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="margin-bottom: 0cm; margin-top: 0px;"><li style="font-size: 14pt;"><strong>The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements</strong></li></ol> <p style="text-indent: 36pt; margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="text-indent: 36pt; margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;">Troubleshooting: Make sure that your password meets the password policy requirements.</p> <p style="text-indent: 36pt; margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="margin-bottom: 0cm; margin-top: 0px;" start="2"><li style="font-size: 14pt;"><strong>A constraint violation occurred. (Exception from HRESULT: 0x8007202F) HRESULT: [-2147016657]</strong></li></ol> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="text-indent: 36pt; margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;">There may be several reasons for the error. Try the following troubleshooting steps.</p> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="margin-bottom: 0cm; margin-top: 0px;"><li style="margin: 0cm 0cm 0cm 0px; font-size: 12pt; font-family: Calibri, sans-serif;">If the user account is locked, you cannot use the ChangePassword() method. Instead, you can use the SetPassword() method.</li></ol> <p style="margin: 0cm 0cm 0cm 36pt; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="margin-bottom: 0cm; margin-top: 0px;" start="2"><li style="margin: 0cm 0cm 0cm 0px; font-size: 12pt; font-family: Calibri, sans-serif;">This may go without saying, but if your domain has a password policy in place, be sure the new password meets the length, complexity and age requirements that have been set. If you don't know the requirements, use "<strong>rsop.msc</strong>" as well as "<strong>gpedit.msc</strong>" and look under <strong>"Computer Configuration\Windows Settings\Account Policies\Password Policy\"</strong></li></ol> <p style="margin: 0cm 0cm 0cm 36pt; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="margin-bottom: 0cm; margin-top: 0px;" start="3"><li style="margin: 0cm 0cm 0cm 0px; font-size: 12pt; font-family: Calibri, sans-serif;">Check to make sure the "<strong>User Cannot Change Password</strong>" option is not checked in active directory.</li></ol> <p style="margin: 0cm 0cm 0cm 36pt; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="margin-bottom: 0cm; margin-top: 0px;" start="4"><li style="margin: 0cm 0cm 0cm 0px; font-size: 12pt; font-family: Calibri, sans-serif;">Check AD permissions to make sure the user changing the password (if not impersonating) is able to do so for the target user. also agreed that targetign Computer Account objects cannot use ChangePassword().</li></ol> <p style="margin: 0cm 0cm 0cm 36pt; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="margin-bottom: 0cm; margin-top: 0px;" start="5"><li style="margin: 0cm 0cm 0cm 0px; font-size: 12pt; font-family: Calibri, sans-serif;">Try changing the password for the user organically using the same old/new passwords to make sure the process works outside of the code. By organically, I mean login to a computer/server as the target user.</li></ol> <p style="margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <p style="text-indent: 18pt; margin: 0cm; font-size: 12pt; font-family: Calibri, sans-serif;">Ref Link: <a style="color: #0563c1; text-decoration: underline;" href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/f10f4ee4-4d5b-48c8-8055-068a03f98fe5/ad-lds-cannot-changepassword-but-it-can-setpassword?forum=csharpgeneral">https://social.msdn.microsoft.com/Forums/vstudio/en-US/f10f4ee4-4d5b-48c8-8055-068a03f98fe5/ad-lds-cannot-changepassword-but-it-can-setpassword?forum=csharpgeneral</a></p></section></div></article></div>