Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Password Expiration - Enable or Disable



Password Expiration - Enable or Disable

How to Enable or Disable Password Expiration for a User in Windows 7 and Windows 8
Published by Brink
23 Mar 2010
Published by

How to Enable or Disable Password Expiration for a User in Windows 7 and Windows 8


information   Information
Password expiration allows you to set a maximum password age in days (42 by default) of a user account before it expires and they must change their password.

By default, password expiration is disabled. This will show you how to enable or disable password expiration for a user in Windows 7.

Note   Note
You can only do this while logged in as an administrator.

In Windows 8, this only applies to local accounts, and not Microsoft accounts.


EXAMPLE: Password Expiration
NOTE: This is what a user will see at log on when the maximum password age is reached and they are required to change their password.
Password Expiration - Enable or Disable-expired1.jpg

Password Expiration - Enable or Disable-expired2.jpg

Password Expiration - Enable or Disable-expired3.jpg




OPTION ONE
Through Local Users and Groups Manager
1. Open the Local Users and Groups Manager.

2. In the left pane, click on Users, then double click on the name of the user account that you want to enable or disable password expiration for. (see screenshot below)
Password Expiration - Enable or Disable-lusrmgr-1.jpg
3. To Enable Password Expiration for this User Account
A) Uncheck the password never expires box, then click on OK. (see screenshot below)
Name:  LUSRMGR-2.jpg
Views: 27512
Size:  74.4 KB
B) You will now need to change the maximum and minimum password age of this user account for what you would like.

C) Go to step 5.
4. To Disable Password Expiration for this User Account
A) Check the password never expires box, then click on OK. (see screenshot above)
NOTE: If password never expires is grayed out, then this means that this user account as reached it's set maximum password age. You will need to either change the maximum password age to more days so that it has not expired yet, or change the password for the user account in Windows 7 or Windows 8.
5. Repeat steps 2 to 3/4 for any other user account that you want to enable or disable password expiration for.

6. When done, close the Local Users and Groups Manager.




OPTION TWO
Through an Elevated Command Prompt
1. Open an elevated command prompt in Windows 7 or Windows 8.

2. To Disable Password Expiration for a User Account
A) In the elevated command prompt, type the command below and press Enter. (see screenshot below)
NOTE: Substitute username in the command below with the actual user account name that you want to disable password expiration for.

Code:
wmic path Win32_UserAccount where Name='username' set PasswordExpires=false
FOR EXAMPLE: I would type in this command exactly for a user account named Brink, and press enter.

Code:
wmic path Win32_UserAccount where Name='Brink' set PasswordExpires=false
B) Go to step 4.
3. To Enable Password Expiration for a User Account
A) In the elevated command prompt, type the command below and press Enter. (see screenshot below)
NOTE: Substitute username in the command below with the actual user account name that you want to enable password expiration for.

Code:
wmic path Win32_UserAccount where Name='username' set PasswordExpires=true
FOR EXAMPLE: I would type in this command exactly for a user account named Brink, and press enter.

Code:
wmic path Win32_UserAccount where Name='Brink' set PasswordExpires=true
B) You will now need to change the maximum and minimum password age of this user account for what you would like.
4. Close the elevated command prompt.
That's it,
Shawn



Related Tutorials

.

11 Dec 2013   #1
FormerUSMC

WES7 x64
 
 

Option two was exactly what I needed, thank you very much for the info! Added one line of code to my script (two if you count the remarks) and bingo bango.

My System SpecsSystem Spec
.

11 Dec 2013   #2
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

You're most welcome FormerUSMC, and welcome to Seven Forums.
My System SpecsSystem Spec
01 Jan 2014   #3
psychotron

Home 7 64 on Alienware and Asus. W8 on Lenovo.
 
 

Just thought I'd leave a reply on what I did to stop the "consider changing your password" notification "expires in so many days". I tried all the fixes online including these posted here, no go. I have 7 Home Premium on a newer laptop I bought used, have been using w8 on my main laptop for a good 6 months with no password and have yet to get a similar notification.

I just clicked on the wrench next to the x when the message popped up at startup, it brought me to a icon/notification setting window and I just scrolled down to password notification and changed setting to "never display/show". Done.

I'm admin in both my laptops and all the fixes online I tried including these here would just end with the command prompt or pc telling me not available or something similar to the effect that the fix didn't work. I see in the thread pics professional users are seeing this notification before the desktop loads up, for me on windows 7 home the message would pop up in a small box at the lower right corner right after 7 was mostly or fully loaded up after restart or power up.

Just thought I'd leave my fix that worked for me.
My System SpecsSystem Spec
01 Jan 2014   #4
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello psychotron,

Thank you for posting this for others.

It sounds like you used this below to hide the password notification in case someone else would like to turn it off and wasn't fast enough to click on the notification itself.
Notification Area Icons - Hide or Show System Icons and Notifications
The only problem though is that was only a notification you turned off, and not actual password expiration. If password expiration wasn't disabled for your user account, then the password would still expire in those X many days.
My System SpecsSystem Spec
01 Jan 2014   #5
psychotron

Home 7 64 on Alienware and Asus. W8 on Lenovo.
 
 

Thanks.

The thing is there was never a password created by me. Being this is a used laptop someone could of created a password but the only user accounts are mine as admin and a guest account that has not been activated. The original user account I deleted. And the only options in my admin account are to create a password not edit or change one so that tells me there is no active password.
So the fact that it was asking me to change password means there was a password and if I don't do anything I won't be able to log into windows 7?

Whatever that answer to the above is all the fixes I tried including yours failed, I would assume it is because I don't have admin rights but I do as far as I know. So the fact that none of the other fixes worked could that mean I don't actually have a admin account even though when I go to control panel-users accounts it says my user account is admin?

Also, I was trying to add photo of my user account page. Is there a way to just upload pic from my harddrive or are we forced to do the url thing?
My System SpecsSystem Spec
01 Jan 2014   #6
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

While logged in to an administrator account, I would double check to make sure that password expiration was disabled for each user account using the method in the tutorial on the first page.
My System SpecsSystem Spec
01 Jan 2014   #7
psychotron

Home 7 64 on Alienware and Asus. W8 on Lenovo.
 
 

I have windows 7 home so I can't perform any of the tutorials on the first page, assuming the top of your thread here is the first page and that windows 7 home does not allow me to edit or see Local Users and Groups.

When I go to user accounts the only account active is my admin account. So I'm not sure what you are asking me to do.
My System SpecsSystem Spec
01 Jan 2014   #8
Brink
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Sorry, I was referring to using step 2 in OPTION TWO to double check for the user account that you are getting this password notification for.
My System SpecsSystem Spec
01 Jan 2014   #9
psychotron

Home 7 64 on Alienware and Asus. W8 on Lenovo.
 
 

Yep. Done that.

After I type and hit enter in command prompt as admin it says "no instance (s) available" and I close prompt. So whether that did anything IDK.
My System SpecsSystem Spec
Comment

 Password Expiration - Enable or Disable




Tutorial Tools



Similar help and support threads for2: Password Expiration - Enable or Disable
Windows 7 Tutorial Category
Solved Password expiration on an encrypted account System Security
Password Expiration - Change MAX and MIN Password Age Tutorials
Screen Saver Password Protection -Enable or Disable Tutorials
Password Expiration Issue General Discussion
Prevent domain password expiration in sundays Network & Sharing
Password History Enforcement - Enable or Disable Tutorials
build 7100 disable expiration Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:46 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33