Recently I decided to upgrade from a Raspberry Pi 3 to a PC running Ubuntu 16.04 LTS. I decided to start from scratch though and build the install from the ground up. I’ve been pretty successful so far but I hit a snag. I’m using the configuration files to install bindings and when I do I get the following error:
When I set up the Pi I thought I remembered setting permissions for an openhab user but when I look at what users have been created on the system there is no openhab user or group. I followed the install documentation for Linux and it doesn’t mention anything about an openhab user or group. Did I miss something? Do I need to add the user and permissions?
If you are installing using the package repository (highly recommended), this step (user creation) is performed by the package. Check with tail /etc/passwd to see the last users created (don’t edit this file :))
So: You have the openHAB process up & running (as user root?) and you edit /opt/openhab2/conf/services/addons.cfg (with manual installation), add persistence = mapdb and you get this error?
That’s the strange thing. I used the repository installation method and it didn’t create the proper user. OpenHAB starts up and runs just fine. I may not have it running as root though. Last time I installed on the Pi so I think the permissions may have been slightly different.
But you are correct, I open the addons.cfg file but from the repository installation location. Then in the persistence section I add the line above just as you entered it. I don’t know if the repository didn’t install correctly, if I missed a step, or if I have to adjust OpenHAB to run as root.
I do have an openhab entry in my passwd file, so that was created ok, and the openhab2.service file lists the user and group, so apparently they were created correctly. But I run the following commands:
users
and get
matthew matthew
and
groups
and get
matthew adm cdrom sudo dip plugdev lpadmin sambashare
Maybe I’m looking for the wrong thing but it seems like OpenHAB just never received permission to access the /etc/openhab file.
Yeah, the error went away. That’s so strange that it didn’t configure right the first time around. I wonder if anyone else ran into any issues with that.
Thanks for the help, I was unaware of the passwd and group files. So I will make note of that for the future.
Out of curiosity is there a way I can add user matthew to the openhab group? Since the openhab group owns the config files I was hoping to make myself a user in the group so I don’t have to change my samba login. If not I’ll just change the login.