Samba access to OpenHABian from Windows 10

I had the same problem, it’s an issue with Windows 10 and compatibility with Samba on Linux. Windows 10 starting with build 1709 disabled “guest” access on the samba/smb protocol in order to tighten up security, so you need to turn it back on. I ran into the same thing and the fix below took care of it.

I run Windows 10 Pro so I was able to do the group policy setting via gpedit.msc at the end, if you have Home the registry change in the first link should work.

FYI, I found someone else who found the problem and a fix (for me anyway).
https://tech.nicolonsky.ch/windows-10-1709-cannot-access-smb2-share-guest-access/

MS has an article now to.
https://support.microsoft.com/de-ch/help/4046019/guest-access-smb2-disabled-by-default-in-windows-10-server-2016

essentially 1709 disables unauthenticated access to shares using SMB2. There is a GPO that can easily be flipped to fix the problem if setting up auth isn’t an option. Here is the policy in question.

Computer configuration\administrative templates\network\Lanman Workstation “Enable insecure guest logons”

1 Like

Thats working, thank you, saved me a lot of time! :wink:

1 Like

One year later, still saving the fresh boys out here. Thanks!

1 Like

Hi,

after searching for a long time to get Acces for Visual Studio Code…

Following will work here with Debian 10.2 and openhabian + Samba + WIndows 10 B1909

Windows 10:
insecure guest logins got disabled by default in Creators update.
enable it in Local Group Policy Editor
Computer configuration\administrative templates\network\Lanman Workstation
“Enable insecure guest logons”

Debian:

To work I needed to add in my smb.conf [global]

server min protocol = SMB2_10
client min protocol = SMB2
client max protocol = SMB3
ntlm auth = yes

To get the Write Access working: I check with the RaspPI image and that groups are missing:

usermod -a -G adm,sudo,tty,dialout,users,input,openhab openhabian

by

2 Likes

Continuing the discussion from Samba access to OpenHABian from Windows 10:

Thank you very much! This worked for me.
I used the latest OpenHABian install and tried to access the Samba shares as described in the quick start guide. After Windows 10 computer refused to connect even with different paths provided by the guide, I started to look for solutions. To make it work I had to:

  1. Enable the SMB 1.0 Windows Feature under Control Panel->Programs and Features-> Turn Windows Features on or off.
  2. Enable insecure guest logons under Local Group Policy Editor Computer configuration\administrative templates\network\Lanman Workstation

For me that was it, there were no need for changes on the smb.conf file on Linux.
Please note: I only tested the Write Access by placing files in the shared folders on the Windows 10 computer and reading it back from an another device, which was successful.

7 Likes

Thanks for posting, This had me stumped for months

Thank you so much… this was the solution for me…

Recently i switched to a new Raspberry 4 and did a complete new installation… and in between i also installed a new win 10 version a while ago… and that i cant get the SMB to work was driving me crazy…

But now its working and I can move forward…

Thank You!!

For those who still have issues, try a restart of the Windows PC after you enable that insecure guest logons setting. Lost a couple of hours and a fresh OpenHAB install :expressionless:

1 Like

have you tried \OPENHAB.local replace OPENHAB with the host name or your raspberri

This worked for me…Thank You!

1 Like

Aug 05 22:00:58 openhab smbd[4757]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:00:58 openhab smbd[4761]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:00:58 openhab smbd[4767]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:00:59 openhab smbd[4769]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:01:00 openhab smbd[4775]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:01:00 openhab smbd[4780]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:01:48 openhab smbd[4751]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:02:34 openhab smbd[4795]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:02:34 openhab smbd[4797]: pam_unix(samba:session): session closed for user nobody
Aug 05 22:02:34 openhab smbd[4802]: pam_unix(samba:session): session closed for user nobody

Hello to all,

there is no need to change Local Group Policy and make your connection insecure even on the local network.

  1. Enable the SMB 1.0 Windows Feature under Control Panel->Programs and Features-> Turn Windows Features on or off.

  1. While you will map the network drive ("\IP of your OpenHab2server\openHAB-share" or just “\OPENHAB\openHAB-share”) to your Windows PC check “Connect using different credentials” and provide your user and password. Default username is “openhabian” and password is “openhabian” :slight_smile: Do not forget to be secure!
    Untitled

Under this folder you will find all folders which you need to start with OpenHab. (Logs, config, user data etc.)

I cannot connect to “openHAB-share”. I can connect to “openHAB-conf” but not to “openHAB-share”. Is there something that I might miss? I really would like to have only one mapped folder instead of connecting separately for conf, logs, etc…

Install VScode remote development and SSH to machine no samba required

1 Like

Hello Vossid,
Did you apply for Fix Permissions in openHABian configuration tool?

Install Putty
connect to your OpenHabian server with your IP address or Hostname.
User: openhabian
Password: openhabian
write:
sudo openhabian-config
Go to 10 Apply improvements
Fix Permissions and that should do all magic.

Let me please know if it worked. I would like to have super precise guide to follow.

1 Like

I did this already before a couple of times but with no success.
I tested it again right now again, but I cannot connect to “openHAB-share”. It works with the directories below (like conf, logs etc.) but there is no access to “openHAB-share”. All I get is an Error Message when trying to connect to the network share.

That share is no longer available per default. Edit /etc/samba/smb.conf if you think you need it.

Thank you @mstormi , that did the trick. What is the reason for no longer offering this as default?

Don’t recall I think there was an issue with overlapping mounts.
It’s not really needed, is it.

Well, IMHO this should be the ONLY mount offered - one for all instead of several small pieces for what?