"Other Locations" does not automatically find Samba servers in Ubuntu 18.04

Bug #1767454 reported by David Spoelstra
76
This bug affects 14 people
Affects Status Importance Assigned to Milestone
dolphin
Unknown
High
gvfs (Ubuntu)
Fix Released
High
Unassigned
samba (Ubuntu)
Invalid
High
Unassigned

Bug Description

Ubuntu: 18.04 clean install
Nautilus: 1:3.26.3-0ubuntu4

The actions taken to produce the problem:
Click on “Other Locations” in Nautilus.

The expected result of these actions:
Samba servers to automatically show up under “Networks”. This is the behavior in Ubuntu 17.10 using Nautilus 1:3.26.0-0ub. Also, clicking on “”Windows Network” immediately shows "Folder is Empty".

The actual result of these actions:
The Samba servers never show up under “Networks” and clicking on "Windows Network" always immediately comes up with "Folder is Empty".

Further information:
This happens on both machines with a clean Ubuntu 18.04 install. My Ubuntu 17.10 machines still work like expected.

I can still manually type in the Samba information in "Connect to Server" and the 18.04 machines connect just fine.

From syslog:
Apr 27 13:49:34 david-HP-ProBook-440-G2 dbus-daemon[1333]: [session uid=1000 pid=1333] Activating service name='org.gnome.Nautilus' requested by ':1.13' (uid=1000 pid=1468 comm="/usr/bin/gnome-shell " label="unconfined")
Apr 27 13:49:34 david-HP-ProBook-440-G2 dbus-daemon[1333]: [session uid=1000 pid=1333] Successfully activated service 'org.gnome.Nautilus'
Apr 27 13:49:35 david-HP-ProBook-440-G2 dbus-daemon[754]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.131' (uid=1000 pid=4857 comm="/usr/bin/nautilus --gapplication-service " label="unconfined")
Apr 27 13:49:35 david-HP-ProBook-440-G2 systemd[1]: Starting Hostname Service...
Apr 27 13:49:35 david-HP-ProBook-440-G2 nautilus[4857]: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)
Apr 27 13:49:35 david-HP-ProBook-440-G2 dbus-daemon[754]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 27 13:49:35 david-HP-ProBook-440-G2 systemd[1]: Started Hostname Service.
Apr 27 13:49:40 david-HP-ProBook-440-G2 gvfsd[1432]: mkdir failed on directory /var/cache/samba: Permission denied

Revision history for this message
In , Suse (suse) wrote :

Dolphin doesn't show any samba share.
smb:// and smb://workgroup/ are empty.

However, smbtree is always working.
If made all test with deactivated firewall.

Entering a specific share like smb://twvm1/ is always working.

I've made many test with different distributions and software versions:
--------
DOES NOT WORK:

Tumbleweed with:
Plasma: 5.12.3
Framework: 5.44.0
Applications: 17.12.3
Samba: 4.7.6

Fedora 27 with
Plasma: 5.12.2
Framework: 5.44.0
Applications: 17.12.2
Samba: 4.7.6

Neon with
Plasma: 5.12.3
Framework: 5.44.0
Applications: 17.12.3
Samba 4.3.11-Ubuntu
extra file: ~/.smb/smb.conf
[global]
    client max protocol = SMB2

----------
WORKS:

Neon with
Plasma: 5.12.3
Framework: 5.44.0
Applications: 17.12.3
Samba 4.3.11-Ubuntu

Tumbleweed with:
Plasma: 5.12.3
Framework: 5.44.0
Applications: 17.12.3
Samba: 4.6.16 (Downgraded with repo home:j-engel)

Tumbleweed with:
Plasma: 5.12.3
Framework: 5.44.0
Applications: 17.12.3
Samba: 4.7.6
extra file: ~/.smb/smb.conf
[global]
    client max protocol = NT1

===============
Conclusion:
As soon as the samba protocol newer NT1 (e.g. SMB2) is used, then dolphin doesn't show the samba shares.

You can force the usage of NT1 via:
- Samba < 4.7
or adding the extra file ~/.smb/smb.conf
    [global]
        client max protocol = NT1

