SMB Shares - Cannot Browse After Update

I’m having the same problems accessing SMB share on OSX 10.11.5 (or 10.11.4) after upgrading to May update 2016.05-1.
Looks like there is a problem with a new samba client in relation to OSX samba server.

I did a test with fresh install of the next three OSMC versions today:
2015.06.28: samba client sees smb shares on OSX 10.11.5
2016.04-1: samba client sees smb shares on OSX 10.11.5
2016.05-1: samba client does NOT see smb shares on OSX 10.11.5

With the same OSX samba shares only the last version 2016.05-1 does not see samba shares.
Are there any problems with new samba client ver. 4.2? I think that previous samba client on osmc was lower than 4.2?

Something has definitely changed regarding samba in May’s version of OSMC!

Well the main change was done in April, when the upstream version of samba fixed the badblock bug. In May the only change on top of that was trying to allow legacy connection back again by adding these two lines to smb.conf.
client use spnego = no client ntlmv2 auth = no

On a fresh install of OSMC on rPi2, I cannot get SMB shares to work either. I am able to browse and everything just fine, but cannot get the video to play. Here are my debug logs:

I notice that around line 64 there is a timeout error. Wondering if that is the issue. I am able to play from this SMB stream on my windows computer. I have the lines im my smb.conf that fzinken mentioned but did not make a difference

Are you using ethernet or wireless?
Monitor your network performance from OSMC to your server with iperf3
Also as your problem is different suggest not to thread hijack

This is on wireless - however, I can stream Bluray rips via PleX/HTTP no problem
And my mistake! Thought maybe it was related

Ran 30 second test with iperf3 - sending to server is 54mbit/s and receiving is 81mbit/s

I was having the problem of OSMC would not see windows and windows could not see it at all. After many long nights and a few beers i got it to work. in the smb.config there is something missing. “server string = %h OSMC (Samba)” and it works again. some odd reason the server is not named once fixed it worked again.

Ok I believe I found the solution:

The 10.11.5 samba implementation requires by default signing (whatever that means). Most client implementation do not do this (at least the implementation in kodi).

So to make it work you need to do the following on the osx machine which is being used as file server:

Edit the /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist and add a new key:
<key>SigningRequired</key> <false/>

Restart smbd process (if you have osx server flick the on off switch otherwise reboot the computer or use the activity monitor).

I can confirm that this works with the osmc 2016.02.3 and osx 10.11.5 with server 5.1.5
I test this tomorrow with the latest osmc build 2016.05.01 but I am pretty confident it will work.

Hope this information helps others.

By the way I didn’t come up with the solution found it in this post on the apple website:

https://discussions.apple.com/thread/7565716`indent preformatted text by 4 spaces`

Use the function <preformatted text> from the editor menu than you don’t need the star

Hi.

I tried the suggestion above and I can confirm it does not work on osmc build 2016.05-1.
OSX SMB server still reports:
smbd[8882]: x.y.z.w SMB client not supported - Unicode, NT Errors, Long Names and Extended Security are required

But earlier versions of osmc works on OSX 10.11.5 (or other OSX versions) without any tweaks. I assume there was some change in SMB client (as I noted smb client version used in osmc is 4.2 now).
See my tests above I reported 4 days ago.

I saw your tests it is just that I could not reproduce them. So with the latest osx server no build was working for me (see post 5 days ago)

With the suggested fixed an older build worked.
What is more : Kodi running on an osx machine (laptop) could also no longer connect to the network shares. With this fix the problem went away.

As said I will try to test the latest osmc release in my setup later today. (Please not that in my setup I use an “authenticated” connection I pass username ans password in the connection URL so I do not use guest connection)

Finally can you tell me where I can find and activate the smbd logs on the mac

Jheldens,
you can find smbd log if jou run application Console on Mac. There you can filter for smbd messages.

My configuration was OS X 10.11.5 (not server) without authentication (using Guest account).

This is a different (while also related to the smbclient changes) topic than @jheldens is fixing. Passwordless/Guesst access is not possible anymore with the current upstream smbclient.

Sadly I have to report that the suggested fix does not work with the latest osmc release (2016.5.1).

I thought it would but for some reason it doesn’t. I believe there is some incompatability between the security patch in april/may and the latest SMB implementation of Apple.

I can confirm however that the suggested fix does solve the problem that Kodi clients have when running on a Mac or iOS device and connecting to a smb share on a Mac (but that is of little help in the OSMC forum).

However I ran some test and I am able to connect to the share on the mac when execution the following command at the raspberry pi command line:
sudo mount -t cifs //osxserver/MediaFiles/ /home/osmc/testing/ -o user=xxxxx,password=xxxxx

I got the idea from this post:
https://forums.developer.apple.com/thread/44739

I hope someone can point me in the right direction.

As far as logs go . The mac logs show nothing not even een logon attempt. The kodi logs just give a generic error on the connection.

I also found this link. But this far exceeds my expertise level:
Bug #1579540 “smbclient 4.3.9 can't connect WITH password to OSX...” : Bugs : samba package : Ubuntu (smbclient 4.3.9 can’t connect WITH password to OSX share due to NTLMSSP “short signature” & workarounds don’t fix)

