Samba access to OpenHABian from Windows 10

Hello,

I have today the OpenHAbian on a Raspi 3B+.
It works fine, but I can’t access to the config-folder via samba share.

In the docu writes " If you are not able to connect, try with the IP of your device (e.g. smb://openhab@192.168.0.2 or \\192.168.0.2 )."

So I have tried to access from my file-explorer (client Windows 10) with \192.168.178.158 but my computer can’t connect to the server “… no folder found”

I have googled and found a solution, that I must activate SMB 1.0. I do it, but I can’t also not connect to samba share.

What do I wrong?
Thank you!
Michael

Hmm your Ip is missing a backslash. It should read \192.168.178.158

I think @Dibbler42 means that you need double backslash and with share name:

\\your.ip\share-name

In your case it’s like:

\\192.168.178.158\openHAB2-conf

See also this link:

2 Likes

Hello,

thank you for your hints:

ad 1) I have tried with \\192.168.178.158\openHAB2-conf -> error: “The file could not found.”
ad 2) “See also this link:” -> error: “The input folder is wrong. Please you another folder”

Exist an analysing program for Linux or Windows that can I step-by-step check to find the missing link?
Thanks

did you select option 67 in the openHABian Configuration Tool (sudo openhabian-config) tool to setup Samba?

1 Like

Type the following in command line:

sudo systemctl status smbd

What’s the output?

smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-11-20 22:14:19 CET; 1min 37s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 664 (smbd)
Status: “smbd: ready to serve connections…”
CGroup: /system.slice/smbd.service
├─ 664 /usr/sbin/smbd
├─ 668 /usr/sbin/smbd
├─ 669 /usr/sbin/smbd
├─ 684 /usr/sbin/smbd
├─1044 /usr/sbin/smbd
└─1057 /usr/sbin/smbd

Nov 20 22:15:12 openHABianPi smbd[1072]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:13 openHABianPi smbd[1077]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:16 openHABianPi smbd[1081]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:17 openHABianPi smbd[1085]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:27 openHABianPi smbd[1099]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:27 openHABianPi smbd[1103]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:28 openHABianPi smbd[1107]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:28 openHABianPi smbd[1111]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:29 openHABianPi smbd[1115]: pam_unix(samba:session): session closed for user nobody
Nov 20 22:15:29 openHABianPi smbd[1119]: pam_unix(samba:session): session closed for user nobody
[22:15:57] openhabian@openHABianPi:~$

Please answer to this:

Or did you do a manual install?
Any modifications to samba configuration file?

1 Like

I have installed with openHABian Config Tool 66 (not 67) and I have no edit an additional config file.

I have installed followed the docu OpenHABian → Quick Start → Raspberry Pi
And here is writting: “Connect to the Samba network shares with username openhabian and password openhabian” and the link jump direct to “Mounting Locally”. There is no hint to configure someone else!??

Samba install is option 66 :wink:

1 Like

grrr outdated docs again: openHABian | openHAB (picture shows 67 :frowning:)
I have to install openHABian on (yet) another test system :slight_smile:

I wonder why it has changed. Seems rather pointless to me, to be honest. And could avoided confusion.

You havn´t got anything better to do :joy:

1 Like

What does

openhab-cli info

output?

[23:02:59] openhabian@openHABianPi:~$ openhab-cli info

Version: 2.3.0 (Build)

User: openhab (Active Process 571)
User Groups: openhab tty dialout audio bluetooth gpio

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab2 | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab2/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab2 | openhab:openhabian
OPENHAB_CONF | /etc/openhab2 | openhab:openhabian
OPENHAB_LOGDIR | /var/log/openhab2 | openhab:openhabian

URLs: http://192.168.178.158:8080
https://192.168.178.158:8443

I’m getting out of ideas. Try to reinstall the samba service using openhabian-config tool. If it doesn’t help, show us your /etc/samba/smb.conf file. You can upload it somewhere if you can’t post it here.

1 Like

I have reinstalled with the openhabian-config tool and get followed output:

2018-11-20_23:20:28_CET [openHABian] Checking for root privileges... OK
2018-11-20_23:20:28_CET [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2018-11-20_23:20:42_CET [openHABian] openHABian configuration tool version: [master]v1.4.1-418(d84ba3b)
2018-11-20_23:20:42_CET [openHABian] Checking for changes in origin... OK
2018-11-20_23:22:05_CET [openHABian] Setting up Samba network shares... Copying over custom 'smb.conf'...
Writing authentication data to openHABian default...

$ systemctl enable smbd.service
Synchronizing state of smbd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable smbd

$ systemctl restart smbd.service
OK
2018-11-20_23:22:12_CET [openHABian] Checking for default openHABian username:password combination... FAILED
2018-11-20_23:22:14_CET [openHABian] We hope you got what you came for! See you again soon ;)

What he mean with “Checking for default openHABian username:password combination… FAILED”. The system is a new OpenHABian installation on a Raspi 3B+ and I have not change the openhabian password.

Here my smb.conf file in txt format:
smb.conf.txt (9.3 KB)

Try setting a password to user openhab (not openhabian) with this command and see if it lets you connet:

sudo smbpasswd -a openhab

2 Likes

Now I have change the password from user openhab.

But I think the problem is Windows 10. I have installed a VirtualBox VM with ubuntu 18.04 and if I input “smb://192.168.178.158” in the file-explorer and put my username and password, the folder are prompt displayed.
Only Windows 10 do not work with “smb://192.168.178.158” in the file-explorer.
Have you an idea?

Which smb version is in use by OpenHABian? 1, 2, or 3?

Windows uses back slashes, not forward slashes so that’s why “smb://192.168.178.158” wont work. And I’m quite sure “smb:” prefix is not needed.

So it’s definely a problem with your windows os then. Have you checked your firewall settings? One weird solution what I found was changing the host name of your windows machine. Can’t remember why it helped though.

SMBv3 is used. Here’s a picture how to enable v1 support in win 10. You can try aso this.

kuva

2 Likes