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?
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.
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?
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:
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).
Login via ssh to the OS. I use a docker container on an Ubuntu 20.04 VM.
Login to the homeassistant docker container: e.g. docker exec -it 7c1c652821a8 /bin/bash
cd to the .storage folder
Ran a grep <username> *
Found that the file auth_provider.homeassistant has the password hashes in it.
Edited that file and copied the password hash for the new temp user I created and replaced the password hash for my user.
Went back to the HA gui and logged out as the temp user.
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.
@skewbie : thanks for the suggestion, but it didn’t work for me.
Making use of the Home Assistant Community Add-on: SSH & Web Terminal version of SSH, I logged in via SSH.
I then used docker container ls to list the containers, followed by docker exec -it <homeassistant_conatiner_ID> /bin/bash to log into it.
I did the grep and found the file you found. I then copied the new user’s hash to my old user and saved. I confirmed the change using cat. However, whilst I’m still able to log into my temp account, I am unable to log into the Owner account. I did not restart my HA at this point, which may have made a difference. Otherwise, it is possible that salt has been added to the hash?
You only can do this in the UI when you are logged in as owner.
If you are not the owner of the installation there is no reset password option.
If you want to reset the password of the owner account do this. Tested on Version 2022.7.3