当前位置: 动力学知识库 > 问答 > 编程问答 >

sql server - Can't Alter Login

问题描述:

I created a SQL Server login for an application user and forgot to uncheck the policy options. Now when I try to uncheck the options from SQL server management studio I get:

The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON.

How can I make the policy changes short of removing the user and starting over?

网友答案:

Check out this link: Fix a SQL Server Login which has MUST_CHANGE set to ON

You can use the following query to fix that:

USE Master
GO
ALTER LOGIN UserName WITH PASSWORD = 'password'
GO
ALTER LOGIN UserName WITH
      CHECK_POLICY = OFF,
      CHECK_EXPIRATION = OFF;

Replacing UserName and password with the proper values.

The link will also walk you through the process of fixing it in the management studio interface.

网友答案:

Basically, just change the password only, then hit OK. Open it back up and you can uncheck the Enforce password boxes.

分享给朋友:
您可能感兴趣的文章:
随机阅读: