Samba confusion Hass.io

So I am trying to configure my hass.io running on synology box via synology virtual machine manager.

I wanted to add samba shares to make this a lil easier as I was having trouble using the webui adding custom components.

The problem is the shares never show up or dont allow me to login. Now this could be only come from something about how im running hass.io in a virtual machine or something else. I don’t believe its a VM thing but its possible. I have no issues reaching the VM even through SSH. So why samba?

Here is my samba share config.

workgroup: workgroup
username: hassio
password: hassio
interface: ''
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 'fe80::/10'
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes

Questions/issues:

  1. The allow hosts lines are sorta confusing I’ve left them as is and changed them but ultimately I just want hosts from my subnet which is 192.168.25.1-254. How do I do that? Yes I’ve tried just adding 192.168.25.0 and it does not work.

  2. Why are all my samba requests denied? I am trying this on both a mac 10.12 and windows 10 with the same results, requests for samba share access denied.

Here is my part of my log:

Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50110 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50111 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50112 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50114 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50115 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50116 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50121 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50125 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50126 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50128 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50129 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50130 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50144 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50145 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50146 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50147 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50148 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.26 (192.168.25.26)
Connection denied from ipv4:192.168.25.26:50149 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.16 (192.168.25.16)
Connection denied from ipv4:192.168.25.16:62279 to ipv4:192.168.25.61:445
Denied connection from 192.168.25.16 (192.168.25.16)
Connection denied from ipv4:192.168.25.16:62278 to ipv4:192.168.25.61:139
Denied connection from 192.168.25.16 (192.168.25.16)
Connection denied from ipv4:192.168.25.16:62277 to ipv4:192.168.25.61:445
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
send_election_dgram: Sending election packet for workgroup REALM on subnet 192.168.25.61
run_elections: >>> Won election for workgroup REALM on subnet 192.168.25.61 <<<
become_local_master_browser: Awaiting potential browser state. Current state is 4
Could not find child 321 -- ignoring 

add 192.168.25.0/24 -> that is everything from 192.168.25.1 to 192.168.25.254

workgroup: workgroup
username: hassio
password: hassio
interface: ''
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 'fe80::/10'
  - 192.168.25.0/24
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes

Oh, and restart samba after changing it.

1 Like

Ok did that but it still not showing up, stopped and restarted service. Can I removed 10.0.0.0/8 & 172.16.0.0/12? Those are not my subnet but when I remove them it seems to cause issues. Also what does fe80::/10 do?

Is there some sort of issue with sinology that I need to fix to make the shares work?

I went ahead and tried a few things to see what they would do. I disabled SMB 1.0 in windows and on the symlogy box (although I think the settings dont affect HASS.IO). Once I did that the shares from synlogy showed up again using SMB 2.0, but still noting from HASS.IO. I believe the smb share add-on in HA is using SMB 1.0 only and I know it has lots of issues. Is there a way to get SMB 2 or 3 on hass.io? I’ve rebooted windows a bunch of times, turned off its SMB settings and back on and nothing seems to work. ideas?

Removing the 172.16.0.0/12 will cause issues, that’s the way internal docker network range. And don’t remove smb 1, or it will not work at all.

I found this over on another thread and I’m not sure why this is not part of the config for smb in HA. But windows does not like guest access, so disabling it helps the share to show up, However I still cannot gain access to it. I also tried on android and its the same issue, login ok but no shares.


joealmonte
Jose AlmonteToday is the anniversary of the day I joined this community!

May '18

I am using MS WIndows 10 Pro to access Samba’s share. I can easily access it by typing: \hassio (that is backslash backslash lowercase hassio).
As soon as it connects to the share it will require authentication. I have set Guest option to False, and specify an Username and Password. Once you have access to the share, then you can proceed to Map a drive letter for easier access in Windows.

Here is my Samba config:
“guest”: false, <======== Microsoft don’t play nice with Guest access. So set it to False.

I also found this. Going to play around with 192.168.0.0/16

192.168.1.0/24 lets any 192.168.1.x address (1-254) This is what you probably want to use.

192.168.0.0/16 lets any 192.168.x.x address connect (0.1 through 255.254)

192.168.0.0/32 lets only 192.168.0.0 address connect (which is not a valid address for a host)

192.168.1.12/32 lets only 192.168.1.12 address connect.

The problem is you were allowing 192.168.0.0/24 (hosts starting with 192.168.0) but your PC is on 192.168.1.0/24 (subnet with hosts starting with 192.168.1).

If you’re curious, that’s a subnet mask. IP addresses are 32 bit numbers and the “slash, number” like “/24” means all hosts with the first 24 bits matching are allowable. You could even do 192.0.0.0/8 and that’d let all 192 addresses connect. Tip: eight bits at a time for each number between the dots, conveniently known as an octet.

You don’t even have to do multiples of 8 as in 192.168.1.0/28 would let 192.168.1.1-192.168.1.15 connect.

I’m still at a loss over getting samba to work. In both OSX and windows I can get the login to show up but as soon as I add the drive it says the specific network name is no longer available.

Hi, wanted to add my experince witht the samba setup:

I tryied every thing chekcing the ip range, Enable SMB1 (see https://winaero.com/blog/enable-smb1-sharig-protocol-windows-10/), remembering to have a password that was not the same as longin.

every time I got the :
image

Then I found this in my log:

I changed the config so from - ‘fe80::/10’ to - ‘fdfe::/10’ like the first part of my ipv6 number.

allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/8
  - 'fdfe::/10'

The I could get the prompt from windows and login

Please note this was a lan connection to a PI3.
I hope this helps you if you have trouble.

1 Like

Thanks. That worked for me.