{"id":9918,"date":"2017-08-12T10:30:26","date_gmt":"2017-08-12T10:30:26","guid":{"rendered":"https:\/\/www.top-password.com\/blog\/?p=9918"},"modified":"2017-08-12T10:30:26","modified_gmt":"2017-08-12T10:30:26","slug":"set-password-to-never-expire-for-domain-accounts-in-windows-server","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/set-password-to-never-expire-for-domain-accounts-in-windows-server\/","title":{"rendered":"Set Password to Never Expire for Domain Accounts in Windows Server"},"content":{"rendered":"<p>Can&#8217;t change password after domain user password expired? AD password expires while user is away? By default, domain users are required to change their passwords every 42 days, as defined by domain password policy. If you find those password expiry notices annoying, you can set password to never expire for domain accounts in Windows Server 2016, 2012, 2008, 2003.<\/p>\n<p>Before getting started, you can check when your domain account password is going to expire. Just open the Command Prompt as administrator, type the following command and press Enter.<\/p>\n<p><code>net user domain_account_name  \/domain<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/find-windows-domain-account-info.png\" alt=\"\" width=\"596\" height=\"307\" class=\"alignnone size-full wp-image-9926\" \/><\/p>\n<p>This will display your account information, including when you last changed your password, and when it expires.<\/p>\n<p><strong>Method 1: Set Domain Account Password to Never Expire via GUI<\/strong><\/p>\n<ol>\n<li>Press the Windows logo key + R, type <strong>dsa.msc<\/strong> and press Enter to open Active Directory Users and Computers Snap-in.<\/li>\n<li>Expand your domain and click <strong>Users<\/strong> in the left pane, you&#8217;ll see a list of domain accounts on your server. Double-click on the user you would like to update.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/active-directory-users.png\" alt=\"\" width=\"606\" height=\"292\" class=\"alignnone size-full wp-image-9927\" \/>\n<\/li>\n<li>In the Properties dialog, click the <strong>Account<\/strong> tab and check &#8220;<strong>Password never expires<\/strong>&#8221; under the Account options section.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/ad-password-never-expires.png\" alt=\"\" width=\"424\" height=\"531\" class=\"alignnone size-full wp-image-9928\" \/>\n<\/li>\n<li>Click <strong>Apply<\/strong> and then <strong>OK<\/strong>. Now you&#8217;ve successfully disabled the annoying expiration of passwords!<\/li>\n<\/ol>\n<p><strong>Method 2: Set Domain Account Password to Never Expire via PowerShell<\/strong><\/p>\n<ol>\n<li>click <strong>Start<\/strong>, click <strong>Administrative Tools<\/strong>, and then click <strong>Active Directory Module for Windows PowerShell<\/strong>.<\/li>\n<li>After importing Active Directory module in Powershell, you can type the following script to set your domain password to never expire. Replace <em>pcunlocker<\/em> with the name of your domain account.\n<p><code>Set-LocalUser -Name \"pcunlocker\" -PasswordNeverExpires 1<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/ad-password-never-expire-via-powershell.png\" alt=\"\" width=\"588\" height=\"175\" class=\"alignnone size-full wp-image-9929\" \/>\n<\/li>\n<\/ol>\n<p><strong>Method 3: Set Domain Account Password to Never Expire via Command Prompt<\/strong><\/p>\n<p><a href=\"https:\/\/www.top-password.com\/blog\/open-command-prompt-in-windows-10\/\" target=\"_blank\">Open the Command Prompt as Administrator<\/a>. Type the following command and press Enter. <strong>Note:<\/strong> Replace &#8220;<em>pcunlocker<\/em>&#8221; with your account name, and adjust the domain name accordingly.<\/p>\n<p><code>dsmod user \"CN=pcunlocker,CN=Users,DC=corp,DC=top-password,DC=com\" -pwdneverexpires yes<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/ad-password-never-expire-via-cmd.png\" alt=\"\" width=\"588\" height=\"163\" class=\"alignnone size-full wp-image-9930\" \/><\/p>\n<p>This would set the password of the domain account &#8220;<em>pcunlocker<\/em>&#8221; to never expire.<\/p>\n<p>If you want to disable the password expiration for all accounts in Active Directory, type:<\/p>\n<p><code>dsquery user \"CN=Users,DC=corp,DC=top-password,DC=com\" | dsmod user -pwdneverexpires yes<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/password-never-expire-for-all-ad-accounts.png\" alt=\"\" width=\"596\" height=\"235\" class=\"alignnone size-full wp-image-9931\" \/><\/p>\n<p><strong>Method 4: Set Password to Never Expire for All Accounts Using Domain Group Policy<\/strong><\/p>\n<ol>\n<li>Click the <strong>Start<\/strong> button, point to <strong>Administrative Tools<\/strong> and then click <strong>Group Policy Management<\/strong>.<\/li>\n<li>In the console tree, expand the Forest and then Domains. Select the domain for which the password policies have to be set. Right-click <strong>Default Domain Policy<\/strong> and select <strong>Edit<\/strong>.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/edit-default-domain-policy.png\" alt=\"\" width=\"617\" height=\"440\" class=\"alignnone size-full wp-image-9932\" \/>\n<\/li>\n<li>It will open Group Policy Management Editor. Navigate to <strong>Computer Configuration<\/strong> -&gt; <strong>Policies<\/strong> -&gt; <strong>Windows Settings<\/strong> -&gt; <strong>Security Settings<\/strong> -&gt; <strong>Account Policies<\/strong> -&gt; <strong>Password Policy<\/strong>, then double-click the &#8220;<strong>Maximum password age<\/strong>&#8221; setting in the right pane.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/ad-maximum-password-age.png\" alt=\"\" width=\"582\" height=\"311\" class=\"alignnone size-full wp-image-9933\" \/>\n<\/li>\n<li>In the Security Policy Setting tab, make sure the &#8220;<strong>Define this policy setting<\/strong>&#8221; option is checked, and specify that passwords never expire by setting the number of days to 0.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/set-ad-password-never-expires.png\" alt=\"\" width=\"421\" height=\"500\" class=\"alignnone size-full wp-image-9934\" \/>\n<\/li>\n<li>Click Apply and then OK.<\/li>\n<\/ol>\n<p>Actually, there is much simpler way to modify the &#8220;<strong>Maximum password age<\/strong>&#8221; settings for your default domain policy. Just open the Command Prompt as Administrator, and type:<\/p>\n<p><code>net accounts \/maxpwage:unlimited  \/domain<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/08\/change-maximum-password-age-via-cmd.png\" alt=\"\" width=\"596\" height=\"139\" class=\"alignnone size-full wp-image-9935\" \/><\/p>\n<p>Now, all the domain accounts won&#8217;t be required to change password ever. If you&#8217;re locked out of Windows Server and can&#8217;t log on with any domain administrator, then you need to use the AD password utility &#8211; <a href=\"https:\/\/www.top-password.com\/reset-windows-password.html\">PCUnlocker<\/a>. It can help you reset forgotten Active Directory password and unlock a disabled\/expired\/locked domain account.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Can&#8217;t change password after domain user password expired? AD password expires while user is away? By default, domain users are required to change their passwords every 42 days, as defined by domain password policy. If you find those password expiry notices annoying, you can set password to never expire for domain accounts in Windows Server [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92,1,10],"tags":[3502,3501],"class_list":["post-9918","post","type-post","status-publish","format-standard","hentry","category-active-directory-password","category-others","category-tips-tricks","tag-disable-password-expiration-in-windows-server","tag-set-password-never-expire-in-windows-server"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/9918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/comments?post=9918"}],"version-history":[{"count":15,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/9918\/revisions"}],"predecessor-version":[{"id":9943,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/9918\/revisions\/9943"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=9918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=9918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=9918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}