How to change the lost password?
I had no new onboarding flow during the first start. System asked for the user and password, which I used testing auth in pervious versions, but I lost both.
Not sure if this works in 0.77.
Rename your config/.storage folder to .storage.bak and restart HA.
Clean the cache of your browser.
Iâm have HA on MAC and canât locate such folder.
Should be in the same folder where your configuration.yaml lives.
With the point at the beginning the folder is hidden.
Donât know how to show hidden files/folders on mac.
Greta itâs work .
Thank you a lot
I made a few tests with hass.io 0.76.2 and 0.77.0b4
You have to:
- Stop HA (Services -> homeassistant.stop)
- Rename or delete the .storage folder
- Clean your browser cache and close it, also delete some cookies you have from HA.
- Start HA, youâll get the Login to create an user account
- Login with that user
I had to restart the browser and login three times to get the âSave loginâ popup. (Firefox)
Maybe helps others.
It works, thanks a lot.
A better way to do this is to
- remove
.storage/auth*
- remove
.storage/onboarding
There is no need to delete the entity registry and other configurations.
Where is this .storage located? I could not find in in Windows explorer.
config/.storage is a hidden folder. You will have to enable âShow hidden foldersâ in folder options.
I just came across this problem with my setup, forgot my password.
There are a couple of ways to reset your password without needing to recreate your user.
First way:
- Log in using the legacy password. (set in configuration.yaml)
- Create a new temporary user.
- Shutdown HA and edit auth_provider.homeassistant in /usr/share/hassio/homeassistant/.storage (on debian hassio), copying the test userâs password to your own.
- Startup HA and log in.
- Delete the temp user.
Second way (suggested by u/sweharris on Reddit)
- Log into HA system using ssh
- Enter HA environment. (I do this with âdocker exec -it homeassistant /bin/bashâ)
- Start python.
- Enter the following.
import bcrypt
import base64
password=âhelloâ
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt(rounds=12))
hashed = base64.b64encode(hashed)
print(hashed) - Shut down HA
- Replace your password in auth_provider.homeassistant with the password you got from python. (you want the part between the single quotes)
- Start HA and log in.
I used the first method to get my ID back and I tried the second on a test ID to see if it would work. (it does!)
Hope this helps anyone else having a lost password issue.
[skywise], this is genius! thank
Third way:
1. login to the homeassistant docker or console
2. hass --script auth -c /config change_password <user> <password>
3. Restart HA
You can use âhass --script auth -c /config listâ command to list the users
Thank you. Itâs a tragedy this is not in the documentation (as usual).
It IS in the documentation, as I linked to. Also, if you donât like the docs, feel free to add/edit/fix. Itâs all open source.
Saved my life. Thank you
It worked and all my previous configurations remained the same. Thanks!