Unlocking the Sitecore admin password can be crucial if you find yourself locked out of your Sitecore instance. Here’s a detailed guide on how to unlock the Sitecore admin password using various methods.
Method 1: Using the unlock_admin.aspx
Page
This method involves using a special ASPX page provided by Sitecore to unlock the admin account.
Copy the ASPX File:
- Locate the
unlock_admin.aspx
file in your Sitecore installation package. - Copy this file to your
Website\sitecore\admin
folder, overwriting the existing file if necessary. - Access the page cm.domain/sitecore/admin/unlock_admin.aspx
- Locate the
Update
web.config
:- Open your
web.config
file located in the rootWebsite
folder. - Ensure it contains the following settings:
- Open your
- Access the Unlock Page:
- Navigate to
https://YourSitecore.com/sitecore/admin/unlock_admin.aspx
. - Click the "Unlock Administrator" button.
- You should now be able to log in to your Sitecore instance.
Method 2: Using SQL Server
If you have access to the SQL Server database, you can unlock the admin account directly by modifying the database.
Access SQL Server:
- Open SQL Server Management Studio (SSMS) and connect to your Sitecore database server.
- Navigate to the
website_Core
database.
Modify
dbo.aspnet_membership
Table:- In the
dbo.aspnet_membership
table, locate the rows where theIsLockedOut
column is set to1
and theComment
column says "Sitecore Administrator". - Update the
IsLockedOut
column toFalse
.
Example SQL query:
- In the
Method 3: Programmatically Reset Password
You can also unlock the admin account and reset the password programmatically using a script.
- Use the Following Script:
Create a script in your Sitecore solution to unlock the user and reset the password.
Example C# script:
This script will unlock the user and reset the password to
b
.
Method 4: SQL Query to Reset Password
Another method involves directly resetting the password using an SQL query.
- Run SQL Query:
Execute the following SQL query to reset the admin password to
b
:- This query works on all versions of Sitecore.
Conclusion
These methods provide different ways to unlock the Sitecore admin password, whether through the Sitecore interface, SQL Server, or programmatically. Choose the method that best suits your access level and technical comfort.
Happy Unlocking..!! 😀 😀
Comments
Post a Comment
Please do not enter any spam link in the comment box