Recently Umbraco added a “Forgotten password?” link to recover your backend password in case you forgot it.
But what if you
- didn’t add a mailserver to your umbraco project?
- don’t know the emailadress you used?
- don’t have access to that emailadress anymore?
You can change the Umbraco backend password directly in the database
For this solution you only need access to the database of your umbraco system. The most common types of database are Microsoft-Server-Databases, SQL-Databases and CE-Databases.
The first two you can inspect with Microsoft SQL Server Management Studio which is usually installed on a microsoft server.
To make changes to the CE-Database, download the file
App Data/umbraco.sdf to your PC and get a Tool from the internet to edit CE-Databases. After the changes replace the file on the server with the altered file.
Find the umbraco user in the database
Umbraco users are stored in the table
umbracoUser. Open this table and look for the user you want to change. If you are using Microsoft SQL Server Mangament Studio you can use the picture above to orient yourself.
You will need the Id of the user for the next step.
SQL-Query to change Umbraco-Password
After getting access to the database we want to change the password. We can’t just look it up, as it is hashed. But we can change the password-hash to a diffrent hash for which we know the corresponding password.
In case of Umbraco I usually use:
You can change the hash with an editor or simply use this sql-query:
UPDATE umbracoUser SET userPassword='/7IIcyNxAts3fvQYe2PI3d19cDU=' WHERE id=0
Remember to change the Id according to the user you want to change.
You should now be able to login with the changed User and ‘password’. You should change the password to something more secure as fast as possible.
I hope this helps. If you run into problems, write a comment. I will do my best to help you.