3 Ways To Set Windows Local User Account Passwords To Never Expire

Password Never Expires Windows 11Password Never Expires Windows 11

When you log in to your Windows computer, you may get an error message like this:

Your password has expired and must be changed
User password must be changed before signing in
User password must be changed before signing in

In normal circumstances, it’s absolutely fine for Windows to remind you of password change after every specific number of days. But in some conditions, this practice should be disabled. A couple of scenarios could include the following:

  1. An administrator user should not have automatic expiration of password as this will lock you out of the computer if the password is not changed on regular basis.
  2. Another condition can be when you are accessing your computer remotely. If the password expires, you won’t be able to reset it remotely and will need physical access to the system.

In this tutorial, we will share three ways to set Windows local user account passwords to never expire. We will discuss:

  1. How to set Windows local user account passwords to never expire for all users.
  2. How to set Windows local user account passwords to never expire for a specific user.

If you are using Windows Home edition, you can enable Group Policy Editor for Windows 10 Home Edition.

Configure Password Expiration using User Management

Windows makes it easier for us to manage local users of the system with Management Consoles.

Password Never Expires for a Specific User

Follow the steps below to set specific user account passwords to never expire:

  1. Type in “lusrmgr.msc” in the Run Command box to open the Local Users and Groups management console.

    lusrmgr
    Open the Local Users and Groups management console
  2. Select “Users” from the left-hand menu.

  3. Right-click the user in the middle pane for which you want to configure and select Properties.

    Open user properties
    Open user properties
  4. Check the checkbox “Password never expires,” or simply press Alt + P keyboard shortcut.

    Set password to never expire using Local Users and Groups
    Set password to never expire using Local Users and Groups
  5. Click Apply and Ok.

Password Never Expires for All Users

If you want that the password for all users in your system should never expire, follow the instructions below:

  1. Open the Group Policy editor by typing in “gpedit.msc” in the Run Command box.

    gpedit msc
    Open the Group policy editor
  2. Navigate to the following using the left pane:

    Local Computer Policy >> Computer Configuration >> Windows Settings >> Security Settings >> Account Policies >> Password Policy
  3. Double-click the policy “Maximum password age.”

  4. Set its value to “0.”

    Set maximum password age to zero
    Set maximum password age to zero
  5. Click Apply and Ok.

Setting the maximum password age to zero will disable the password expiration feature for all users in Windows.

Configure Password Expiration using Command Prompt

If you are comfortable with the command line or want to do this remotely, you can use Windows commands for enabling and disabling the above-mentioned policies.

Password Never Expires for a Specific User using Command Prompt

Perform the following steps to configure a user account’s password to never expire:

  1. Launch an elevated Command Prompt.

  2. Get the name of users currently active on the system using this command:

    net user
    Get name for al active user account from Command Prompt
    Get name for all active user account from Command Prompt
  3. Now use the following cmdlet while replacing [Username] with the name of the account that you want to configure:

    wmic useraccount where "Name='[Username]'" set PasswordExpires=false
    Set specific user accounts password to never expire using Command Prompt
    Set specific user account’s password to never expire using Command Prompt

Password Never Expires for All Users using Command Prompt

Perform the following steps to configure all user account passwords to never expire using Command Prompt:

  1. Launch an elevated Command Prompt.

  2. Run the following cmdlet:

    net accounts /maxpwage:unlimited
    Set all user accounts password to never expire using Command Prompt
    Set all user accounts password to never expire using Command Prompt

Configure Password Expiration using PowerShell

You can achieve the same results using PowerShell.

Password Never Expires for a Specific User using PowerShell

  1. Open a PowerShell instance with elevated privileges.

  2. Run the following command while replacing [Username] with the name of the user account that you wish to configure:

    Set-LocalUser -Name "[Username]" -PasswordNeverExpires 1
    Set specific user accounts password to never expire using PowerShell
    Set specific user accounts password to never expire using PowerShell

Closing Words

Of course, your password should expire from time to time so you can change it, making your system more secure by not having the same password for decades. However, it also has its downsides, which we have discussed earlier in the post.

If your password expires while you are away, you will no longer be able to log into your system remotely. Moreover, if you are a system administrator, then you won’t be able to log back into your account without resetting your password.

If you liked this post, Share it on:
Usman Khurshid is a seasoned IT Pro with over 15 years of experience in the IT industry. He has experience in everything from IT support, helpdesk, sysadmin, network admin, and cloud computing. He is also certified in Microsoft Technologies (MCTS and MCSA) and also Cisco Certified Professional in Routing and Switching.

Leave the first comment

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information

Talk to us now

Talk to us straight and get your questions answered right away

Tell Us About Your Project