Improved resetting your Sitecore Admin password to ‘b’ when using SHA512 hashing

Previously I’ve posted how to do this – but it was a bit hacky. You had to know your Admin’s UserID, which can change between instances now. So, here’s the SQL to do it for any Sitecore\Admin user…

Update membership 
    set [Password] = '2hwfEqtM7gDFekQaV/IOkog5DFmxRtywvUsRJqRf7j82Ns3pUkiu/WohjLk8mIV2+7MjXdMeO9MgAUjildTLtg==', 
	[PasswordSalt] = 'ETJOU1+PX4CwEOw/eN3F6Q==',
	[IsLockedOut] = 0,
	[Comment] = 'Sitecore Administrator (512)'
from [aspnet_Membership] membership
INNER JOIN [aspnet_Users] users ON membership.UserId = users.UserId
WHERE users.UserName = 'sitecore\Admin'
Improved resetting your Sitecore Admin password to ‘b’ when using SHA512 hashing

Reset your Sitecore Admin password to ‘b’ when using SHA512 hashing

Okay, this this relates to my recent post on password hashing in Sitecore, and why we should move away from SHA1. Let’s say you’ve decided to use SHA512 for a brand new instance like Sitecore recommend…

When you create a new website, you must change the weak default hash algorithm (SHA1) that is used to encrypt user passwords to a stronger algorithm.

To change the hash algorithm:

  • Open the web.config file and in the node, set the hashAlgorithmType setting to the appropriate value. We recommend SHA512.

Okay, funky, but how do I make the existing admin’s password work? Continue reading “Reset your Sitecore Admin password to ‘b’ when using SHA512 hashing”

Reset your Sitecore Admin password to ‘b’ when using SHA512 hashing