The error message "Source: Login failed for user 'admin', Reason: The password of the account has expired" appears in the error log because the user account which was created to authenticate the database attached in the SQL server instance has an expired password.
The error can be rectified with the following steps:
- Open SQL Management Studio
- Login to the installed SQL instance by windows authentication
- In the object explorer pane (generally appears on the left), expand Security and expand Logins
- Now you will be able to see all the available logins.
- Since the error is reading Source: Login failed for user 'admin', right-click admin and select Properties
- In the error log, the reason is identified as Reason: The password of the account has expired. This occurs only when the Enforce password policy and Enforce password expiration checkboxes were checked during the user creation time for the user: admin.
- Now Untick Enforce Password Policy and Enforce password expiration and then click on Ok.
- Right-click on the database engine and click on Restart for the changes to reflect in the installed SQL instance.
- Click on Yes in the confirmation popup to restart the SQL service
- Now the User: admin can authenticate the database attached in the SQL server instance without any restrictions. The error message is successfully resolved.