Sometimes, we may forget the Sitecore admin password that was entered during installation or after changing it. After being locked out, your only option is to reinstall the new instance.
But you can avoid that by running the simple SQL query in the core database of the Sitecore instance. Doing this will reset the Sitecore admin password to "b".
Log into the SQL server instance using SQL Server Management Studio(SSMS) and select the Sitecore instance’s core database to run the query.
Copy and run the SQL query below.
UPDATE
[aspnet_Membership]
SET
[Password]='qOvF8m8F2IcWMvfOBjJYHmfLABc=',
[PasswordSalt]='OM5gu45RQuJ76itRvkSPFw==',
[IsApproved] = '1',
[IsLockedOut] = '0'
WHERE
UserId IN (
SELECT UserId FROM dbo.aspnet_Users WHERE UserName = 'sitecore\Admin'
)
The above query also unlocks your account if it was locked due to wrong password attempts. Now you can log into Sitecore using the credentials username - admin and password - b.
This query works on all versions of Sitecore, including 8, 9, 10.1, 10.2, and 10.3.
Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.