You can force the usage of SMB2 or SMB3 via:
- Samba >= 4.7
or adding the extra file ~/.smb/smb.conf
    [global]
        client max protocol = SMB3

Revision history for this message
In , Suse (suse) wrote :

Created attachment 111699
journalctl of samba 4.7.6

This log is from a samba 4.7.6 machine where the SMB2 or SMB3 protocol is used.
I've clicked on "samba shares" in dophin (= smb://).

description: updated
description: updated
summary: - "Windows Network" does not find Samba servers in Ubuntu 18.04
+ "Other Locations" do not automatically find Samba servers in Ubuntu
+ 18.04
Revision history for this message
David Spoelstra (davids-mediamachine) wrote : Re: "Other Locations" do not automatically find Samba servers in Ubuntu 18.04

Since syslog said:
Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)

I installed:
sudo apt install samba-common-bin

It still doesn't work, but now syslog says:
Apr 27 15:21:39 david-HP-ProBook-440-G2 dbus-daemon[1331]: [session uid=1000 pid=1331] Activating service name='org.gnome.Nautilus' requested by ':1.13' (uid=1000 pid=1466 comm="/usr/bin/gnome-shell " label="unconfined")
Apr 27 15:21:39 david-HP-ProBook-440-G2 dbus-daemon[1331]: [session uid=1000 pid=1331] Successfully activated service 'org.gnome.Nautilus'
Apr 27 15:21:40 david-HP-ProBook-440-G2 dbus-daemon[760]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.119' (uid=1000 pid=2778 comm="/usr/bin/nautilus --gapplication-service " label="unconfined")
Apr 27 15:21:40 david-HP-ProBook-440-G2 systemd[1]: Starting Hostname Service...
Apr 27 15:21:40 david-HP-ProBook-440-G2 nautilus[2778]: Called "net usershare info" but it failed: 'net usershare' returned error 255: mkdir failed on directory /var/run/samba/msg.lock: Permission denied#012net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory#012Please ask your system administrator to enable user sharing.
Apr 27 15:21:40 david-HP-ProBook-440-G2 dbus-daemon[760]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 27 15:21:40 david-HP-ProBook-440-G2 systemd[1]: Started Hostname Service.

summary: - "Other Locations" do not automatically find Samba servers in Ubuntu
+ "Other Locations" does not automatically find Samba servers in Ubuntu
18.04
Revision history for this message
tony (tcatalf1) wrote :

Nautilus is now using protocol SMB3_11 in Ubuntu 18.04 and that breaks browsing shares.

you could always choose "other locations/connect to server" and bookmark the location and use a more secure protocol.

you could also install "smbclient" and edit "/etc/samba/samba.conf" in the [global] section section add "client max protocol = NT1"

once you logout and login you should now see your shares but you will be using the NT1 protocol.

we will see if browsing shares gets fixed with SMB3 I guess?

Revision history for this message
David Spoelstra (davids-mediamachine) wrote :

Thanks for the explanation, but that feels like a real regression to me! Just last week with 17.10 I was showing some people running Windows how easy it was to browse and connect to Windows servers with Nautilus. Now, with 18.04, they again have to jump through hoops and know cryptic smb URLs to connect to them...

Revision history for this message
Sebastien Bacher (seb128) wrote :

@tony, could you give some details about that SMB3_11 setting? Is that a known upstream issue/documented somewhere?

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in nautilus (Ubuntu):
importance: Undecided → High
Revision history for this message
Sebastien Bacher (seb128) wrote :

The upstream report claims it has been fixed in samba 4.8, we might have to look for a change to backport there
Another reference, https://bugzilla.samba.org/show_bug.cgi?id=12876

Changed in gvfs:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

After you install smbclient, can you please just run the "smbtree" command:

Here it lists my NAS and its shares:
$ smbtree
LOWTECH
 \\NAS
  \\NAS\photo System default shared folder
  \\NAS\IPC$ IPC Service ()
(...)

