Kodi Community Forum
Linux Supported samba protocol versions? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux Supported samba protocol versions? (/showthread.php?tid=314350)

Pages: 1 2


RE: Supported samba protocol versions? - KillerKelvUK - 2017-05-16

No problems, will take it away from this posting. Thanks for the support.


RE: Supported samba protocol versions? - chewitt - 2017-05-16

Supported GPU's should work. I can't offer any advice on the process but if you look for LE on unRAID guides you might get some hints as that's the origin of support.


RE: Supported samba protocol versions? - thezoggy - 2017-05-23

I use unraid as my nas and theres talk of disabling smb v1, running smbstatus on it I noticed that kodi 17.2 was connecting using NT1, which lead me to this thread.

using adblink I connected to my nvidia shield, clicked on file manager and navigated to the file and clicked edit.

/sdcard/Android/data/org.xbmc.kodi/files/.smb/smb.conf

added these three lines to the bottom and saved.

Quote: server min protocol = SMB2
client min protocol = SMB2
client max protocol = SMB3

restarted kodi and saw no change. closed out out kodi and told the shield to restart... still seeing NT1.
I do not have the folder: /sdcard/Android/data/org.xbmc.kodi/files/.kodi/.smb/

Tried to set some smb settings on my nas to 'fix' kodi.. but no luck.
Code:
[global]
    nt acl support = no
    client min protocol = SMB2
    encrypt passwords = yes
    server signing = mandatory
    ntlm auth = no


see this just got pulled into master, https://github.com/xbmc/xbmc/pull/12147
they mention the NT1 issue there.. but looks like its by design


RE: Supported samba protocol versions? - Milhouse - 2017-05-23

See PR12110. NT1 is the Samba default client max protocol. There is nothing you can configure in your server that will change default Kodi NT1 behaviour. You only need to add "client max protocol = SMB3" in the smb.conf used by Kodi and Samba will begin negotiating connections starting with SMB3 instead of NT1. However you need at least Samba 4.1.0 on the client in order for SMB2/SMB3 protocols to be supported. Setting "client min protocol" is known to cause compatibility issues so don't specify it. Also, Kodi is the client not the server so there's no point specifying server settings in the client smb.conf.


RE: Supported samba protocol versions? - wgstarks - 2017-05-24

(2017-05-23, 23:59)Milhouse Wrote: You only need to add "client max protocol = SMB3" in the smb.conf used by Kodi and Samba will begin negotiating connections starting with SMB3 instead of NT1.

Will changes to smb.conf be preserved through updates to kodi or is it necessary to edit the file after updating?


RE: Supported samba protocol versions? - Milhouse - 2017-05-24

(2017-05-24, 02:39)wgstarks Wrote: Will changes to smb.conf be preserved through updates to kodi or is it necessary to edit the file after updating?

