Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to check Enforce a Password policy is enabled on SQL Server

Question: Using t-sql , How can  check I Enforce a Password policy is enabled on SQL Server ? I want to add this check for a regular SQL Server security configuration scan. 

This information would be viewed via a report , which DBAs could fix the issue 

Answer: This view will display the current status of Enforce Password Policy on a SQL Server login.

select * from sys.sql_logins where is_policy_checked = 0 

This query checks if a SQL Server using SQL Authentication has the Enforce Password Policy enabled 

If the Enforce a Password policy is not set , the password does not to apply the password complexity - typically set by the OS rules.   

If you then change the flag to Enforce a Password policy, WITHOUT changing the password ,  this will not force you to change the password - if the password doesn't follow the password complexity rules. .  But if you attempt to change the password after you have clicked OK for Enforce a Password policy, the "Password validation failed" message will appear - if the password complexity rules are not met. 

Read more about password management

How to check Enforce password expiration is set for SQL Login

How to view SQL Server Password Configurations

How to check SQL Server password policy

Powershell sql server security audit



This post first appeared on SQLSERVER-DBA.com, please read the originial post: here

Share the post

How to check Enforce a Password policy is enabled on SQL Server

×

Subscribe to Sqlserver-dba.com

Get updates delivered right to your inbox!

Thank you for your subscription

×