/ linux

Samba share for Homeassistant configuration on raspberry

Install components

sudo apt-get install samba samba-common-bin

Edit config file:

sudo nano /etc/samba/smb.conf

Add raspberry to your windows workgroup, set authentication to local-user-based and add a global share (in this case used for configuration files of home-assistant):

workgroup = <your workgroup>
security = USER

path = /home/homeassistant/.homeassistant
writeable = yes
read only = no
create mask = 0644
directory mask = 0755
guest ok = no

Adding a user/setting password:

sudo smbpasswd -a <accessing-user> 

All configuration files belong to homeassistant:homeassistant, therefor we need to add the (remote)accessing-user to those groups (homeassistant- & pi-group):

usermod -a -G homeassistant pi <accessing-user>

It might be useful to change the permissions of configuration-files for group-users to update those files:

sudo chmod g+w *.yaml

Restart service sudo systemctl restart smbd.