This is my smb.conf where smbtree was run (all defaults):
 dns proxy = No
 log file = /var/log/samba/log.%m
 map to guest = Bad User
 max log size = 1000
 obey pam restrictions = Yes
 pam password change = Yes
 panic action = /usr/share/samba/panic-action %d
 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
 passwd program = /usr/bin/passwd %u
 server role = standalone server
 server string = %h server (Samba, Ubuntu)
 syslog = 0
 unix password sync = Yes
 usershare allow guests = Yes
 idmap config * : backend = tdb

[printers]
 browseable = No
 comment = All Printers
 create mask = 0700
 path = /var/spool/samba
 printable = Yes

[print$]
 comment = Printer Drivers
 path = /var/lib/samba/printers

Revision history for this message
In , ben van 't ende (benvantende) wrote :

I added the extra file ~/.smb/smb.conf
    [global]
        client max protocol = NT1

For Kubuntu 18.04 (Samba version 4.7.6-Ubuntu)

to get it to work

Revision history for this message
David Spoelstra (davids-mediamachine) wrote : Re: [Bug 1767454] Re: "Other Locations" does not automatically find Samba servers in Ubuntu 18.04
Download full text (5.4 KiB)

Fresh 18.04 install and install of smbclient.

david@david-HP-ProBook-440-G2:~$ smbtree
WORKGROUP
    \\RT-AC5300-C140 RT-AC5300-C140
        \\RT-AC5300-C140\General (at Main) Main's General in Seagate
Backup+ Desk
        \\RT-AC5300-C140\IPC$ IPC Service (RT-AC5300-C140)
    \\DXSPIDER Samba 4.5.12-Debian
        \\DXSPIDER\IPC$ IPC Service (Samba 4.5.12-Debian)
        \\DXSPIDER\RaspberryPi NAS Pi Server
        \\DXSPIDER\print$ Printer Drivers

That is showing my servers, but Nautilus still doesn't...

This is my default smb.conf in 18.04:

[global]

   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

On Mon, Apr 30, 2018 at 8:51 AM Andreas Hasenack <email address hidden>
wrote:

> After you install smbclient, can you please just run the "smbtree"
> command:
>
> Here it lists my NAS and its shares:
> $ smbtree
> LOWTECH
> \\NAS
> \\NAS\photo System default shared folder
> \\NAS\IPC$ IPC Service ()
> (...)
>
> This is my smb.conf where smbtree was run (all defaults):
> dns proxy = No
> log file = /var/log/samba/log.%m
> map to guest = Bad User
> max log size = 1000
> obey pam restrictions = Yes
> pam password change = Yes
> panic action = /usr/share/samba/panic-action %d
> passwd chat = *Enter\snew\s*\spassword:* %n\n
> *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
> passwd program = /usr/bin/passwd %u
> server role = standalone server
> server string = %h server (Samba, Ubuntu)
> syslog = 0
> unix password sync = Yes
> usershare allow guests = Yes
> idmap config * : backend = tdb
>
>
> [printers]
> browseable = No
> comment = All Printers
> create mask = 0700
> path = /var/spool/samba
> printable = Yes
>
>
> [print$]
> comment = Printer Drivers
> path = /var/lib/samba/printers
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1767454
>
> Title:
> "Other Locations" does not automatically find Samba servers in Ubuntu
> 18.04
>
> Status in gvfs:
> Confirmed
> Status in samba:
> Unknown
> Status in nautilus package in Ubuntu:
>...

Read more...

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Do your servers show up under "Networks" in "other locations", just alongside the "Windows Network" folder? My NAS does show up there, but it could be because of some sort of zeroconf broadcast, not smb. My "windows network" is also empty, I'm just checking if newer windows installs would show up outside of "windows network" like my NAS does.

Revision history for this message
David Spoelstra (davids-mediamachine) wrote :

No, in 18.04 my servers do not show up anywhere.

On Mon, Apr 30, 2018 at 5:01 PM Andreas Hasenack <email address hidden>
wrote:

> Do your servers show up under "Networks" in "other locations", just
> alongside the "Windows Network" folder? My NAS does show up there, but
> it could be because of some sort of zeroconf broadcast, not smb. My
> "windows network" is also empty, I'm just checking if newer windows
> installs would show up outside of "windows network" like my NAS does.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1767454
>
> Title:
> "Other Locations" does not automatically find Samba servers in Ubuntu
> 18.04
>
> Status in gvfs:
> Confirmed
> Status in samba:
> Unknown
> Status in nautilus package in Ubuntu:
> New
> Status in samba package in Ubuntu:
> New
>
> Bug description:
> Ubuntu: 18.04 clean install
> Nautilus: 1:3.26.3-0ubuntu4
>
> The actions taken to produce the problem:
> Click on “Other Locations” in Nautilus.
>
> The expected result of these actions:
> Samba servers to automatically show up under “Networks”. This is the
> behavior in Ubuntu 17.10 using Nautilus 1:3.26.0-0ub. Also, clicking on
> “”Windows Network” immediately shows "Folder is Empty".
>
> The actual result of these actions:
> The Samba servers never show up under “Networks” and clicking on
> "Windows Network" always immediately comes up with "Folder is Empty".
>
> Further information:
> This happens on both machines with a clean Ubuntu 18.04 install. My
> Ubuntu 17.10 machines still work like expected.
>
> I can still manually type in the Samba information in "Connect to
> Server" and the 18.04 machines connect just fine.
>
>
> From syslog:
> Apr 27 13:49:34 david-HP-ProBook-440-G2 dbus-daemon[1333]: [session
> uid=1000 pid=1333] Activating service name='org.gnome.Nautilus' requested
> by ':1.13' (uid=1000 pid=1468 comm="/usr/bin/gnome-shell "
> label="unconfined")
> Apr 27 13:49:34 david-HP-ProBook-440-G2 dbus-daemon[1333]: [session
> uid=1000 pid=1333] Successfully activated service 'org.gnome.Nautilus'
> Apr 27 13:49:35 david-HP-ProBook-440-G2 dbus-daemon[754]: [system]
> Activating via systemd: service name='org.freedesktop.hostname1'
> unit='dbus-org.freedesktop.hostname1.service' requested by ':1.131'
> (uid=1000 pid=4857 comm="/usr/bin/nautilus --gapplication-service "
> label="unconfined")
> Apr 27 13:49:35 david-HP-ProBook-440-G2 systemd[1]: Starting Hostname
> Service...
> Apr 27 13:49:35 david-HP-ProBook-440-G2 nautilus[4857]: Called "net
> usershare info" but it failed: Failed to execute child process “net” (No
> such file or directory)
> Apr 27 13:49:35 david-HP-ProBook-440-G2 dbus-daemon[754]: [system]
> Successfully activated service 'org.freedesktop.hostname1'
> Apr 27 13:49:35 david-HP-ProBook-440-G2 systemd[1]: Started Hostname
> Service.
> Apr 27 13:49:40 david-HP-ProBook-440-G2 gvfsd[1432]: mkdir failed on
> directory /var/cache/samba: Permission denied
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gvfs/+bug/1767454/+subscriptions
>

Revision history for this message
tony (tcatalf1) wrote :

Sebastien Bacher, I am not sure if it is documented anywhere?

I did notice that by default nautilus connects with smb3_11 to my server.

thats good because it uses a more secure protocol but it breaks network browsing.

if you downgrade to NT1 like I mentioned above it will work again but with a lower protocol.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

What are your servers? I can't get windows 10 or 2016 server to show up not even in artful (17.10).

Revision history for this message
tony (tcatalf1) wrote :

