19

I know you can unlock normal Sitecore users from user manager by login in to Sitecore backend, as admin user.

Is there any way to unlock Sitecore admin user, when the user account gets locked?

1
  • Or you can Restore the Db core backed up before you locked it
    – Adel
    Commented Jul 26, 2018 at 17:24

3 Answers 3

28

If you have direct access to the database, you can run the following from SQL Management Studio:

UPDATE  aspnet_Membership 
SET     IsLockedOut = 0, 
        FailedPasswordAttemptCount = 0
WHERE   UserId IN (SELECT UserId FROM aspnet_Users WHERE UserName = 'sitecore\Admin')

Run this from the Core database.

17

In addition to the answer above, if you have the misery of forgetting the Sitecore password then this will save you:

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')  

It resets the password to the classic 'b'.

1
  • OMG this is genius. The installation guide did not indicate what the admin default password or account was (probably buried somewhere) so was I working backwards from the database and found this answer. Cheers for this! :) Commented Feb 3, 2018 at 21:55
11

There is also an admin page:

URL: http://www.yoursite.com/sitecore/admin/unlock_admin.aspx

By default, it's disabled so you need to edit the aspx file to set enableUnlockButton to true.

2
  • This worked for me. But my concern is, Why did the admin user get locked? Is there a fallsafe in sitecore that locks the admin account if something happens? Commented Sep 5, 2017 at 7:38
  • This worked perfectly.
    – kk1076
    Commented Sep 27, 2019 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.