Samba share not accessible through Windows 10

Can you link the doc page you want it to be added in? Not the GitHub page, the actual doc page on the website

This one Samba share doc

Hmm, that’s an odd one. Not entirely sure where the docs are for that then. It seems like it’s auto generated from the addon pages itself. Might be worth asking frenck.

hi , just a question, as i didn’t came to the point on installing samba on my “supervised”, before i dumped it in a closet :slight_smile: … but what happens if you in windows open file explore,
rightclick “map network drive” then \ipnumber\share … or \config etc. ? … weird should be 2 backslash, first, but 1 vanish when i click save

edit 2: rightclick network icon

Never mind, as i assume you already are authenticated :slight_smile:

But the right method is to map network-drive, at least first time( from a windows machine ) … the other method described, in the doc you want to add, lower security on peoples windows machine, is not a desired method, thou as it’s “supervised” users, i guess they are a minority :slight_smile:

By “map network” drive you get another authentication process, where you shall click “sign in with different credentials”, there are “multiple” ways/api’s to “login” to a network share from windows.
click the “search” … right-click M-icon in left corner, the click run… type in in file-explore … type in browser, and yes they do use various “protocol” as Webdav, netbios to mention 2 “desired” for Windows … and when you first authenticated, u can use all ( thou some dont accept netbiosname :slight_smile:

We want to log in to Samba Share ! (mountpoint) … there is the “preferred” way " Map Network Drive" / Change Credential most other places you try to log in with your windows account( and there comes windows-pro as “game-changer” as many running on Admin-account, windows-home has restricted user), and a restricted user-interface, meaning many API’s “home” you have to run as admin (to get full access-rights to etc), therefore you have to right-click it and choose “run-as admin”
Last but not least ( thou i could keep on :slight_smile: , but , how should windows knows you want to log into a "Network"smb Share, if you just type the ip \192.168.1.50 ? … it wil try in netbios, webdav, what ever …
Right-click Network icon, choose “Map-Network-Drive” tells windows what to do(what u want access to), which authentication criteria s, and protocol to use , and depending on how the Linux-server/samba is configured, you have to ad \192.168.1.50\sharename (SMB-Mountpoint)… (atleast first time, then your authenticated in Samba, correct , and get whats given to you (all shares) … then you can access it how ever you want, and when authenticated u can either Mapp_shares type ipnummer, where ever you want, and even just “homeassistan-name” few places … felt like i wanted to tell … lol

As matter of fact there is no need to map a network drive. Using UNC path that is \IP\config works fine. First time you are asked crendentials. Make sure to select different account. Account name use .\ (dot, backslash) prefix, enter password, tick save crendentials information. You are all set

2 Likes

Which channel should I use to reach frenck? Thanks

windows has it’s way’s :slight_smile:

after verified in samba, i have a “shortcut” on desktop " \ \192.168.x.x"

You can pop on discord and reach him there via the documentation channel in the dev section. That’s where changes are usually discussed in real time.

Did you have “Refuse LM & NTLM” in secpol.msc … when you tried this ( through ip \samba-mountpoint), or “reversed” back to orig settings in Lan Manager … or are you still to request change to default security settings ? “Send NTLMv2 response only. Refuse LM & NTLM … im Just wondering, because i’ve seen many solutions, where people, create group(for the individual smb-share on linux-server), add samba user to the linux-group, give root access, etc … , there are so many ways … changing security-settings is not a recommended way anywhere(but various forums), as “samba” is build to handle all this

I did not try to reverse back. I guess it needs a reboot to make sure of the conclusion. I’ll try that later on and report it

So I reverted back, deleted the related stored Windows credentials.

  • The session has been closed, then reopened. No issue to connect (I had off course to provide credentials)
  • PC has been restarted, session reopened. No issue to connect (I had off course to provide credentials)
    So as @boheme61 said: Windows has its ways :wink:

ok, i don’t have to provide credentials, ever since i made my “connection” through “Map Network Driver, change account, save login”
… not after restarted HA-device, nor after restarted my windows device(where i access HA from) , whether this is due to “Map Network Drive” ( stores this in windows users profile ) , or that i have to “login” to my windows session(after restart) … as mention i use to “create shortcut” on desktop, and type in \ \192.168.xxx.xxx , not that i think this has anything to do with “stored login credentials”, i do this ( doubleclick) just because im inpatient :), so i get my samba-folders easy, … but “no user Login” to windows, i believe don’t “store” in same manner( for security reasons)

edit: … i never use “file-explore” in the way described in documentation here, and various forum, for various purpose …because: file-explore = Internet Explore , file-browser = Internet browser … they will always have a “fallback” to https: … pretty annoying trying to access local files, and then getting a browser trowing in face , with path revealed, trying to access it over https … just because you typed path wrong

1 Like

This did it for me. I was using “homeassistant” as a user, instead of “.\homeassistant”. Thanks a lot!

i could see homeassistant in file explorer like described above. I used file explorer in home assistant to go to etc/samba and edited smb.conf. All I changed was the workgroup to my workgroup name and everything worked. It was set to MYHOME or something like that.
Hope this works for others.

Hi I just wanted to add my solution to this issue.

I had struggled with getting the Pi HA samba share to allow access from my Windows 10 PC. when I set Samba up my Pi HA was recognised by my Windows network client. I could ping it but, mapping the drive resulting in Windows complaining that the network folder was not available. In the Samba log on my Pi HA I could see my Windows machine’s IP was being denied access. Even after cutting and pasting User names and passwords, I still had no luck connecting.

What worked for me was in the Pi HA Samba config file, to explicitly call out my Windows PC’s IP address (the one I will be coding from) in the allow hosts section like this

allow_hosts:
  - 192.168.1.0/100  # this line does not work for me and was what I had copied from the Samba config text
  - 192.168.1.66  # This line works, so it looks like the range is not working

After that I was able to connect as the HA samba documentation describes by connecting to \x.x.x.x\config

I hope this helps some Windows users who the other solutions above do not work for.

Kind regards

D

1 Like

So, this is what I did which worked for me (not sure if all steps were necessary):
In the Yaml configuration of the Samba settings on Home Assistant I added the IP address of my windows PC (all my devices have static IP addresses where possible)

> username: [my username]
> password: [my password]
> workgroup: WORKGROUP
> compatibility_mode: true
> veto_files:
>   - ._*
>   - .DS_Store
>   - Thumbs.db
>   - icon?
>   - .Trashes
> allow_hosts:
>   - 10.0.0.0/8
>   - 172.16.0.0/12
>   - 192.168.0.0/255
>   - 192.168.0.120    <-- This here
>   - fe80::/10

I added the SMB v1.0 in windows features (not sure this was necessary)
In windows File Explorer → This PC → Add a network location → I used \192.068.0.3\share (remember I have static IP addresses for my devices)

Windows then asked for the credentials and the share works.

I think it was explicitly adding the address to the allowed hosts that seemed to do the trick. Hope this helps others with the same problem.

2 Likes

This worked for me! After hours of frustration. I believe it was the “Add Network Location” that did it.

One tip is rather than typing in the address, brows to the location.

I went with the map network drive option. Install Samba > setup user and pass in Samba config > make sure Samba is started and running

Win10 > Map network drive > check "Connect using different credentials > use \\homeassistant\config as the server/share > enter Samba userpass when promted.