[Samba] [Hassio] Recreating the addon functionality over the OS via samba

I just found out about the combined power of fstab and samba.
So I ask me how to recreate the addon functionality.

after I have no Idea what I do I would like to get your input here.

[global]
#   netbios name = ??? 
   server string =  Samba %v on %L
   security = user
   guest ok = no
   load printers = no
   disable spoolss = yes
   log file = /var/log/samba/log.%m
   logging = syslog@0 file@2
   log level = 2
   bind interfaces only = yes
   interfaces = lo enp2s0 docker0 eth*
   hosts allow = 10.0.0.0/8, 192.168.192.0/24, 172.16.0.0/12

[config]
   browseable = yes
   writeable = yes
   path = /usr/share/hassio/homeassistant
   valid users = sambauser1 sambauser2
   force user = root
   force group = root



[addons]
   browseable = yes
   writeable = yes
   path = /usr/share/hassio/addons
   valid users = sambauser1 sambauser2
   force user = root
   force group = root

[addons]
   browseable = yes
   writeable = yes
   path = /usr/share/hassio/addons
   valid users = homeassistant
   force user = root
   force group = root

[ssl]
   browseable = yes
   writeable = yes
   path = /usr/share/hassio/ssl
   valid users = homeassistant
   force user = root
   force group = root



[share]
   browseable = yes
   writeable = yes
   path = /usr/share/hassio/share
   valid users = homeassistant
   force user = root
   force group = root


[backup]
   browseable = yes
   writeable = yes
   path = /usr/share/hassio/backup
   valid users = homeassistant
   force user = root
   force group = root


#after I use 2 HA instances 
[scene]
   browseable = yes
   writeable = yes
   path = /usr/share/hassio/homeassistant/scene
   valid users = homeassistant zigbee
   force user = user
   force group = user

....


Not shure what the right configuration for the netbios name would be.
so far I would guess(!) that this could be working
EDIT:
it actually works

here an example fstab entry for my seccond instance

 //10.0.0.254/scene/ /home/homeassistant/.homeassistant/scene            cifs       uid=1001,gid=1001,credentials=/home/.smbcredentials,iocharset=utf8,vers=3.0,noperm 0 0

the uid and gid is from the homeassistant user - no issues so far
passwordfile and permissions for the file to prevent unwanted access to the credentials:

$ sudo nano /home/.smbcredentials
username=msusername
password=mspassword


$ sudo chmod 600 /home/.smbcredentials

The samba reference is your friend

https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

just search for netbios name

1 Like