none
Local user password expire policy on Windows Server 2016. RRS feed

  • Question

  • Hi everyone!

      I am running a Windows Server 2016 on core mode and I created a local user some time ago, for a share resource on it. Some days ago an user reported that he couldn't access the share resource. After I reset the password to the local user, he could access it again. Based on that, my question is: Is there any local security policy that expires the local user password? If so, how can I disable it on Server 2016?

    Hope I was clear enough.


    Doria

    Friday, April 26, 2019 2:32 PM

Answers

  • Hi,

    If you want to set the local user account password to be never expired on Windows Server 2016 on core mode,

    you can use Command Prompt:

    Type wmic UserAccount where Name='username' set PasswordExpires=False, and press Enter key. Replace the username with your user name. When it shows "Property(s) update successful", the user’s password expiration is disabled.

    False = Disabled

    True = Enabled

    If you want to disable password expiration for all user accounts at once, type wmic UserAccount set PasswordExpires=False, and press the Enter key.

    If you want to set password policy for AD users through GPO, for more details, you can refer to the following link:

    https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/maximum-password-age

    Best Regards,

    Fan



    Please remember to mark the replies as an answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, April 29, 2019 3:18 AM

All replies

  • Hi Doria,

    When you create a user, for example with NET USER, it will by default have a password expiration.

    So here's how you can create a user and set the password expiration to never:

    NET USER "Username" /Add /Active:Yes
    
    WMIC USERACCOUNT WHERE "Name='Username' SET PasswordExpires=False

    Example:

    To view the password policies, you can type the following:

    NET ACCOUNTS


    This is the default values for Windows Server 2016 Core:

    Hope this helps!

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Proposed as answer by Leon Laude Thursday, May 2, 2019 5:25 AM
    Friday, April 26, 2019 4:25 PM
  • Hi,

    If you want to set the local user account password to be never expired on Windows Server 2016 on core mode,

    you can use Command Prompt:

    Type wmic UserAccount where Name='username' set PasswordExpires=False, and press Enter key. Replace the username with your user name. When it shows "Property(s) update successful", the user’s password expiration is disabled.

    False = Disabled

    True = Enabled

    If you want to disable password expiration for all user accounts at once, type wmic UserAccount set PasswordExpires=False, and press the Enter key.

    If you want to set password policy for AD users through GPO, for more details, you can refer to the following link:

    https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/maximum-password-age

    Best Regards,

    Fan



    Please remember to mark the replies as an answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, April 29, 2019 3:18 AM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Fan


    Please remember to mark the replies as an answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, April 30, 2019 9:58 AM
  • Thanks, it solved my issue. :-)

    Thanks again!


    Doria

    Monday, May 6, 2019 1:11 AM
  • Hi,

    I am pleased to know that the information is helpful to you.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    Fan


    Please remember to mark the replies as an answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, May 6, 2019 2:13 AM