Samba config keeps changing?

I am setting up Home Assistant on a new Raspberry Pi. When I get to setting up Samba, I can’t change the config.
Here is what I am entering. (It’s the same as on my working Home Assistant except the name).

{
  "workgroup": "MSHOME",
  "name": "hass",
  "guest": false,
  "map": {
    "config": true,
    "addons": true,
    "ssl": false,
    "share": true,
    "backup": true
  },
  "username": "hass",
  "password": "raspberry",
  "interface": "",
  "allow_hosts": []
}

I click on Save, then on Start, and the config changes to:

{
  "workgroup": "MSHOME",
  "username": "hass",
  "password": "raspberry",
  "interface": "",
  "allow_hosts": []
}

Stranger yet, the log shows some IP addresses that make no sense to me. My Pi is at 192.168.1.26

making subnet name:172.30.32.1 Broadcast address:172.30.33.255 Subnet mask:255.255.254.0

At the end of the log:

*****
Samba name server HASS is now a local master browser for workgroup MSHOME on subnet 172.17.0.1
*****
*****
Samba name server HASS is now a local master browser for workgroup MSHOME on subnet 172.30.32.1
*****
process_host_announce: incorrect name type for destination from IP 192.168.1.4 (was 1e) should be 0x1d. Allowing packet anyway.
process_host_announce: incorrect name type for destination from IP 192.168.1.4 (was 1e) should be 0x1d. Allowing packet anyway.
process_host_announce: incorrect name type for destination from IP 192.168.1.4 (was 1e) should be 0x1d. Allowing packet anyway.
process_host_announce: incorrect name type for destination from IP 192.168.1.4 (was 1e) should be 0x1d. Allowing packet anyway.

(192.168.1.4 is my NAS device).

Any clues what I missed in the setup?

Looks like the config options have changed. You can no longer map shares or use the guest option. This is the default config:

{
  "workgroup": "WORKGROUP",
  "username": "",
  "password": "",
  "interface": "eth0",
  "allow_hosts": [
      "10.0.0.0/8",
      "172.16.0.0/12",
      "192.168.0.0/16"
  ]
}

I didn’t see any red (error) text, and even with the default and my workgroup, Samba shares still aren’t present. And what’s up with those strange IP addresses in the log file?

Also, when I start with the default, then just change my workgroup name, I get this error:

not a valid value for dictionary value @ data['options']. Got {'workgroup': 'MSHOME', 'username': 'hass', 'password': None, 'interface': '', 'allow_hosts': ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']}

I think 172.30.32.1 has something to do with docker container NAT.

You need to supply a password.

172 is the docker container and it adds local addresses - 192. And 10. By default.

I only have workgroup, username and password set in mine now. Pretty sure I did that after I read the docs for the updated add-on. (And the default allowed hosts)

I just tried reset to defaults, and I get the same error when I click on Save.

So do you then click on restart?

So you set default and only enter workgroup, username and password and when you restart the addon it goes back to defaults again?

Also need to check the hostname in hassio>system as that will be the samba address…

Yes, exactly. When I click on Start, the config goes back to the defaults.

The defaults wont actually work. You have to supply a username and password.

That’s the problem. I start with the default then add my workgroup, username and password. When I click on “Start”, the config goes back to the defaults.

You do click on save after you enter them before you click start?

Yes. Reset defaults, change workgroup, username, password then click “Save” then Start. Then the config then goes back to the default.

So if you save the settings and click on refresh do the saved settings show? Is it actually accepting your settings?

Yes. the new settings show until I click on Start.

The only difference between your config an mine is the workgroup. As an experiment, what happens if you leave the default workgroup?

Thanks for hanging in there with me.
Maybe a bit of sleep made all the difference, but it’s working now. I really don’t know what I did differently. But here’s a recap:

This is what I get when I press “Reset to Defaults”
HA-Samba1

This is what I get when I press “Save”

HA-Samba2

Adding a password makes the error go away:

HA-Samba3

I changed the workgroup, save, then restart. No errors and on the PC was able to map a drive to it.

I think Tom said several times you have to use a password. If the config is invalid, that’s why it won’t save (no password is invalid). It didn’t sound like that was your problem though…

It was, and I really appreciate your sticking with me with this.

Steve

1 Like

You should imput user name and password by the login account to Hassio and save that before start samba.
Thanks

This solved the issue for me.