Openhabian default user

I’ve set up OH using openhabian on a raspberry pi, and it defaults to a UID of “openhabian” which is fine. However, when I add in a new binding through paper (say MQTT) the .cfg files are created under the owner “openhab” so there is an inconsistency in the security of files with some like addons.cfg being owned by openhabian while mqtt.cfg is owned by openhab.

This means that the samba shares are read only for openhab owned files, and therefore SmartHome-Designer fails when trying to update files owned by openhab.

Am I missing a step somewhere?


following the instructions on the openhabian install, I found the UID ‘openhabian’ in the openhabian.conf file and changed it to ‘openhab’. You have to do this before you insert the SD into th pi for the first time.

This is a hack rather than a solution. Please do not do that!

Security measures are sadly not always in line with ease of use. After openhab created these files you should chown them to openhabian or add write privileges to the group:

sudo chmod -R g+w /etc/openhab2

I can think of another solution which could be added to the openHABian setup and will look into it these days.

Irrespective of the owner of a file being openhab or openhabian, you will now be able to write to it via samba.
I’ve added the needed change to openHABian, will be part of new installations, starting now.

Thank You! I’ll download it tonight.

Could you please explain (or give me resource to understand) what is the difference between the user in bash and in karaf?

And how to change them all (username/password) including samba credentials ?