Samba share configuration

the /16 is the subnet mask and is like:
192.168.any.any/16
if you put in 192.168.1.any you would use /24
also if you had 192.any.any.any that would be /8

you also have guest true… you probably want that to be false.

have you tried \192.168.1.101 in explorer? It might just be that your PC isn’t liking the hassio anymore - it can be a bit flakey

1 Like

I mean, i connect to that address using port 8123. that works fine.

Windows is claiming that the device or resource won’t accept the connection.

Well, I turned off guest and restarted the add-on and it works. I think it was just in a funky state. Thanks for the help and the sub net explanation.

1 Like

Hi, can someone please help. I had to try and restore from a tar files, I had 2 recent backups and they both seem to not even upload, I have been told they are likely corrupt and/or incimplete.

I have rebuilt about 80% but need to access the the 4 folders with Samba and the windows share like I had before. I have Samba set up in Hassio’s add on store, but how do I map it in Windows so that I can access it from the network?

there’s nothing to map, if you know the hostname then just do \\hostname in a browser to get you to the share

1 Like

Doing it in file explorer is also a good option.

Thanks for your answer to this question, but I don’t get it at last - what’s then /12?
Trying to get my smb working with my Mac and struggling with this too

Its the basic of network configuration and has nothing to do with Home Assistant.

Think of it it like how you define a city, metro, county, state and so forth There is enough literature available to learn the basics of networking - I like this one in particular subnet guide

The good part about Samba is that it is meant to be friendly and here is a good resource - https://www.youtube.com/watch?v=RPyB6SySAdw.

1 Like

I can map \homeassistant\config or \homeassistant\media to a drive letter, but mapping \homeassistant\ gives me an error. Is it possible to just map homeassistant and not a folder?

Yeah, remove the trailing backslash

Hey, I tried to use the same method but doesn’t appear in my mac the connected server!!

workgroup: WORKGROUP
username: homeassistant
password: mypassword
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - fe80::/10
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes
compatibility_mode: false

My HA is running on the IP 192.168.3.2 and I tried to use the same logic already explain but doesn’t work me. I tried to add - 192.168.0.0/24 or - 192.168.3.2/24 and doesn’t show in connected servers.

What I’m doing wrong?
Thanks

That’s not how it works. Allow_hosts, allows the host with that IP to connect to your samba share. You’re thinking of it the other way around. What are you using to connect to samba? Windows? Mac? Linux?

Hmm I see.
I’m running macOS Big Sur v11.5.2
I tried to look in the workgroup and eth connections but cannot understand what I’m doing wrong, because I had in the past Samba running in my Pi and didn’t had problems :thinking:

Well you wouldn’t use that. It would be 192.168.3.0/24 or 192.168.3.2/32

But what isnt working? What happens if you try and connect to it? I assume you use finder on the Mac?

Hi, thank you for the message.
I don’t know what you mind by the finder.
For me just appear in my network list and I selected and he ask for the pw and user that I left in plugin and that was it, I had connection with my HA instalation.

In my “Rede” (Network) where Google drive is should appear my HA :stuck_out_tongue:

Sorry, my tech view in this is not that good.

Hi all,

My samba share log looks incomplete, can anybody enlighten me? Stuck here for 2 weeks!

image

@It-beginner92

I have also struggled with this issue for some time. I had it working on a Windows 10 Home edition but my new Windows 10 Pro didn’t want to connect.

I finally figured out what the issue was by viewing the Samba integration logs.

The problem with the Samba Share integration is that it looks like the user rights are only set on the subfolders (eg, addons, backup, config, media, share, and SSL). The main folder is open for guests, you don’t have to log in to ‘see’ the subfolders. What happens next is that when you try to open one of the subfolders is that windows try to connect as a guest, which fails. But then you get a pop-up for the credentials, but whatever you type in, Windows is still using the guest user to open the folder (???)

The resolution to that problem is to make the right user connection first by using the 'NET USE" command in Windows.

NET USE \\homeassistant /USER:<username> <password>

Where homeassistant is the NETBIOS name of your homeassistant system. You can also use the IP-Address of the homeassistant system in this command. So that would be:

NET USE \\<ip-address> /USER:<username> <password>

After that, you are able to open the subfolders without any issue.

If you also want this to be remembered by Windows after a reboot add the /PERSISTENT:YES option at the end of the command

NET USE \\<ip-address> /USER:<username> <password> /PERSISTENT:YES

I found that @lonedutchman described this solution also in the following post:

3 Likes

Im struggling as well this is my samba

username: xxxxx
password: xxxxx
workgroup: WORKGROUP
compatibility_mode: false
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes
allow_hosts:
  - 192.168.68.89

192.168.68.89 is the address of my rasp that runs HA OS…

my browser address for HA is http://192.168.68.89:8123/
My router address is http://192.168.68.1/

im not that great at this stuff. I have tried accessing the //192.168.68.89 in my Windows File but dfoenst seem to work…

some help would be greatly appreciated

net use \homeassistant /user:hauser hapassword

Worked right away on windows 11, THANKS

@cloudbr34k, you restrict the samba access to 192.168.68.89 but that’s the IP of your home assistant system. Change that to 192.168.68.0/24 then it should be fine.