HOWTO: Turn off Password Expiration in Windows 7

I found it annoying when Windows 7 one day told me that my password was about to expire.  If you are like me I would rather be the one in control of when I change my password rather than Windows dictating this.

Here is a quick easy way to turn this off.

In Windows 7 Professional , Ultimate, and Enterprise:

  1. Open the Local Users and Groups administration panel. Do this the easy way; Start –> then enter  lusrmgr.msc into the start menu search box. (or the Run box on XP)
  2. Double click to select your user
  3. Check the box next to “Password never expires”
  4. Click OK, and your done.

win7-user panel


























In Windows 7 Home Premium:

  1. Run Command Prompt as Administrator (Rt-click cmd program to Run as Administrator)
  2. Type the following, then press enter   net accounts /maxpwage:unlimited
  3. Logoff and restart the PC,  Your done.



Alternate Option – Available for all Windows 7 editions:

  1. Run Command Prompt as Administrator (Rt-click cmd program to Run as Administrator)
  2. Type the following, then press enter wmic  path  Win32_UserAccount  WHERE  Name=’username‘  set  PasswordExpiries=false
  3. NOTE: Replace username in the command with the actual user account name.
  4. Close the cmd prompt window,  Your done.


About these ads

About Breztech
Technology and Photography enthusiast. Husband. Father of three. Believer. Founder of Breztech Solutions LLC. http://BreztechSolutions.com Breztech Blog http://Breztech.net Breztech Photo http://BreztechPhoto.com

30 Responses to HOWTO: Turn off Password Expiration in Windows 7

  1. Bracy says:

    This is a great tip, but this only works on Windows 7 Professional or above, I think. At least this doesn’t work on Windows 7 Home Premium. When lusrmgr.msc is loaded on that version the following message appears in the Management Console.

    “This computer is running Windows 7 Home Premium. This snapin may not be used with this version of Windows. To manage user accounts for this computer, use the User Accounts tool in the Control Panel.”

    This is unfortunate for those users. I have a professional version on another computer and this works great! Thanks for the tip, but any clue on how to do the same for Windows 7 Home Premium users/

  2. Lou says:

    Just use this instead from a cmd prompt running as administrator:

    net accounts /maxpwage:unlimited [enter]

    HTH!

  3. Linda says:

    I tried this tip, because my computer has started asking me to change my password, however, that box is already set on my computer. Is there anything else to try Shawn?

    Lou, I don’t understand your tip, sorry. I am computer challenged.

    I’m on my own laptop at home, by the way. I guess if I disable password logon that would work?

  4. Casper42 says:

    @Linda, you need to run his command from a command prompt. Anytime you see a command sequence starting with NET in Windows 2000 or higher, assume its command line.

    Click Start, type Command into the search box, then up top where it says Command Prompt, right click on it and say “Run as Administrator”.

    Once it opens you just type in the command mentioned above:
    NET ACCOUNTS MaxPWAge:Unlimited

    It should come back and just say “The command completed successfully”

    PS: If you want to see your password expiration setting before and after the change, run the following command before you run the one above and then again after.
    NET USER %username% |find “Password”
    That will run the NET USER command, pass in your current username as the account to be analyzed, and then the |find part will filter the output so only lines with the word Password show up on your screen.
    The line your looking for says something like Password expires: with a date.
    After you run the command above, it should say Never.

    @LOU: Thanks for the fix. I’m a Windows SA and I was even getting frustrated by the lack of working tools in 7 Home Premium. Why did they have to take away Local Users & Groups in Manage My Computer!?!

  5. Linda says:

    Thanks for all your help. Got it fixed. :)

  6. LarryB says:

    FWIW, the word “Password” in the NET USER command above is case sensitive. Or just leave out everything after the | and scroll a bit.

  7. Ian says:

    The ‘net accounts’ command gives “System Error 5 has occurred, Access Denied”

    This is from an administrator account

  8. Pete says:

    Thanks casper42 – that worked a treat!

    @Ian – try running the options as noted by casper42 – unless you run the CMD prompt as Administrator, you’ll get that error even if the account you’re logged in as is an Administrator.

  9. Ian says:

    Thanks Pete – will try that.

    Not sure if it’s related but the two Admin accounts do not expire; this only relates to a managed account with parental controls.

  10. Pingback: HOWTO: Turn off Password Expiration in Windows 7 « Breztech « XBMC and Linux Blog

  11. blue says:

    THanks!
    I have no idea why Microsoft makes it so difficult to find information like this!

  12. Last time I forgot my password and tried everything i could do but failed, until I found this great tool Password Genius. It works great, and you can google it.you can try to google it.

  13. Dave says:

    Windows 7 Home Premium: I also get Access Denied when I run net accounts /maxpwage:unlimited as Admin.

  14. James says:

    I have tried this but whenever I try to alter it just comes up access denied. Any ideas

  15. Jack D. Pond says:

    Small typo, the alternate command is case sensitive and has a typo. It should be:


    wmic path Win32_UserAccount WHERE Name=’username‘ set PasswordExpires=false

    Thanks for posting this!

  16. René Laan says:

    I had a password expiry for a user account without password?!
    used the “Windows 7 Home Premium:” trick and it worked like a charm,

    thanks a lot!

  17. Steph says:

    Thanks for the tip. You came up at the top of my Google search. I hate it when Microsoft tries to manage everything for me!

  18. Use this one it works: (replace xyz with your username)
    wmic path Win32_UserAccount where Name=’xyz’ set PasswordExpires=false

    • Breztech says:

      Glad it worked for you. I listed it as the Alternate Option in my post but maybe it should be primary since folks seem to like the quicker command method.

  19. Bob J says:

    Not only that but I’m trying to install SQL Server 2008 and the 2 service users HAVE to have
    *Password does not Expire

    I don’t understand Microsoft? Again, they release this software without proper testing.

  20. Kerwin So says:

    Thanks guys! Used it on Windows 7 Ultimate and it works fine!!!

  21. Pingback: Administrator password expiring frequently....

  22. Tom Uttormark says:

    Thanx! I’m running a Windows7 Home Premium virtual machine on my Imac. I set it up without passwords, but it started warning me about passwords expiring in X days.. I didn’t want to get locked out. I entered your suggested Cmd without difficulty and problem solved. Thanx again.

  23. vanin says:

    so good

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: