Password for hass

I am going through the process of setting up Home Assistan,t and particularly Z-wave, on a raspberry pi3.
I seem to be logged in as hass and whenever I sudo it gives some spiel about the usual lecture and demands password for hass.
I have not set a password, it will not accept my usual pi password, nor the default pi password nor will it accept a simple return from the keyboard.
Everything I read through Google says the hass user has no password.
Unfortunately, my installation so far disagrees with that statement.
Will all the set up command operate correctly if performed from user pi, or do I really need to be user hass?
How do I move past this point?

Regards, Paul Dixon

the homeassistant user is not in the sudoers group and therefore can not use sudo.

anything that needs sudo will have to be done by another user. If you’re just logging in and need to edit a file or whatever it’s pretty simple to just do it as the pi user executing sudo vi/emacs/nano filename.ext

1 Like

I just followed the instruction on the instruction page and that is where it took me.
Prior to that it had cautioned against doing certain things as a different user as it would mess up the permissions.
That combination leaves me a little confused, hence the question.
So am I correct in assuming that you confirm I can proceed with the list of commands as user pi?

yes, anything that requires sudo is run as your normal users. The only time you need to be the homeassistant user is when you’re installing something that is hass specific, ie a library or component that you don’t want messed with during system updates etc. Most tutorials will let you know when you need to switch over to the virtualenv( if you’re running that)

If you follow the tut it’ll work. I just did the same 2 days ago.

Thanks for the help, I will carry on with the process tomorrow.

As per manual Raspberry Pi install on Raspbian Lite in Python Virtual Environment, I’m trying to create the .homeassistant directory under srv/homeassistant/ which is owned by the homeassistant user.

As stated in this thread that user isn’t in the sudoers group. The directory cannot be created without sudo privileges, I can’t create the directory as it’s not possible to set a password.

Is it possible to chown the /srv/homeassistant/ directory, currently owned by the homeassistant user, as the pi user? Then create the .homeassistant directory as a sudoer user?

Consequently could I disown /srv/homeassistant as pi user afterwards?

The tutorial in above link needs some work done to it, as it is missing some vital details that several forum users have pointed out!

I know what I’m asking is due to lack of UNIX/Linux experience. Forums like this seem better than wading through manuals and courses, because the users on them are so cool.

the pi user is in sudoers. the homeassistant user is not.

you create the directory with sudo as user pi, then change ownership to the user homeassistant. Then you just switch to the homeassistant user with the command sudo su -s /bin/bash homeassistant

if you just follow the directions on the link you should never need to sudo anything as the homeassistant user.

try logging in and just copy/pasting the commands… super simple

I am in the same boat.
How exactly (as in interactions not opinions) do I get pass this?
Because right now I cannot move forward with the tutorial… at all without that password.
What do I type next?

thank you

ps.
I am trying to autoboot the hass service, installed manually (ok) over Raspbian.

The password is the password you logged into your system with.if you haven’t changed the default I believe its ‘raspberry’.

I tried that first thing. It is not.
I am headless so I couldn’t forget/mistype since I am in the system now :slight_smile:

In the setup here https://www.home-assistant.io/docs/autostart/systemd/
it says I have to create a file with sudo nano … after that it prompt for password and it is not my pi user pass… and I am stuck.

I am trying via systemd to make it autostart.

you can’t be the homeassistant user. You’re logged into your virtualenv. You need to be logged in as the normal user you normally log into the system as. once you ssh in you should be able to just type sudo su and get a root shell. Then you can do all the stuff you need to and then exit out and reboot.

mta: the virtualenv user homeassistant is not in the /etc/sudoers and therefore can not run su commands.

1 Like

That tutorial assumes too many things.
I wouldn’t know that, thank you.
As a pi user it worked.

1 Like