Have you forgotten your Sitecore admin password and want to reset it? If yes, follow this article to reset the password on SQL Server.
Sitecore is a powerful CMS used by many businesses to create and manage websites. One of the most important components of Sitecore is its admin interface, where you can manage the entire content pipeline, configurations, and more. However, there may be times when you forget your Sitecore admin password, which can create a lot of frustration. In this blog, we’ll walk you through the process of resetting the admin password in Sitecore.
Why Reset the Admin Password?
Sitecore’s admin interface is a crucial part of the system. If you’ve forgotten the password or if you are locked out due to security issues, you’ll need to reset it to regain full access. The password reset process can be done quickly, but there are several methods depending on your setup.
Method 1: Resetting the Password via Sitecore’s Database
The first method involves accessing Sitecore’s database directly. This is ideal when you can’t remember your admin credentials.
Steps:
- Log into SQL Server Management Studio (SSMS):
Open SQL Server Management Studio and connect to the database where Sitecore is hosted. You’ll need the credentials to access the Sitecore database. - Select the Sitecore Database:
Once logged in, locate and expand the Sitecore database, typically namedmaster. - Find the User Table:
Navigate to theCoredatabase and open theAspNetUserstable. Here, you will find a list of all users in Sitecore, including the admin account. - Update the Admin User’s Password:
Locate theadminuser, and update the password field using the following SQL command:sql:UPDATE [dbo].[AspNetUsers] SET PasswordHash = 'your_encrypted_password_here' WHERE UserName = 'admin'Note: You need to encrypt the new password (e.g., using a tool like bcrypt). Simply replacing the password as plain text will not work because Sitecore uses encrypted passwords. - Save Changes and Exit:
After the changes have been made, save them and exit the SQL Server Management Studio. - Test Your New Password:
Try logging into Sitecore using theadminaccount with the newly set password. If successful, you can now access the admin interface.
Method 2: Resetting Password via Sitecore PowerShell Extensions
If you have Sitecore PowerShell Extensions installed, you can reset the password more easily through the PowerShell console.
Steps:
- Open Sitecore PowerShell Console:
In the Sitecore backend, navigate to the Sitecore PowerShell Console. You can usually find it in the Launchpad or under theSystemsettings. - Execute the Reset Command:
Run the following PowerShell script to reset the admin password:powershell:$admin = Get-User -Username "admin" $admin | Set-UserPassword -Password "new_password"
Replace"new_password"with the desired password. - Save and Test:
Once the command is executed successfully, try logging in to the Sitecore admin interface using the new password.
Method 3: Resetting via the Sitecore Admin Interface (if you have access)
If you still have access to Sitecore with an alternate user, you can reset the admin password from within the Sitecore interface.
Steps:
- Log in with an Alternate User Account:
If you have another user with admin privileges, log into Sitecore using that account. - Navigate to User Management:
Go to theSecuritytab in the Sitecore interface and selectUser Manager. - Locate the Admin User:
Search for theadminuser in the user management section. - Reset the Password:
You will see an option to reset the password. Enter the new password and save your changes. - Log in with the New Password:
Log out of the current session and try logging in with theadminuser account using the newly reset password.
Method 4: Reset Password via Sitecore’s Web.config (Temporary Solution)
If you’re in a pinch and can’t reset the password through the database or PowerShell, you can use a temporary workaround via the
web.config file.Steps:
- Locate the
web.configFile:
Go to the Sitecore installation directory and find theweb.configfile. - Enable Administrator Login via Configuration:
Add the following line under the<appSettings>section inweb.config:xml:<add key="EnableAdminLogin" value="true" />This setting will allow theadminuser to log in with the default password (b9b45dd3f2a04c7b87f5a22db37d6).b9a - Log in and Change the Password:
After adding the setting, you can log into Sitecore with the default password and change it to something more secure. - Remove the Configuration Line:
After successfully resetting the password, remove the line you added inweb.configto ensure the security of your Sitecore instance.
Happy learning!

No comments:
Post a Comment