SQL Server – the password of the account has expired

Problem

For some reason your web site is up, but none of the data is loading on your web site?  Is your SQL Server up and running?  Are you able to access the data with either your Windows account or sa?  What does your SQL Server error log report?  What is the culprit? You may see the error “The password of the account has expired.”

Solution

Chances are if you check the SQL Server error log you will see a message as follows:

Logon Error: 18487, Severity: 14, State: 1.
Logon Login failed for user 'loginname'. Reason: The password of the account has expired. [CLIENT: <named pipe>]

SQL Server 2005 introduced ‘Enforce password policy’ and/or the ‘Enforce password expiration’ configurations which use the local policies for password length, complexity and expiration.  Depending on how Active Directory, the local policies and your rights are setup, these parameters can be reviewed and changed to dictate how SQL Server uses these configurations.

If you get this error message, the simple thing is to reset the password, but you may also want to check the settings in SQL Server and Windows to make sure you have the correct settings.

Where can I find SQL Server login properties for a login?

  1. Open Management Studio and the object browser.
  2. Navigate to the Security > Logins folder.
  3. Find the login you are interested in reviewing.
  4. Right click on the login and select the ‘Properties’ option.
  5. On the General tab, review the ‘Enforce password policy’ and the ‘Enforce password expiration’ configurations. (screen might look a little different depending on SQL version)
login name SQL Login Properties

Where can I find Window password policies?

Under Windows Admistrator Tools lauch Local Security Policy to review the local policies on the machine or you can type “secpol.msc” in the Windows Run box.  Below is what you will see as the options.

windows local security settings

Next Steps

  • Review your logins to ensure you are aware if they are using the Enforce password policy and/or the Enforce password expiration configurations.
  • Now you know what to do the next time you see the message “Login failed for user ‘loginname’. Reason: The password of the account has expired.”
  • Setup an alert to capture when this event occurs to correct it immediately or determine another means to reset the passwords so these policies do not impact your applications.
  • For additional information about the Enforce password policy and/or the Enforce password expiration configurations, reference the Password Policy article in SQL Server Books Online.
  • For additional SQL Server security information check out these tips.

Leave a Reply

Your email address will not be published. Required fields are marked *