Password Expiration - Enable or Disable

Page 1 of 3 123 LastLast
    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
    Designer Media Ltd


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


       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
    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)
    Password Expiration - Enable or Disable-lusrmgr-2.jpg
    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. Do step 3, 4, 5, or 6 below for what you would like to do.


    3. To Disable Password Expiration for a User Account
    A) In the elevated command prompt, type the command below, press Enter, and go to step 7 below. (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 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 UserAccount where Name='Brink' set PasswordExpires=False
    B) Go to step 4.
    4. To Disable Password Expiration for All User Accounts on PC
    A) In the elevated command prompt, type the command below, press Enter, and go to step 7 below. (see screenshot below)

    Code:
    wmic UserAccount set PasswordExpires=False
    5. To Enable Password Expiration for a User Account
    A) In the elevated command prompt, type the command below, press Enter, and go to step 7 below. (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 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 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.
    6. To Enable Password Expiration for All User Accounts on PC
    A) In the elevated command prompt, type the command below, press Enter, and go to step 7 below. (see screenshot below)

    Code:
    wmic UserAccount set PasswordExpires=True
    B) You can now change the maximum and minimum password age of each user account for what you would like.
    7. Close the elevated command prompt.
    That's it,
    Shawn








  1. Posts : 1
    WES7 x64
       #1

    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 Computer


  2. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    You're most welcome FormerUSMC, and welcome to Seven Forums. :)
      My Computer


  3. Posts : 74
    Home 7 64 on Alienware and Asus. W8 on Lenovo.
       #3

    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 Computer


  4. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

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


  5. Posts : 74
    Home 7 64 on Alienware and Asus. W8 on Lenovo.
       #5

    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 Computer


  6. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #6

    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 Computer


  7. Posts : 74
    Home 7 64 on Alienware and Asus. W8 on Lenovo.
       #7

    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 Computer


  8. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #8

    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 Computer


  9. Posts : 74
    Home 7 64 on Alienware and Asus. W8 on Lenovo.
       #9

    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 Computer


 
Page 1 of 3 123 LastLast

  Related Discussions
Our Sites
Site Links
About 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 17:27.
Find Us