Trouble with Autostart using Systemd on my Raspberry Pi

I am having trouble setting up the Autostart using systemd for Home Assistant. Whenever I try to create a file using the text provided in the "Home Assistant Starter Guide"and input my password for my Raspberry Pi within terminal, I get a “su: Authentication failure.” I’m inputting the correct password.

I also tried using the alternative method where I download the sample file from github, but it doesn’t work. When I check the status, it says:

Active: failed (Result: exit-code) since Mon 2016-07-25 03:34:13 UTC; 15s ago
Process: 1865 ExecStart=/usr/bin/hass --runner (code=exited, status=203/EXEC)

This is happening I believe because the “ExecStart” location is incorrect. It should be “/usr/local/bin/hass” using the “whereis hass” line. Is there way I can go to the file and edit? Sorry I’m a complete newbie. Any idea on how to resolve this?

To give you some background, I’m using Raspberry Pi 2 for my Home Assistant setup with Raspbian Jessie.

Thanks! I appreciate your help.

You should be able to edit the file:

$ sudo vi /lib/systemd/system/home-assistant@[your user].service

Don’t forget to reload when you are done $ sudo systemctl --system daemon-reload.

This worked! Thank you and in the process, I learned how to use the Linux Vi editing tool. As a person who never played around with the Vi editing tool, it was a bit tricky, but once you get the hang of it with the keyboard commands, I was able to edit the file with ease.

Thanks again! Now, I’m onto integrating my components.