Not sure if there is a topic for this already, but here goes.
For anyone who has lost owner account access or has previously deleted the owner account, I discovered a way to update/change the account viewed as owner by home assistant.
You will need to install and configure SambaShare. Once the add on is running, download and open X-plore from the app store on your android device. I am unsure if this application is available on iOS.
Open the app and scan your LAN for servers. Home assistant will appear I n need the list. Click on it. From there click on the config folder. Make sure you have gone into app settings and turned on show hidden folders. Open the âauthâ file using X-plore file editor. Once open, scroll down until you find the user you wish to make owner. Change 'owner: false, â to âowner: true,â and save the file. You will be asked if you want to save the file to the original location. Select yes.
After this, you will need to restart home assistant. After rtart, the account will now be listed as owner.
This process has only been tested on Hass.io. not sure about success with other installation methods.
Iâm using the Home Assistant Blue and MacBook Pro, and this info got me nearly to what I needing. I needed to change a âusernameâ that was misspelled. Here are the steps I took, in case they can help anyone who gets here after me.
01. Setup "Samba share" from the Supervisor.
02. SSH into your Home Assistant device.
03. Type - "cd config/.storage"
04. Type - "nano auth"
05. Fine the username I need to edit, and change it.
06. Press - "CTRL + O" -> "Return" -> "CTRL + X"
07. Type - "nano auth_provider.homeassistant"
08. Find the username, and change it.
09. CTRL + O -> Return -> CTRL + X
10. Type - "ha core restart"
11. Type - "exit"
Oh, Iâm not familiar with how the HA Blue works, maybe thatâs how you activate ssh, but thatâs strange.
Samba is a way of creating a network share for a folder using SMB. So youâd typically open your explorer and browse to //SERVER_IP/SHARE to see and edit the shared files.
SSH is a way to get a remote command line.
You can then do nano or vim to edit files, like you did.
Hi everyone. Iâm new here and Iâm trying to change the âOwnerâ user. Iâm Administrator but I need to cancel the previous âOwnerâ and become the âOwnerâ myself. Is there an easy way to do it? Iâm doing my best but itâs so hard for me to manage this application.
Thanks to everyone whoâll help me!
There is a file you can change â/config/.storage/authâ
This file has settings for each user in it. Find the section with the user account you would like to be an owner.
Simply change the line "is_owner": false,
too "is_owner": true,
Hi Francis.
I do not have the file you are mentioning â/config/.storage/authââŠWhere can I find it?
I can log in with the user account if this could help.
Maybe I can simply change user name and display name? I can also change the settings in the configuration menu / entities? and also in the developer tools menu / states?
I really sucks at this
Thanks for the detailed instructions. I followed your steps starting at 3 after using Terminal within the HA web client. I wanted to change my username. After the restart I it auto-reconnected and resumed being logged in with my previous username. I scrolled down the sidebar and clicked on my profile name, then scrolled around to find the logout link. Then had to use the new username to log in.
Hereâs what I did when I lost access to the owners account (forgotten password) - might be of use to others looking at this thread.
Luckily I had another admin account (say user2) so logged in using that.
Using Terminal & SSH add-on navigated to config/.storage
Used nano to edit auth_provider.homeassistant, copying known user2 password to that of owner.
Saved, rebooted and all good
Update: I tried the method with SSH and this worked like a charm. So I do not know why it did not work using the windows file editor with Samba Share⊠but problem solved with SSH.
Thanks @PixelRubble this was a life saver as I had locked myself out of my Owner account.
The Iâm locked out page was only half of the answer for me as an admin canât reset the password of the owner.
By using the steps you described + using the Terminal &SSH add-on I was able to temporarily switch the owner status over to the temporary Admin user I created.
Logging in as the temp user I was then finally able to change the password of the real owner.
After that I switched the owner status back.
Had exactly the same issue. Did what you suggested but created an additional pair of users with different passwords and tested by copying the password: line from one user to the other so that they would have the same password. After a restart (settings | system | restart home assistant), I was able to log into both users with the same password (success!). Only then did I have confidence to copy a known password line to the owner user and reboot. Now I have all my passwords in a password database.
Incidentally, there is a HA page called âIâm locked out!â which advises to log in to the HA instance with the terminal (& SSH of course) and use the command auth reset --username existing_user --password new_password
to change the password. This did not work and gave me the error zsh: command not found: auth
So I kept searching and found this answer.
Thanks!
This does not work for me in the way you had described it even though i have even restarted HA by a reboot each time.
After changing the username from abc to ab in both files I was no longer able to enter the system neither as ab nor as former abc .
I always got a message that password or user were wrong.
I went forward and tried a lot of things like creating a new user , giving that one the Owners privilege and admin rights but once everything is done and i had logged out I was able to log in but THEN the in systems - PERSON the 2nd owners tab called users was missing as you can see here
I do not know what to do and how to get the system working as planned cause too much effort went into building this system up in the hope that I would finally be able to solve the mystery from the beginning, the wrong username.
BUT: there is a hidden way to get access to that content , this user view
You need to enter the proper url for that site which means to replace /person by /users
Therefore any proper way to rename the owner and admin will be appreciated cause I do not wanna go with those risks involved like only a hidden function to add a new user through a backdoor.