Monday, January 10, 2011

Forgotten your admin password?

Forgotten your admin password?
No worries, if you have access to the core database then you can change the password from there. (This works in 6 and above)


Open the dbo.aspnet_Users table and find the record where the UserName column contains the sitecore\admin value.

Note the value of the UserId column of this record.

Open the dbo.aspnet_Membership table and find the record where the UserId column contains the saved value in the point above.

In this record change the current value of the Password column to the “qOvF8m8F2IcWMvfOBjJYHmfLABc=” value (this is the hash value of the “b” password).

5 comments:

  1. Sitecore 6 and above supports standard ASP.NET security model.
    Very useful post, thank You. Nice way to restore the password for admin :)

    ReplyDelete
  2. Or...


    UPDATE [Sitecore_core].[dbo].[aspnet_Membership] SET Password='qOvF8m8F2IcWMvfOBjJYHmfLABc='
    WHERE UserId IN (SELECT UserId FROM [Sitecore_core].[dbo].[aspnet_Users] WHERE UserName = 'sitecore\Admin')

    ReplyDelete
  3. Slight update for 6.4 and up (or whenever they introduced the PasswordSalt)

    UPDATE [Sitecore_core].[dbo].[aspnet_Membership]
    SET Password='qOvF8m8F2IcWMvfOBjJYHmfLABc=',
    PasswordSalt='OM5gu45RQuJ76itRvkSPFw=='
    WHERE UserId IN (SELECT UserId FROM [Sitecore_core].[dbo].[aspnet_Users] WHERE UserName = 'sitecore\Admin')

    ReplyDelete
    Replies
    1. Thanks a lot Patrick for the updated query.....
      Re-posting the updated query

      Delete
  4. Thanks a Ton for this! Just saved me countless hours.

    ReplyDelete