Need Owner - have HA CLI access

Hello,
I have installed HA as a VirtualMachine on Synology and have been using it for quite some time now.

Today, I wanted to clean up an old mobile phone from the devices and saw that it was attached to a specific user. No other phones were connected to this user, so I assumed it would not be my main user. Additionally, there was a second user with the same name. However, when I could not remove the user, I removed the owner/admin flag via the web interface.

And for some reason it actually was my user - and I do not have an owner any more.

I have HA CLI access and when I run “ha> auth list”, I get the list of my users and none of them has the “is_owner” set to true.

Is there a way to use HA CLI to change this?

Thanks so much for the help!

You can try this I deleted my owner account on Home Assistant
You’ll need familiarity with vi as the CLI doesn’t have nano installed.

Thanks for the quick reply. vi would be fine, but it seems that this is not available via HA-CLI either.

Thanks for the idea, but I get an “unknown flag: --username” error.

How do I configure ssh access from HA-CLI?

I have successfully installed “core_ssh” as an addon and was also able to start it.

However, when I want to configure it via

ha addons options --slug core_ssh -o authorized_keys=“[‘ssh-ed25519 AAAAC3NzExampleKey user@laptop’]” -o password=“meinSicheresPasswort123”

I also get an “unknown flag: --slug” error…

You have to enter “login” and enter to get to the shell first.

image

2 Likes

Thank you very much, Martin! This did the trick!

Maybe I have overlooked it in the documentation, but from what I saw everybody was pointing to ssh as the only way to edit files. I think it would be great to share that you can actually edit the auth configuration from HA-CLI if you simply use “login” first.

Thanks again!

1 Like

I recommend you set up Samba Share Addon so you can simply edit these files in notepad on your PC if something like this ever happens again.

You just need to remove .storage in the addon settings Veto Files section so you can see the hidden storage folder.

1 Like