Whatever I tried I cannot establish a samba connection from my Win10 machine. User should be openhab with password openhab and folder “\openhabianpi2\openHAB2-conf”. Using my ip instead of the hostname also does not work. I always get wrong username or password.
?
The Path to the shares would be \\your.ip.goes.here\ (double backslash at beginning).
openhabianpi is only correct if using openHABian to setup openHAB2 (which is the recommended option for Raspberry).
If using openHABian, there is no need to configure samba, as it’s already configured by openHABian.
Just wanted to be sure about this
Looks like you tried to login as user nobody?
Please try
sudo journalctl -fu smbd
This will start journalctl in tail mode, but only give you information about smbd.
Now try to connect to the samba share from your desktop. The output should be like this:
Jul 01 17:41:34 openhab2 smbd[7823]: pam_unix(samba:session): session opened for user openhab by (uid=0)
Jul 02 00:39:43 openhab2 smbd[7823]: pam_unix(samba:session): session closed for user openhab
By default, Any windows device will pass local windows username/password to a SMB service to authenticate you. I find that the easy way of connecting to SMB shares on a Samba server is from CMD prompt
from a Windows device:
open CMD.exe
net use * \ip.of.open.hab\openhab-conf /user:.\openhab openhab
If the output is “Command completed Successfully” have a look in explorer for a mapping.
So what is the output if you try from CMD? As this will most likely tell us what is going on.
Also have you checked event viewer for any errors? Also drop your smbd.conf from /etc/samba/smbd.conf.
On your Windows 10 machine, is your network location set to public or private? And is your Windows firewall allow outbound SMB? If its public, you wont be able to connect to SMB shares on the local subnet. So try disabling the firewall and do the “net use” command from cmd.
The stock standard SMB config from openhabian is very open/insecure (depending on how you look at it). So if your experiencing issues, I would say it would be a network issue with your windows 10 device.
Run > Secpol.msc
then I set Local Policies > Security Options > Network Security: LAN Manager authentication level to 'Send NTLMv2 response only. Refuse LM & NTLM'
Wonder why my other samba share was (and still is) working fine, but I better don’t care too much.
“net use *” vs “net use O:” is that the * will take the next available drive letter where * will take the next available. I have had issues in windows when the next available is in an unknown state.