Does Dolphin work with SMB2

Hello everybody,

I am using 42.3 with KDE and a NAS from Synology, a Diskstation 216+II. I use smb to access the Diskstation.
In fstab I have done same entries like this “//Diskstation/home /home/myuser/Diskstation/myuser cifs credentials=/home/myuser/.smbcredentials 0 0”.
In the smb settings of the Diskstaion the maximum smb protocol and the minimum smb protocol can be set. The default settings are maximum smb2 and minimum is smb1.
With these settings everything works okay. But if I change the minimum settings to smb2, I can no longer access the mounted smb shares.
Probably so far it always fell back on smb1.

How can I make it that Dolphin or whatever works with smb2 or higher?

Thanks and greetings
Philipp

There’s this KDE Bug Report: “Bug 339752 - enable max protocol SMB3”: <https://bugs.kde.org/show_bug.cgi?id=339752>

There’s also this CyberCiti.biz article: <https://www.cyberciti.biz/faq/how-to-configure-samba-to-use-smbv2-and-disable-smbv1-on-linux-or-unix/>

In /etc/samba/smb.conf – section: [global] – change to: “min protocol = SMB2”

Haven’t tried it personally, yet, but, I suspect that, it’s now on my “To do” list . . . :wink:

Hello dcurtisfra,

thanks for the information.
When it’s a bug I can’t do anything myself. Just wait. Synology will sooner or later remove smb1 according to Microsofts specification.
Until then I hope there will be a solution. On the Diskstation I can use NFS too, perhaps I have to try this in future.

Rather than accessing samba shares directly with dolphin, perhaps using AutoFS for the samba shares is a viable option for now. I’ve only ever done this for NFS shares but here’s some good guides…

https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.autofs.html
https://www.howtoforge.com/accessing_windows_or_samba_shares_using_autofs

*Don’t forget to change the SMB version in /etc/samba/smb.conf as well

Dear deano_ferrari,

thanks for the hints.

Looking at the openSUSE Bug Report again, the report’s originator (Pascal d’Hermilly) has, actually, mentioned the solution in the initial description (therefore, why wait just because it’s a Bug Report?):

  • You can check the Samba SMB behaviour by using the CLI “smbclient” utility with the “-m” ("–max-protocol") option to use either SMB2 or SMB3 – the full details are documented in the “smbclient” man page.
  • You can also setup ‘/etc/samba/smb.conf’ to use either SMB2 or SMB3 either exclusively or, by negotiation – search the “smb.conf” man page for “SMB2” or “SMB3” for the details.

[HR][/HR]Don’t wait for reported issues (aka “bugs”) to be addressed: the solution for “now” is for each and every Linux system administrator to setup Samba with the correct parameter values for the current SMB protocol version being used by the clients and servers.

Hello dcurtisfra,

smbclient is a CLI Tool and in my understanding it has nothing to do with dolphin. With smbclient the access to the server with smb2 or smb3 might work but Dolphin uses still smb1.
The /etc/samba/smb.conf is the file on the server (the Diskstation for me). And there I can of course adjust the smb protocol. Even by GUI.
But it doesn’t work with smb2 for example if Dolphin only supports smb1. And I would like to access my samba shares with dolphin. Until now everything works fine because I can use smb1.
But smb1 will certainly be disabled in future.

Thank you!

Tracing with Wireshark and using Dolphin version 16.08.2 (KDE Frameworks 5.26.0; Qt 5.6.1; xcb) to access a FRITZ!Box 7490 and a QNAP NAS via SMB gives the following “SMB Negotiate Protocol Request Requested Dialects” result:

Transmission Control Protocol, Src Port: 57616 (57616), Dst Port: microsoft-ds (445), Seq: 1, Ack: 1, Len: 194SMB (Server Message Block Protocol)
[INDENT=2]Negotiate Protocol Request (0x72)[/INDENT]
[INDENT=3]Requested Dialects:[/INDENT]
[INDENT=4]Dialect: PC NETWORK PROGRAM 1.0
Dialect: MICROSOFT NETWORKS 1.03
Dialect: MICROSOFT NETWORKS 3.0
Dialect: LANMAN1.0
Dialect: LM1.2X002
Dialect: DOS LANMAN2.1
Dialect: LANMAN2.1
Dialect: Samba
Dialect: NT LANMAN 1.0
Dialect: NT LM 0.12
[/INDENT]

Microsoft MSDN URLs: <https://msdn.microsoft.com/de-de/library/windows/desktop/aa365235(v=vs.85).aspx> <https://msdn.microsoft.com/en-us/library/dd541643.aspx>
[HR][/HR]So, yes, your assertion is correct:

  • Plasma 5 Dolphin does NOT request the “SMB 2.???” Dialect and, therefore, a SMB2 negotiation will never occur . . .

[HR][/HR]May I suggest an urgent high priority KDE Bug Report directed to the KDE Dolphin folks?

I added the following to the [global] section of /etc/samba/smb.conf:client max protocol = SMB3

With Wireshark again – Dolphin accessing a QNAP NAS Server and a Windows 7 machine – the FRITZ!Box 7490 only supports NT1 (no SMB2 or SMB3 support, yet):

SMB (Server Message Block Protocol)Negotiate Protocol Request (0x72)

[INDENT=2]Requested Dialects[/INDENT]
[INDENT=3]Dialect: PC NETWORK PROGRAM 1.0
Dialect: MICROSOFT NETWORKS 1.03
Dialect: MICROSOFT NETWORKS 3.0
Dialect: LANMAN1.0
Dialect: LM1.2X002
Dialect: DOS LANMAN2.1
Dialect: LANMAN2.1
Dialect: Samba
Dialect: NT LANMAN 1.0
Dialect: NT LM 0.12
Dialect: SMB 2.002
Dialect: SMB 2.???
[/INDENT]

The servers answer with a SMB2 Protocol Response:

SMB2 (Server Message Block Protocol version 2)SMB2 Header
[INDENT=2]Server Component: SMB2
[/INDENT]

All subsequent transactions use the SMB2 protocol.

Need to test further with a Leap 42.3 Laptop which doesn’t have a Samba server – client only . . .
[HR][/HR]AFAICS, a KDE Bug Report is not needed.

Same again on a Leap 42.3 Laptop – no Samba server:

  • added “client max protocol = SMB3” to the [global] section of ‘/etc/samba/smb.conf’.

After closing Dolphin and then starting a new Dolphin session – the SMB2 protocol is used – also to a Samba server running on a Leap 42.2 machine.

Will also check the SMB3 case to Windows 10 running in a VM on this machine.

Hello,

you are right. I thought the /etc/samba/smb.conf is only relevant for the server.
I have added “client max protocol = SMB3” to the [global] section of ‘/etc/samba/smb.conf’ file on my SUSE 42.3 Desktop.
The server settings are smb3 max protocol and smb2 min protocol. Now Dolphin accesses to the server. (typing smb://servername).
However my cifs mounts in the /etc/fstab are still not working.

Thanks for your time.

AFAICS, given a KDE GUI and Dolphin (and KWallet ) CIFS mounts in ‘/etc/fstab’ may currently be viewed as being ‘outdated’ (not the current way to do things).

  • “KWallet” – a very important place to store the “Form Data” (Username and Password) Dolphin needs to access the Windows world (and elsewhere, as well as and also).

[HR][/HR]By the way, I checked the access from Leap 42.3 Dolphin to Windows 10 (newest – “Creator’s Edition”) running in an Oracle VirtualBox VM on the same machine – Wireshark showed that, the IP packets were using the SMB2 protocol – I didn’t notice any SMB3 packets in the trace but, that may be, either, a “Redmond issue” or, Wireshark not correctly marking the decode of IP packets containing the SMB3 protocol.