Andreas Hasenack, my server is nas4free (https://www.nas4free.org/) running Samba version 4.7.6

smbstatus shows the connection with ubuntu 18.04 as SMB3_11.

ubuntu 17.10 would use NT1 by default.

so with 18.04 I would need to got to other "locations/connect to server" and enter smb://server to be able to list and browse the shares.

if I want them to be automatically listed in "other locations" or "windows network" i would need to downgrade the client protocol to NT1 with "client max protocol = NT1" on the client conf.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (3.3 KiB)

Defaults for xenial (samba 4.3.11):
  client min protocol = CORE
  client max protocol = default (which is NT1 in this version of samba)

Defaults for artful (samba 4.6.7):
  client min protocol = CORE
  client max protocol = default (which is NT1 in this version of samba)

Defaults for bionic (samba 4.7.6):
  client min protocol = CORE
  client max protocol = default (which is SMB3_11 in this version of samba)

So before bionic, if you wanted a more secure protocol, you had to specify it (like smbclient's -m SMB3 option).

Now in bionic, if you want a *less* secure protocol. you have to specify it.

Ideally, computer browsing and actually connecting to shares should happen with different protocol versions.

smbclient in bionic does a quick downgrade to NT1 when needed. Notice the "Reconnecting" message intertwined in the output below:
ubuntu@bionic-desktop:~$ smbclient -L xenial -N -m SMB3
Anonymous login successful

 Sharename Type Comment
 --------- ---- -------
 print$ Disk Printer Drivers
 public Disk Public share
 IPC$ IPC IPC Service (xenial-desktop server (Samba, Ubuntu))
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful

 Server Comment
 --------- -------

 Workgroup Master
 --------- -------
 UBUNTU XENIAL

In artful, that downgrade does not happen, and we don't get the workgroup listing:
ubuntu@artful-desktop:~$ smbclient -L xenial -N -m SMB3
Anonymous login successful

 Sharename Type Comment
 --------- ---- -------
 print$ Disk Printer Drivers
 public Disk Public share
 IPC$ IPC IPC Service (xenial-desktop server (Samba, Ubuntu))
Anonymous login successful

 Server Comment
 --------- -------

 Workgroup Master
 --------- -------
ubuntu@artful-desktop:~$

I suspect smbtree does the same. In bionic, where max protocol is SMB3_11 by default, it works out of the box. But in artful, if I set client max protocol to SMB3_11, it stops working:
ubuntu@artful-desktop:~$ testparm -s -v 2>/dev/null|grep "client max protocol"
 client max protocol = default
ubuntu@artful-desktop:~$ smbtree
UBUNTU
 \\XENIAL xenial-desktop server (Samba, Ubuntu)
  \\XENIAL\IPC$ IPC Service (xenial-desktop server (Samba, Ubuntu))
  \\XENIAL\public Public share
  \\XENIAL\print$ Printer Drivers
 \\BIONIC bionic-desktop server (Samba, Ubuntu)
  \\BIONIC\IPC$ IPC Service (bionic-desktop server (Samba, Ubuntu))
  \\BIONIC\public Public share
  \\BIONIC\print$ Printer Drivers
 \\ARTFUL artful-desktop server (Samba, Ubuntu)
  \\ARTFUL\IPC$ IPC Service (artful-desktop server (Samba, Ubuntu))
  \\ARTFUL\public Public share
  \\ARTFUL\print$ Printer Drivers
ubuntu@artful-desktop:~$ sudo vi /etc/samba/smb.conf
ubuntu@artful-desktop:~$ testparm -s -v 2>/dev/null|grep "client max protocol"
 client max protocol = SMB3
ubuntu@artful-desktop:~$ smbtree
ubuntu@artful-desktop:~$

So in summay, bioni...

Read more...

Revision history for this message
tony (tcatalf1) wrote :

Andreas, it looks like to me that smbtree still needs NT1 to list shares, as people harden there servers and disable less secure protocols it will break browsing for shares.

the only way to get the computer listing with non-NT1 that I know of at this point is with MDNS or Zeroconf/Bonjour

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

On Thu, May 3, 2018 at 5:54 PM, tony <email address hidden> wrote:

> Andreas, it looks like to me that smbtree still needs NT1 to list
> shares, as people harden there servers and disable less secure protocols
> it will break browsing for shares.
>

Do you mean list shares or list computers?

> the only way to get the computer listing with non-NT1 that I know of at
> this point is with MDNS or Zeroconf/Bonjour
>

That's a remark I saw in the samba upstream bug too.

Revision history for this message
tony (tcatalf1) wrote :

I mean to list shares NT1 is needed with smbtree.

the server will be listed but shares will not.

we will see what happens down the road but this is actually a good thing because of security issues with lower protocols.

Revision history for this message
In , Strangiato Xanadu (strangiato) wrote :

I can not confirm.
My two computers run Arch Linux
pc A: kde plasma 5.12.5, frameworks 5.45, dolphin 18.04, samba 4.8.1
pc B: Gnome 3.28.1, nautilus 3.28.1, samba 4.8.1

Both computers have
"[global]
    client max protocol = SMB2"
in their smb.conf file.
Dolphin from pc A shows the samba shares from pc B.

Revision history for this message
In , Strangiato Xanadu (strangiato) wrote :

*** Bug 393880 has been marked as a duplicate of this bug. ***

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Changed in samba (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Y-dev-4 (y-dev-4) wrote :

I can confirm this behavior with openSUSE Leap 15.0 (Plasma 5.12.5, Frameworks 5.45.0) on the client and Samba 4.6.14 on the server.

Dolphin shows nothing with smb:// if I go to the share directly in Dolphin it works. With smbtree the shares are showing correctly.

The following file on the client helps, thank you:
~/.smb/smb.conf
[global]
    client max protocol = NT1

But it would be better do solve this issue in the smb kio plugin directly.

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 392803 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 388000 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

Migrating information from a duped bug:

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]

Ubuntu 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 Smbtree command line tool intelligently downgrades itself to using the old SMB1 version for the purposes of browsing.[4] Connections are actually made using the newer, more secure version. libsamba (the actual library that we use) does not have the same behavior.

---

Distros have been 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. Ubuntu and OpenSUSE chose the latter.

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

---

KDE's options are as follows:
1. Wait for Samba to support the newer WS-Discovery protocol for browsing
2. Implement WS-Discovery support ourselves, perhaps taking inspiration or re-using an existing approach. [5][6]

[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
[4] https://bugzilla.samba.org/show_bug.cgi?id=12876#c2
[5] https://nmap.org/nsedoc/scripts/wsdd-discover.html
[6] http://www.dankulp.com/blog/2013/05/apache-cxf-and-ws-discovery/

Changed in nautilus:
importance: Unknown → High
affects: nautilus → dolphin
Revision history for this message
In , Nate-b (nate-b) wrote :

*** Bug 398698 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Nate-b (nate-b) wrote :

The GNOME folks just forced the use of SMB1/NT1 for discovery purposes in Nautilus/GVFS: https://gitlab.gnome.org/GNOME/gvfs/merge_requests/12/diffs

We might consider doing something similar until a better fix can be implemented.

Revision history for this message
In , Strangiato Xanadu (strangiato) wrote :

*** Bug 399906 has been marked as a duplicate of this bug. ***

Changed in gvfs:
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is fixed with gvfs 1.38.1 in disco, that version is being SRUed now to cosmic and the patch backported to a bionic SRU

affects: nautilus (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
status: Confirmed → Fix Released
Changed in samba (Ubuntu):
status: Confirmed → Invalid
importance: Undecided → High
Revision history for this message
In , Harald Sitter (apachelogger) wrote :

Git commit 55eb68ff63646050311f8b689752ad500246c916 by Harald Sitter.
Committed on 07/12/2018 at 12:55.
Pushed by sitter into branch 'master'.

fallback to dnssd service discovery if smb listDir failed on root

Summary:
This elevates a problem with newer SMB protocol versions and smbclient
not supporting discovery/browsing. when not using older (as in:
ancient) protocol versions discovery doesn't work and smb:/ gives no
results.

By falling back to DNSSD based discovery we can ensure discovery of DNSSD
remotes (namely linux and osx) is always working. Windows unfortunately
does not support DNSSD and as such will not benefit from this mode of
discovery and continue to be unlisted when using a protocol version
without browsing support.

CHANGELOG: When SMB Discovery is not working (protocol > SMB1) host discovery will now fall back to DNS-SD/Avahi/Bonjour.
Related: bug 390551

Test Plan:
smb.conf:

```
[global]
client min protocol = SMB2
```

Lists devices

Reviewers: #frameworks, #dolphin, broulik

Reviewed By: broulik

Subscribers: acrouthamel, alexde, bcooksley, ngraham, kde-frameworks-devel, kfm-devel

Tags: #dolphin, #frameworks

Differential Revision: https://phabricator.kde.org/D16299

M +6 -0 CMakeLists.txt
M +3 -0 config-runtime.h.cmake
M +16 -3 smb/CMakeLists.txt
M +1 -0 smb/kio_smb.h
M +126 -3 smb/kio_smb_browse.cpp

https://commits.kde.org/kio-extras/55eb68ff63646050311f8b689752ad500246c916

Revision history for this message
Amir (amirzolal) wrote :

I have to say that this bug is a dissapointment. The whole samba support in Ubuntu since 18.04 is abysmal. Prior to this, I was able to access shares with no problems, now there is a problem. The bug has been posted one year ago. After changing the protoocol, I discovered I needed to change the interface too, because samba somehow insists on using virtbr0.

Why? These things are a dealbreaker. My wife uses a NAS drive on our network. Each time I tried to show her the advantages of linux, some _basic_ function like using a NAS without configuring a f.. FTP client for her, just coming to the box and finding that it works, prevented her from switching.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

What's described in comment #32 is being tracked in bug https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1778322

Revision history for this message
TonyR (rooneyo) wrote :

I wanted to reconfigure an old PC to be a music server connected to our HIFI. It took 3 days and 7 attempts to successfully install 18.04 due to an issue with installing on PC with multiple drives. It refused to correctly write the GRUB boot loader to the same partition it itself installed Ubuntu to. I had to strip out all the drives to get round the problem to now discover I cannot connect to the Music media on my main Windows 10 PC due to this SMB issue. I got round it by the connect to server option and bookmark option but Kodi cannot see the share or index the Music. Now I'm off to Kodi support.

Using Ubuntu since 2008 it seem that every release for me has bugs affecting core features such as USB Wireless card support, Sound, DVD burning software and display adapter support. I cannot understand how the platform can be released with such fundamental feature broken.
No problem for those who are expert but for mass use users stuffing around for hours on forums searching out solutions is not a viable option.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This will be addressed shortly via bug #1778322

Rex Tsai (chihchun)
no longer affects: oem-priority
Revision history for this message
In , Tu4manjohn (tu4manjohn) wrote :

(In reply to Bernd Lachner from comment #5)
> I can confirm this behavior with openSUSE Leap 15.0 (Plasma 5.12.5,
> Frameworks 5.45.0) on the client and Samba 4.6.14 on the server.
>
> Dolphin shows nothing with smb:// if I go to the share directly in Dolphin
> it works. With smbtree the shares are showing correctly.
>
> The following file on the client helps, thank you:
> ~/.smb/smb.conf
> [global]
> client max protocol = NT1
>
> But it would be better do solve this issue in the smb kio plugin directly.

Mathew Hodson (mhodson)
affects: samba → ubuntu
Changed in ubuntu:
importance: Unknown → Undecided
status: Unknown → New
no longer affects: ubuntu
affects: gvfs → ubuntu
Changed in ubuntu:
importance: Medium → Undecided
status: Fix Released → New
no longer affects: ubuntu
Revision history for this message
MasterCATZ (mastercatz) wrote :

Ubuntu 20.04 LTS samba 2:4.11.6+dfsg-0ubuntu1.6

smbtree

lists all my network shares
but nautilus 3.36.3 does not see anything ?

windows can occasionally see the ubuntu shares
and I have to occasionally reload samba for nautilus to see the local share

I have tried

workgroup = WORKGROUP
   client min protocol = CORE
   client min protocol = NT1
   server min protocol = NT1
   client max protocol = SMB3
   client lanman auth = yes
   ntlm auth = yes
   local master = yes
   preferred master = yes
   wins support = yes

never had issues with Ubuntu 18.04 LTS

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.