October 31, 2012 at 12:59 pm
How to create sql server login to allow the user to change his password when he first connects to the SQL Server instance?
October 31, 2012 at 1:03 pm
Mani-584606 (10/31/2012)
How to create sql server login to allow the user to change his password when he first connects to the SQL Server instance?
By adding MUST_CHANGE after the password to the script.
http://msdn.microsoft.com/en-us/library/ms189751.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
October 31, 2012 at 1:42 pm
note that the end user may have troulbe if they don't use SSMS for connecting;
as an example, i created this login:
USE [master]
GO
CREATE LOGIN [ExampleLogin]
WITH PASSWORD=N'NotTheRealPassword'
MUST_CHANGE,
DEFAULT_DATABASE=[master],
CHECK_EXPIRATION=ON,
CHECK_POLICY=ON
GO
when i try to connect to with an application i made that returns any errors returned by the server as a message box, i get this:
but if i try via SSMS, the password change is handled gracefully:
so your application, if any, needs to return errors if encountered,a nd not assume a good connection no matter what, of course.
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply