-- You must run this with SQL Server
-- installed on Windows Server 2003
CREATE LOGIN fred WITH PASSWORD = 'hy!at54Cq' MUST_CHANGE,
DEFAULT_DATABASE = pubs,
CHECK_EXPIRATION = ON,
CHECK_POLICY = ON
GO

-- when FRED tries to log in, he receives
-- "Password must be changed"

ALTER LOGIN fred WITH PASSWORD = 'hy!at54Cq' UNLOCK
GO

ALTER LOGIN fred WITH CHECK_EXPIRATION = OFF
GO

ALTER LOGIN fred WITH CHECK_POLICY = OFF
GO