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

When you login 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 no. 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 about:

  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 10 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.

Password never expire for a specific user

Just follow the steps below to set a specific user account passwords to never expire:

  1. Go to Run –> lusrmgr.msc. This opens user management console.
  2. Select Users from the left hand menu.
  3. Right-click the user which you want to configure and select Properties.

    lusrmgr.msc local users and groups
    lusrmgr.msc local users and groups
  4. In General tab, check the checkbox “Password never expires”. Or simply press Alt + P keyboard shortcut.

    User Properties "Password never expires"
    User Properties “Password never expires”

Password never expire for all users

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

  1. Go to Run –> gpedit.msc
  2. Navigate to the following tree:
    Computer configuration –> Windows Settings –> Security Settings –> Account Policies –> Password Policy
  3. In the right-hand pane, select “Maximum password age” and set it to 0.

    Password policy to disable password expiry policy
    Password policy to disable password expiry policy

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

Configure password expiration using command-line

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

Password never expire for a specific user using command-line

Open command-prompt with administrative privileges and run the following command sequence:

  • Get the name of users currently active on the system using this command: net accounts
  • Run the following command:
    wmic useraccount where “Name=’itechticsuser'” set PasswordExpires=false
    Replace ‘itechticsuser’ with the name of user you want to configure.

    using wmic command to change password settings of a specific user
    using wmic command to change password settings of a specific user

Password never expire for all users using command-line

Open command-prompt with administrative privileges and run the following command:

  • net accounts /maxpwage:unlimited
    3 Ways To Set Windows Local User Account Passwords To Never Expire 2

Configure password expiration using PowerShell

You can achieve the same results using PowerShell

Password never expire for a specific user using PowerShell

  1. Press Windows Key + X + A keyboard shortcut sequence to open PowerShell with administrative privileges.
  2. Run the following command:
    Set-LocalUser -Name “itechticsuser” -PasswordNeverExpires 1
    Replace itechticsuser with your desired username.

    Password never expire for a specific user using PowerShell
    Password never expire for a specific user using PowerShell