简体   繁体   中英

How can i reset my Umbraco CMS admin password?

I am using Umbraco Starter Website, trying to login with credentials but cant login, i have gone through umbraco document but still cant do

在此处输入图像描述

Step 1:

Open SQL Server Management Studio Create a new query using the database for your umbraco project. Copy and paste the following SQL:

UPDATE umbracoUser SET userdisabled = 0, userLogin = 'admin', userPassword = 'default' WHERE id = 0

Run the query. This has now made sure the admin account is enabled and and set the password to default .

This won't work yet though as passwords are stored as hash values, so you need to edit a setting in the web.config file temporarily.

Step 2:

In the web.config file, at the root of your web project, use Ctrl+F to find UsersMembershipProvider

The passwordFormat will be set to Hashed . You need to change it to Clear so that you can login. Save the web.config file.

Step 3:

Go to the umbraco login page and login with the username of admin and the password of default.

Once you have logged in, you need to change the passwordFormat in the web.config again back to Hashed and press Save.

Step 4

Now you can change the password for the admin user to a different one and it will be saved in the database with a hashed value instead of clear text .

To make sure it is storing passwords in the hashed format, run this SQL query after you have changed the password.

SELECT userName, userPassword FROM umbracoUser WHERE id = 0

You should see the admin username and the hashed password.

This solution works for Umbraco 8

Find an admin user in your database

Update their password to:

WRNIcp5OKxjowAwyBbdXJw==uHFH281pvI0UQJgRdJb95T9gPT1sVXBHKhYcoW5L8LI=

To log in, use their username and that hashed password up there is actually: MyUmbracoPassword1

I came up with this because I tried the answer above and received an error that

"Cannot use ASP.Net Identity with UmbracoMembersUserStore when the password format is not Hashed"

So if you don't want to use my HASH then install a blank umbraco of the same version and setup your admin user with a password and then grab whatever the hash is for your brand new user from the database and feed it back into the system you actually want to get in to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM