{"id":12145,"date":"2018-07-11T03:23:02","date_gmt":"2018-07-11T03:23:02","guid":{"rendered":"https:\/\/www.top-password.com\/blog\/?p=12145"},"modified":"2018-07-11T03:28:18","modified_gmt":"2018-07-11T03:28:18","slug":"force-sql-server-user-to-change-password-at-next-login","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/force-sql-server-user-to-change-password-at-next-login\/","title":{"rendered":"How to Force SQL Server User to Change Password at Next Login"},"content":{"rendered":"<blockquote><p>&#8220;For security concerns, I have to force all users in SQL Server 2016 to change password at the next login. But when I check the Properties tab, the option &#8220;User must change password at next login&#8221; is greyed out. Any suggestions? Thanks!&#8221;<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/07\/sql-user-must-change-password-greyed-out.png\" alt=\"\" width=\"596\" height=\"461\" class=\"alignnone size-full wp-image-12157\" \/><\/p>\n<p>In this tutorial we&#8217;ll show you the simple ways to force users to change password at next login in SQL Server 2017 &#8211; 2008, so they can set a new password not known by the administrator. Additionally, passwords they choose are less likely to be forgotten.<\/p>\n<p><strong>Part 1: Force Newly-Created Users to Change Password at Next Login<\/strong><\/p>\n<p>When setting up a user account, it is common practice to require new users to create their own password immediately after their first log on. The follow SQL script will do this task:<\/p>\n<p><code>CREATE LOGIN user_name<br \/>\n   WITH PASSWORD = 'user_password' MUST_CHANGE,<br \/>\n   CHECK_EXPIRATION = ON;<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/07\/create-new-login-in-sql-server.png\" alt=\"\" width=\"523\" height=\"275\" class=\"alignnone size-full wp-image-12151\" \/><\/p>\n<p>When the new users try to connect to SQL Server, they will be prompted to change their passwords:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/07\/force-sql-server-user-to-change-password.png\" alt=\"\" width=\"402\" height=\"256\" class=\"alignnone size-full wp-image-12152\" \/><\/p>\n<p><strong>Part 2: Force Existing Users to Change Password at Next Login<\/strong><\/p>\n<p>Open up SQL Server Management Studio and connect to your database. Under the Object Explorer tree on the left, expand to <strong>Security<\/strong> -> <strong>Logins<\/strong>. Right-click on a user you want to modify and select <strong>Properties<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/07\/sql-server-logins.png\" alt=\"\" width=\"543\" height=\"404\" class=\"alignnone size-full wp-image-12153\" \/><\/p>\n<p>By default, the &#8220;<strong>User must change password at next login<\/strong>&#8221; option is greyed out. In order to access this option and force a password change, you need to change the password. After entering the new password, you can then check the &#8220;<strong>User must change password at next login<\/strong>&#8221; option, click <strong>OK<\/strong> to apply your changes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/07\/sql-user-must-change-password-at-next-login.png\" alt=\"\" width=\"590\" height=\"463\" class=\"alignnone size-full wp-image-12154\" \/><\/p>\n<p>The above steps could also be done by executing the following T-SQL command:<\/p>\n<p><code>ALTER LOGIN user_name<br \/>\n   WITH PASSWORD = 'new_password' MUST_CHANGE,<br \/>\n   CHECK_EXPIRATION = ON,<br \/>\n   CHECK_POLICY = ON;<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2018\/07\/force-sql-login-to-change-password.png\" alt=\"\" width=\"573\" height=\"257\" class=\"alignnone size-full wp-image-12155\" \/><\/p>\n<p>That&#8217;s it!<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>&#8220;For security concerns, I have to force all users in SQL Server 2016 to change password at the next login. But when I check the Properties tab, the option &#8220;User must change password at next login&#8221; is greyed out. Any suggestions? Thanks!&#8221; In this tutorial we&#8217;ll show you the simple ways to force users to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,7,10],"tags":[3867,3865,3866],"class_list":["post-12145","post","type-post","status-publish","format-standard","hentry","category-others","category-sql-server","category-tips-tricks","tag-sql-server-force-password-change","tag-sql-server-login-must-change","tag-sql-server-user-must-change-password-at-next-login"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/12145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/comments?post=12145"}],"version-history":[{"count":7,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/12145\/revisions"}],"predecessor-version":[{"id":12158,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/12145\/revisions\/12158"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=12145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=12145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=12145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}