Nov 122010
 

Just one of the various niggles in the SQL Server Management Studio 2008, if by mistake you set up a user and fail to uncheck the “enforce password policy” box (you may have good reason for this, but if you’re on a dev machine as I was it’s a bit of overkill I think), you may encounter access problems when accessing the system from for example a scripting language like Coldfusion or PHP.  In the case of Coldfusion the error looks like:

[Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user ‘cf_user’. Reason: The password of the account must be changed.

At this point it’s reasonably obvious that you must go in and change the user properties under Security > Users in SSMS.  However, havign created the user when one tries to remove this check box you will encounter (always I think)

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

This is a bug in the software, and while it is possible to actually change the password programatically thus:

USE Master
GO
ALTER LOGIN [somelogin] WITH PASSWORD = ‘samepassword’
GO
ALTER LOGIN [somelogin] WITH
CHECK_POLICY = OFF,
CHECK_EXPIRATION = OFF;

If you want to just reset this policy the easiest way is to just delete the user and then create it again making sure to leave the enforce password policy unchecked first time around.  There will be no problem saving it initially thus.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>