How to change user's password

After recent iOS app on my girlfriend mobile phone, it’s asking for authentication. But we don’t remember the password.
How can I change the password?
Obviously I have access to console, but ha auth reset command ends up with:

this command is limited due to security reasons, and will only work on some locations. For example, the Operating System terminal

BTW when in console, login command asks for credentials. I was sure it didn’t ask for anything in the past. If I enter root it returns to CLI prompt immediatelly after several seconds. If I enter other login name (ie my HA login) it asks for password but my HA credentials doesn’t match.
Can you give me some cues, please?

In the console of the host, the only user account available is “root” with no password.

Once you log in there, as you seem to have been able to before, enter:

auth reset --username existing_user --password new_password

Where existing_user is the name of the account you are trying to reset, and new_password is the new password.

thank you, so why I get this:
obrazek

and this:

Next version of HA does allow passwords to be changed in the UI.

You’re getting that message and it’s not working because you’re trying to do this over SSH.

You need to be at the local console. If this is installed as the OS, attach a keyboard and monitor to your Pi (or NUC, etc).
If it’s a VM, those typically allow console access, you have have to google how.
If this is a Supervised install on another OS, there’s a way to do it but I don’t recall how unfortunately. I’m sure it’s been covered on this forum previously, you might be able to find it by searching.

Or as @Dansker said, you can wait until Sept 17th when the new version of HA is out, then you can do it via the GUI.

I think you can delete your gf’s username and re-add it.

In short to change pwd of other user (while I’m admin) I need physical access to the server.
I’ve never seen such level of security in my whole life. Maybe in movies. It’s sick.

btw: what security since removing and re-adding user does the job? It’s a bad joke.

Thank you all for clarification guys.

Do you know why login root command doesn’t move me out from cli?

1 Like

I am a new Home Asistant user and also forgot my Owner password. I discoverd that I had forgotten my password when I installed the MacOS desktop client and couldn’t login to that. Luckily I was still logged in to the web gui and here is how I managed to get ‘restore’ my owner password:

  1. Created a new Admin user and set a basic password and logged out as me and in as the new temp admin. This was in a ‘help’ page for recovering lost Owner password but the new Admin user has no rights to reset the Owner password in the gui (at least not that I could find).
  2. Login via ssh to the OS. I use a docker container on an Ubuntu 20.04 VM.
  3. Login to the homeassistant docker container: e.g. docker exec -it 7c1c652821a8 /bin/bash
  4. cd to the .storage folder
  5. Ran a grep <username> *
  6. Found that the file auth_provider.homeassistant has the password hashes in it.
  7. Edited that file and copied the password hash for the new temp user I created and replaced the password hash for my user.
  8. Went back to the HA gui and logged out as the temp user.
  9. Tried logging in as me and it worked using the password that I had set for the temp user.

I hope this helps others and is clear enough. If not then send me a message and I’ll see if I can help.

NOTE: I am a newbie HA user so my knowledge on this is basic but I am a longtime linux admin so can help on that side.

Cheers

EDIT: typos

1 Like