Reset password from HA Docker Container

The doc said it’s not possible to reset a password using auth reset --username existing_user --password new_password from the HA docker container.

See https://www.home-assistant.io/docs/locked_out/#home-assistant-including-supervised

What is the reason for that? I lost my admin password but don’t want to reset ALL the users’ password of my instance on my Docker deployed HA instance.

Any idea how can I do that since I can already do python3 -m homeassistant within the docker container.

I stumbled across this post because I also wanted to change my password and I found the solution and want to report back:

hass --script auth --config /config change_password <username> <password>

All examples from the documentation can be rewritten with hass.

3 Likes

Thanks you very very much @A.Steinel !

It works like a charm. I can bash log into the container and run the command above. I sometime must restart the container to have the new password working.

Thanks again!!! That should go into the doc.

PR for the doc opened at https://github.com/home-assistant/home-assistant.io/pull/14477

I created a new pull request similar to the one @hadim made because his was closed.

This solution was’nt working for me. I’ve found another solution given here : Update the lost password documentation when using ha in a container · Issue #108903 · home-assistant/core · GitHub