I did some more testing and are now getting the same error as @mitjam

As mentioned before I use a URL which contains username and password to connect to my shares.

Ok here are some more thoughts after some more digging.

It seems that the security fix introduced in april effectively broke the compatiblity with the OSX SMB implementation.

From the error message I deduced that OSX requires Extended Security to enable this extended security you need SPNEGO (which was disabled in the fix).

see:
https://groups.google.com/forum/#!topic/mailing.unix.samba/yWP17E-jOhg

The fix also disabled the ntlmv2. So reverting back to ntlmv1 (I guess). But OSx no longer supports this protocol see:

https://en.community.sonos.com/home-theater-228993/sonos-with-osx-mavericks-server-6169367

This post suggest a fix to enable the old protocol. I tried it but it is not working. (still need to disable the SPNEGO support on the server).

What I find strange is that in order to fix an security thing we need to revert to an older protocol and reduce the security settings. Or am I missing something.

Well the enhanced security gave problems with legacy samba servers which seemed to be a majority of OSMC users using (or at least the once crying the loudest.
Try to revert the steps to check if it works for you.

sudo systemctl stop mediacenter
nano /home/osmc/.smb/smb.conf
Change the following lines to “yes”
client use spnego = yes
client ntlmv2 auth = yes
Save and exit with ctrl-x
sudo systemctl start mediacenter

Let us know if it works afterwards.

This was something I tried yeasterday mut I redid the test today but is not working.
On the OSx server nothing shows up in the log.
In the kodi log I see permission denied

unix_err:‘d’ error : ‘Permission denied’

I tried the following conf files:

preferred master = no local master = no domain master = no client lanman auth = yes lanman auth = yes socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 lock directory = /home/osmc/.smb/ client use spnego = yes client ntlmv2 auth = yes name resolve order = bcast host

and

preferred master = no
    local master = no
    domain master = no
    client lanman auth = no
    lanman auth = no
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    lock directory = /home/osmc/.smb/
    client use spnego = yes
    client ntlmv2 auth = yes
    name resolve order = bcast host'

I am now trying with a minimal smb.conf file

Just know that I was able to mount the shares from the command line using the mound -t cifs command

Just some more information:

If I add the share through the command line using:

sudo mount -t cifs //osxserver/Directory /home/osmc/testing -o user=USER,password=PASSWORD

And that go back to osmc add the the ‘local’ directory /home/osmc/testing to my video section. I can perfectly browse all directories and play a movie.

Sadly this is not a good workaround for me given the fact that my library is shared through MySQL an relies on the fact that every client can access to the network share.

I had trouble getting the ‘sudo mount’ option to work because the the root directory (the sharepoint ) of the share contained a directory which had no ‘everyone’ access (the everyone group was not in the access list) —> resulted in permission denied. Giving that directory everyone access cleared the error and I was able to mount the directory.

Also note that the test with minimal smb.conf failed
[global] preferred master = no local master = no domain master = no lock directory = /home/osmc/.smb/

I am going to do some chores now. I’ll hope you figure this out when I am back :grin:

Not 100% sure what you mean here, but I guess path substitution would solve that problem http://kodi.wiki/view/Path_substitution

I didn’t know that option but yes this is a viable workaround.

Just to recapitulate for others this is the workaround implemented:

Situation:
OSx machine running 10.11.5. en server.app 5.1.5. The machine uses the server app to share the media content through SMB. URL of the share is //osxserver/MediaContent.

OSMC build 2016.05.1 using a shared library (MySQL) to get to the MediaContent. When selecting a movie to play the library returns the following information: smb://USER:PASSWORD@osxserver/MediaContent/Movies/Movie Folder/movie.mkv

Actions:

On the OSx machine:

Edit the /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist and add a new key:
<key>SigningRequired</key> <false/>

On the OSMC machine (raspberry pi)

Automount the share using the OS. You do this by adding the following line to the /etc/fstab file:
//osxserver/MediaContent /home/osmc/networkshare cifs username=USER,password=PASSWORD

There are 2 preconditions for this to work.

  • Every Folder/directory (File?) in the on root(toplevel) of the share(in this example //osxserver/MediaContent) must have “Everyone” access enabled. (this is on the osx machine)
  • Ensure you created the directory /home/osmc/networkshare (using mkdir) (this is on the osmc machine)

Now modify/add the following line to the advancedsettings.xml

<pathsubstitution> <substitute> <from>smb://USER:PASSWORD@osxserver/MediaContent/</from> <to>/home/osmc/networkshare</to> </substitute> </pathsubstitution>

reboot the pi (sudo reboot)

And all should be working again.

@fzinken
According to me this really is a bug on the client side. OSMC should have a working client for OSx smb server. Can you please make the developers (sam) aware of it. I think the clue lies in correct parameters in the smb.conf file and possibly this bug/issue:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/15795401 (smbclient 4.3.9 can’t connect WITH password to OSX share due to NTLMSSP “short signature” & workarounds don’t fix)