Will your changes be preserved? Currently yes, but in future, no. The current $HOME/.smb/smb.conf file isn't technically a "kodi owned" file, it's a system file, so updating it is a problem for Kodi. However if it's possible to use a "kodi owned" file (as discussed in the PR12110) then yes the file may be updated during Kodi updates and you'll lose your modifications (though there's a possible way around that, again see PR) however we're hoping that the "client max protocol" option will be supported by Kodi in future which will mean you don't need to worry about it.

Also if you're running a Samba server on your network you might want to see the exploit of the day. Adding "nt pipe support = no" in the server smb.conf is a workaround.


RE: Supported samba protocol versions? - ZombieViewer - 2017-07-14

Unfortunately, I've been affected by the horrible smb support in kodi. This issue has been around nearly a year for me, when I had to migrate my servers to SMBv2, thus Kodi running on the NVIDIA Shield became completely unusable. I asked around and it seemed like nobody cared to support a higher smb version.

I've read the PR posted above and I am glad that some people realized how silly it was to run such an old and deprecated version. Hopefully the update will be included in a future Kodi version, probably around next year (2018) or so. I'm happy things are moving along the right path! Nod


RE: Supported samba protocol versions? - VeNoMouSNZ - 2017-07-20

(2017-05-15, 04:46)Milhouse Wrote: Try adding the following to $HOME/.smb/smb.conf (not sure where this file well be on Android):
Code:
client max protocol = SMB3
and restart Kodi. This will instruct libsmbclient to negotiate a protocol higher than NT1 (which is basically SMB1) when connecting to your server.

It seems that the default libsmbclient configuration used by Kodi will limit/restrict any negotiated connection to NT1 even when the Samba server supports more recent, secure and performant versions of the SMB protocol. And when NT1/SMB1 is disabled on the server (which is highly recommended, for obvious reasons), Kodi won't be able to connect to the server at all.

On your server you should be able to see the types of connection your Samba clients are establishing by running "sudo smbstatus -b".

Edit: "smbstatus -b" output on an Ubuntu 16.04 server:
Code:
neil@nm-linux:~$ sudo smbstatus -b

Samba version 4.3.11-Ubuntu
PID     Username      Group         Machine            Protocol Version
------------------------------------------------------------------------------
1801      neil          neil          192.168.0.6  (ipv4:192.168.0.6:52229) SMB2_10
2751      neil          neil          192.168.0.12 (ipv4:192.168.0.12:55642) Unknown (0x0311)
2714      neil          neil          192.168.0.12 (ipv4:192.168.0.12:55590) Unknown (0x0311)
192.16.0.6 is a Windows 7 PC, with SMB2_10 connection

192.168.0.12 is a LibreELEC 9 test build with Kodi 18a1 and "client max protocol = SMB3" - established connection is SMB3_11.

(The "Unknown (0x0311)" protocol is fixed in Samba 4.4.0)

Came here to personally thank you for finding that answer, upgraded my media box to debian stretch tonight and couldnt work out wtf was going on..


RE: Supported samba protocol versions? - thezoggy - 2017-08-01

(2017-05-23, 23:59)Milhouse Wrote: See PR12110. NT1 is the Samba default client max protocol. There is nothing you can configure in your server that will change default Kodi NT1 behaviour. You only need to add "client max protocol = SMB3" in the smb.conf used by Kodi and Samba will begin negotiating connections starting with SMB3 instead of NT1. However you need at least Samba 4.1.0 on the client in order for SMB2/SMB3 protocols to be supported. Setting "client min protocol" is known to cause compatibility issues so don't specify it. Also, Kodi is the client not the server so there's no point specifying server settings in the client smb.conf.


I see that koying put this code into spmc, any hope of it making it into kodi proper soonish?

I ask because another vulnerability has been found by security researchers at RiskSense: "SMBLoris" can lead to DoS attacks affecting every version of the SMB protocol and all versions of Windows since Windows 2000. Microsoft isn’t bothering to patch it, as they plan to remove the SMBv1 protocol in the Windows 10 Fall Creators Update, but everyone running older versions of Windows will remain affected.
https://www.onmsft.com/news/microsoft-wont-patch-20-yr-old-smbv1-vulnerability-you-should-just-turn-the-service-off


RE: Supported samba protocol versions? - Koying - 2017-08-02

Putting samba 4.5.1 in Kodi is on the agenda.
Some dependencies to be merged first, though

PS. For Android I mean, ofc.
Windows uses its own implementation and "pure" Linux uses whatever samba is on the system.
Ios/OSX will depend on how hard it is and how much time the devs have to work on it.


RE: Supported samba protocol versions? - bl4ke - 2017-10-26

(2017-08-02, 08:04)Koying Wrote: Putting samba 4.5.1 in Kodi is on the agenda.
Some dependencies to be merged first, though

PS. For Android I mean, ofc.
Windows uses its own implementation and "pure" Linux uses whatever samba is on the system.
Ios/OSX will depend on how hard it is and how much time the devs have to work on it.

As I'm also using Kodi on a Shield and trying to remove all SMBv1 within my network: is this samba update included in Krypton 17.5 or will it be included in v18 versions ?


RE: Supported samba protocol versions? - Rechi - 2017-10-26

Krypton only receives bug fixes, no new features. This means it will stay SMB1 only for android, ios and osx.
v18 nightly versions have a newer version of samba (4.1.23) since 23rd May which also supports SMB2 and SMB3.


RE: Supported samba protocol versions? - bl4ke - 2017-10-26

Thank you for the fast reply!


RE: Supported samba protocol versions? - too40shorty - 2017-11-11

(2017-10-26, 19:22)Rechi Wrote: Krypton only receives bug fixes, no new features. This means it will stay SMB1 only for android, ios and osx.
v18 nightly versions have a newer version of samba (4.1.23) since 23rd May which also supports SMB2 and SMB3.

Is this still true? I updated to a v18 nightly version and still cannot see my share. Just wanted to make sure something didn't change since your post before I go crazy trying to figure out what I did wrong.


RE: Supported samba protocol versions? - Rechi - 2017-11-11

With SMB2 and SMB3 browsing for servers is broken, but you can add them manually and then SMB2/3 will work.