Script LOGIN HASHED PASSWORD

LOGINPROPERTY function gives you the stored has password.

SELECT LOGINPROPERTY('LoginName','PASSWORDHASH');

Output

0x020056986E23A5C403130F4B2DAD7ADBC835B9A662E70AE1937A7B7097DE2B36C58C3FDCB8912CF28DERP0A348918F559D53BF8868BA42D7FE1E400AE636862F939BC1DACFAEE3DB

To use this hashed password , you have to use HASHED keyword.

CREATE LOGIN LoginName WITH PASSWORD=0x020056986E23A5C403130F4B2DAD7ADBC835B9A662E70AE1937A7B7097DE2B36C58C3FDCB8912CF28DERP0A348918F559D53BF8868BA42D7FE1E400AE636862F939BC1DACFAEE3DB HASHED;

 

Leave a Reply

Your email address will not be published. Required fields are marked *