Linux Supported samba protocol versions?
#16
No problems, will take it away from this posting. Thanks for the support.
Reply
#17
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.
Reply
#18
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
Reply
#19
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.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#20
(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?
ASUS Chromebox M004U (LibreELEC 8.2/Aeon Nox SiLVO)--->HDMI--->Onkyo TX-NR646--->HDMI--->Panasonic P65VT30
Reply
#21
(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.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#22
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
NVIDIA Shield 2015 -> HDMI -> ONKYO TX-NR609 -> HDMI -> SONY Bravia (9 years old now...)

ONKYO -> lots of cables -> BOSE
Reply
#23
(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..
Reply
#24
(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-wo...ervice-off
Reply
#25
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.
Reply
#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 ?
Reply
#27
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.
Reply
#28
Thank you for the fast reply!
Reply
#29
(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.
Reply
#30
With SMB2 and SMB3 browsing for servers is broken, but you can add them manually and then SMB2/3 will work.
Reply

Logout Mark Read Team Forum Stats Members Help
Supported samba protocol versions?0