Windows 10 unable to connect to OpenHabian samba shares

thanks for namedrop.

I’ve used *nix systems for 30 years now so can usually figure it out. like a said above, openhab perhaps should be added to the smb passdb . The docs guide users to use openhab / openhabian as the smb username, but it will not work until the user applies the fix above.

Anyway, for me, I’m good to go although i will for security, remove openhab from smb passdb, create a new smb user account in openhabian , and add that to passdb.

I’m setting up my RPi4 with a fresh openhabian image and ran into this issue. Without having to change any Windows 10 settings, I could map the \openhab share using the standard openhabian:openhabian passwords, but not openHAB-share or openHAB-conf.

My solution was to go into openhabian-config and reset the Samba password, and that fixed the problem. I’m not sure if @tillykeats had the same issue, but I’m posting here for future benefit.

i know it’s an old thread, but in a new install of OH2, v2.0.0 on the rasbian pi image, i’ve just run into a similar problem. i changed the default openhabian users password and samba didn’t update it’s own password db. even after several reboots, SSH allowed me in (and sudo) using the new password, but samba access was only with the original factory password.

Did you try changing the password for Samba via the openhabian-config tool?

I’m sure you don’t mean OH2 v2.0.0 as we’re at 2.5.3 now, and what exactly do you mean by “rasbian pi image”. That you installed generic Raspbian (including Samba ?) and openHABian on top ? Or do you mean the openHABian image ? You need to be precise in asking if you want people to help.

How did you change it ? If you simply used “passwd” that is to be expected - Samba has its own password database. As @H102 said use the openhabian-config tool to change passwords.

1 Like

thanks for the clarity, yup, apologies. image was openhabian.

Err, no. You should not use “openhab” to work on/with the system but “openhabian”.
That you should be able to connect with as it gets added to passdb during unattended install.

There is another solution for the problem “incorrect password” in Windows 10 which has not been mentioned, but clearly works for me. It is a Windows registry setting and without it I would get this error:

net use O: /user:openhab \\192.168.0.XXX\openHAB-share
Enter the password for 'openhab' to connect to '192.168.0.XXX':
System error 86 has occurred.

The specified network password is not correct.

The samba log (tail -f -n 200 /var/log/samba/log.192.168.0.XXX) would contain this

NTLMv1 passwords NOT PERMITTED for user openhab
...
NEITHER LanMan nor NT password supplied for user openhab
...
{..."passwordType": "NTLMv1"...}

So the problem is with Windows and by changing registry parameter Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\LmCompatibilityLevel (REG_DWORD) from 0x00000000 to 0x00000003, passwordType=NTLMv2 is enabled and the login works. Nothing has been changed on the server side, only this Windows setting.

I hope this helps someone, and that this contribution is presented in the correct place and form.

2 Likes

In my case this solution worked and it wasn’t an Openhabian-prolem:
http://woshub.com/cannot-access-smb-network-shares-windows-10-1709/
look at “JAYDEE”

@wezzix
Your solution seemed to help me after unexpected loss of access.
I added both keys and rebooted the win10 computer.
Afterwards it worked again.
I have rebooted openhab, installed samba, rebooted win10 computer before more than once.

Mannnn thank you so much… this is exactly what needed to be done, and one of the reasons i hate linux :smiley:

I just deleted the current active session from command line:

  1. Select the “Start” button, then type “cmd“.
  2. Right-click the “Command Prompt” option, then choose “Run as administrator“.
  3. Type “net use“, then press “Enter“.
  4. Look for any drives listed that may be questionable. In many cases where this problem occurs, the drive may not be assigned a letter. You’ll want to remove that drive.
  5. From the Command Prompt, type:
    6.*net use /delete \\servername\foldername**