Encrpt password in sp_addlogin

  • Is there a way to encrypt a password when you are setting up a new login via sp_addlogin stored procedure?

  • You could create your own stored procedure wich have the same parameters of sp_Addlogin.

    Pass the encripted password to your sp, desencript it and then from with in the sp, call sp_Addlogin and pass the password.

  • following the racosta great suggestion a good thing would be to let a job doit for you


    * Noel

  • The sp_addlogin already contains an encryption option parameter with flags. 

    The first one uses the undocumented (see here: http://www.nextgenss.com/papers/cracking-sql-passwords.pdf) pwdencrypt function to encrypt.

    The second allows you to pass in an already encrypted (best option) password for storage as part of the process.

    The third is for migrating previous logins from a prior version of SQL Server.  You can look this up in the Transact-SQL Help by searching for sp_addlogin.

    ============================================================================

    Oxymoron is not an acne cream for idiots.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply