Bug 392803 - Dolphin Samba Network Discovery Not Seeing Samba Drives 18.04 Kubuntu
Summary: Dolphin Samba Network Discovery Not Seeing Samba Drives 18.04 Kubuntu
Status: RESOLVED DUPLICATE of bug 392447
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Samba (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: HI major
Target Milestone: ---
Assignee: Plasma Bugs List
URL: https://bugzilla.samba.org/show_bug.c...
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-04-06 15:25 UTC by Ryan
Modified: 2018-07-20 21:06 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Picture of dolphin showing no network drives except manually mounted (67.90 KB, image/png)
2018-04-06 15:25 UTC, Ryan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan 2018-04-06 15:25:00 UTC
Created attachment 111874 [details]
Picture of dolphin showing no network drives except manually mounted

In testing Mate and Gnome based Ubuntu 18.04 editions they all recognize my Synology NAS immediately under Network as drives available or searchable on the network. In Kubuntu 18.04 under Dolphin the Network drives do not show any devices. If I install Smb4k it will discover the drives as cloud (web based) drives but again not as mountable network devices. I can manually add the drive.
Comment 1 suse 2018-04-11 19:22:39 UTC
confirmed on kutuntu 18.04 beta 2

I guess it's a duplicate of #390551

Since smbclient 4.7 the searching of samba shares isn't working.

Workaround:
1. Create folder .smb in your home folder.
2. Create file smb.conf with content
[global]
    client max protocol = NT1
This will stick the protocol to the old NT1 (instead of SMB2 or SMB3) and dolphin will show you the all samba hosts (e.g. NAS ...).
Comment 2 Nate Graham 2018-04-13 02:57:02 UTC

*** This bug has been marked as a duplicate of bug 390551 ***
Comment 3 Nate Graham 2018-05-08 23:31:29 UTC
Changing status to reflect the full sad story.

The SMB1 protocol is deprecated and Microsoft strongly urges people not to use it. Windows 2016 server does not support it, and Windows 10 only supports it if it's used within the first 15 days (!). It's clearly not going to work in the future. [1]

Kubuntu 18.04 ships with Samba 4.7.6, which uses SMB2 by default.

Network discovery is provided by the SMB1 protocol. [2]

In SMB2 and later, network discovery has to be provided by a separate protocol, WS-Discovery.

There doesn't seem to be any Linux support for WS-Discovery, either in the Samba project or elsewhere[3]

---

The Ubuntu people were left with two bad options: stay with the insecure and deprecated SMB1 protocol to preserve the network discovery feature for many (but not all) SMB resources, or move to the secure and supported version of the SMB protocol and lose network discovery for all SMB resources. They chose the latter.

You can make the other choice for yourself by adding "client max version = NT" to /etc/samba/smb.conf.

At the moment there is sadly nothing KDE can do about this situation. The decision of what SMB version to support is made by distros, downstream of us. Making network discovery use WS-Discovery so that it would work with the newer SMB versions would have to be done upstream of us so that everyone benefits from it.

[1] https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/
[2] https://dev.solus-project.com/T1223#91845
[3] https://dev.solus-project.com/T1223#92389
Comment 4 Nate Graham 2018-05-09 21:31:52 UTC
*** Bug 388000 has been marked as a duplicate of this bug. ***
Comment 5 Alois Steindl 2018-05-10 09:29:33 UTC
(In reply to Nate Graham from comment #3)

Thanks for all your efforts to resolve the problem. 
I just have some difficulty to understand the reason: Using smbtree I can see the workgroup and the shares, so samba itself seems to be able to find these, independently of the protocol version. For me it looks like there is some "misunderstanding" in the communication between KDE (dolphin etc.) and the smbclient routines. 

Actually the problem causes absolutely no harm for me; I was just troubled by the error message, that this bug should be reported and that there were some SIGSEGV errors displayed in the error log.

Just another observation: When playing around with this issue, it sometimes happens (as far as I can see a pattern, when I try several times to access smb://WORKGROUP), that a  password dialog box appears and after that dolphin tries to open some strange share. So it looks like there is some storage, which is filled with informations during repeated calls.

With best wishes
Alois
Comment 6 Nate Graham 2018-05-10 21:12:12 UTC
Digging a bit, smbtree intelligently downgrades itself to using the old SMB1 version for the purposes of browsing.[1] Connections are actually made using the newer, more secure version. libsamba (the actual library that we use) does not have the same behavior.

It's a decent enough temporary workaround, except of course for the fact that more and more network resources don't use SMB1, so smbtree won't find them. Going forward, what's needed is support foe one of the modern service discovery protocols. The referenced bug report is the one to follow, as that's there the Samba developers are trying to figure how what to do here.

[1] https://bugzilla.samba.org/show_bug.cgi?id=12876#c2
Comment 7 Peridot 2018-05-17 16:45:29 UTC
nmap  can probe and discover services using WS-Discovery. [0]
Apache CXF also supports it [1]

So support for it could be added into dolphin without waiting for upstream.

[0] https://nmap.org/nsedoc/scripts/wsdd-discover.html
[1] http://www.dankulp.com/blog/2013/05/apache-cxf-and-ws-discovery/
Comment 8 Nate Graham 2018-07-20 21:06:01 UTC

*** This bug has been marked as a duplicate of bug 392447 ***