Win SMB Shares Not Working in Kodi
#1
Hey guys,

Upgrading from XBMC13.2 Gotham to Kodi (tried 14, 14.1, 14.2 beta and 15). When trying to add or browse my SMB shares to my Synology NAS, none of the items in my library show up. Any one else having this issue?

Intel NUC - Win7sp1 (tested on multiple machines)
Synology NAS 1515+

This is intentionally vague post to start with. I have spent hours troubleshooting this, but I cant prove my current theory and I am looking for something fresh. If this gains any traction here, I have tons of additional information I can post about this extremely bizarre issue.
Reply
#2
1. Can you access the smb shares from just windows, outside of Kodi on the same machine Kodi is installed on?
2. Have you tried mapping a drive, and setting up the mapped drive in Kodi?
3. Have you performed a full uninstall and fresh install of Kodi?
Reply
#3
(2015-03-05, 05:42)guyonphone Wrote: 1. Can you access the smb shares from just windows, outside of Kodi on the same machine Kodi is installed on?
2. Have you tried mapping a drive, and setting up the mapped drive in Kodi?
3. Have you performed a full uninstall and fresh install of Kodi?

1. Yes. Opening a network share to the same location in windows works just fine.
2. Yes. Mapping a network drive all the folders show up, but when checking them out via Kodi, I do not see anything.
3. I have done several installs over the past to months. I have even changes out PCs entirely.
Reply
#4
Have you ruled out that the Win firewall blocks the kodi.exe from accessing your LAN?
Bye,
Fry
Kodi v17.6 with shared MariaDB v10.3 | HTS Tvheadend 4.2.6 on RPi2 | running on:
Windows 10x64 | Nvidia Shield | FireTV4k | FireTVStick4 | Android 5 | RPi3 with OSMC
Reply
#5
Post a full debug log when it is trying to connect to the share from the same machine that can access it from Windows Explorer.
screenshots would help as well.
Reply
#6
(2015-03-05, 08:16)Fry7 Wrote: Have you ruled out that the Win firewall blocks the kodi.exe from accessing your LAN?

This...turn off your local firewall and see what happens.
Reply
#7
Disabled windows firewall for all connection types, that does not work.

For debugging, I turned that on along with component specific debugging and enabled it for SMB library as well. I then closed the program, deleted the debug log. Started it back up an tried to map a my "Videos" share. From looking at the debug, it is completely useless, it does not show much for SMB.

I feel like I should add some additional information here, and this is where it will get confusing. If I do a direct SMB share (without browsing) from Kodi, for example, smb://10.10.2.20/Videos/Movies-HD (not actual path). Kodi will map the folder and show a single movie that I added in my library a few days ago and not the other ones. But when I browse and open the Videos folder, the Movies-HD folder does now show up, like it is hidden? Or possibly an ACL issue? But if this were an ACL issue, why would it work on 13.2 and prior version as well as Windows, but not Kodi... This is part of the reason I am stuck. I have also done packet captures with a side by side comparison. There are obvious difference but I cannot tell for the life of me where in the SMB exchange things are going wrong.

Here is the SMB Browsing Debug (expires in two weeks):
http://pastebin.com/Rd4cup0z

For the Direct SMB Debug (expires in two weeks):
http://pastebin.com/knLje8YD

Here are some screenshots:
watch gallery




[edited] Did major edits to provide additional information and logs
Reply
#8
Please try this:

- stop Kodi
- go to your %appdata%\Kodi\userdata folder
- edit your sources.xml:


Code:
<source>
    <name>Movies HD</name>
            <path pathversion="1">smb://192.168.60.25/Movies-HD/</path>
</source>

and look for your passwords.xml inside the same folder and make sure the credentials saved there fit your needs.
Reply
#9
Hey Fry7,

I am not sure I understand your request. The path "smb://192.168.60.25/Movies-HD/" does not exist. I will try your suggestion because I may not be getting something, but I think it should be "smb://192.168.60.25/Video/Movies-HD/". I will try both and let you know the outcome. Also I do not have a passwords.xml file. SMB is doing NTLM automatically (user creds are the same on the NAS and the windows machine). I have manually entered in different credentials to no avail. Ill update this post with the results.

UPDATE:
These are the same results as doing the direct SMB share. I had to update the path provided to include "Video".


Thank you for you help so far.
Reply
#10
I don't know if this helps at all, but I find windows smb can be a flaky. This is what works for me:

1. On all windows machines, in "network and sharing center" in "advanced sharing settings" I have "Turn off password protected sharing" (I'm not particularly worried about attacks from inside my LAN).

2. On all windows machines, for folder shares on that machine I set the folder/file permissions for "Everyone" to have full control. Then I set sharing to "Everyone".

3. I force my most reliable Win 7 machine (don't have enough experience with Win 8 to comment) to take master browser by shutting down all other systems on my LAN and powering up that system first.

(After doing this, I can reliably browse my local network in windows file explorer from all windows machines. Note that if you have network browser problems often if a system isn't shown in the network browser, you can still access shares by using the IP addr as computer name.)

4. I don't ever map shares to local drive letters.

5. On my Synology running DS 4 I have accounts for all machines and use "xbmc" as the user name for each shared folder.

6. I know when windows systems access shared folders, windows can store "credentials" (on first access) and I'm not sure how to clear that store (I assume it's buried somewhere in your HKLM current control set).

Again this has security implications but as I said, seems to work for me.

scott s.
.
Reply
#11
(2015-03-05, 22:43)scott967 Wrote: I don't know if this helps at all, but I find windows smb can be a flaky. This is what works for me:

1. On all windows machines, in "network and sharing center" in "advanced sharing settings" I have "Turn off password protected sharing" (I'm not particularly worried about attacks from inside my LAN).

2. On all windows machines, for folder shares on that machine I set the folder/file permissions for "Everyone" to have full control. Then I set sharing to "Everyone".

3. I force my most reliable Win 7 machine (don't have enough experience with Win 8 to comment) to take master browser by shutting down all other systems on my LAN and powering up that system first.

(After doing this, I can reliably browse my local network in windows file explorer from all windows machines. Note that if you have network browser problems often if a system isn't shown in the network browser, you can still access shares by using the IP addr as computer name.)

4. I don't ever map shares to local drive letters.

5. On my Synology running DS 4 I have accounts for all machines and use "xbmc" as the user name for each shared folder.

6. I know when windows systems access shared folders, windows can store "credentials" (on first access) and I'm not sure how to clear that store (I assume it's buried somewhere in your HKLM current control set).

Again this has security implications but as I said, seems to work for me.

scott s.
.

Thank you for the reply Scott. I dont have problems with my windows shares, only when Kodi is trying to "see" the folders in my shares. I would be willing to try that if there were some more evidence relating to this being a fix, but I dont want to open everything to everyone and still not have Kodi work. Even if it does work, I would rather not keep a computer that open.
Reply
#12
You are of course right concerning your SMB path, simply missed to write down your folder 'Video'.

Anyway, if Kodi can access your NAS using its IP but not when using its name 'NASBOX' the only things I could think of would be missing DNS and/or WINS resolution.

One thing I don't get is that you updated from 13 to 14 - then everything should already have been in place...?

You also said that you didn't have a sources.xml, maybe you take a look at the wiki: http://kodi.wiki/view/sources.xml and try to create one completely on your own...
Bye,
Fry
Kodi v17.6 with shared MariaDB v10.3 | HTS Tvheadend 4.2.6 on RPi2 | running on:
Windows 10x64 | Nvidia Shield | FireTV4k | FireTVStick4 | Android 5 | RPi3 with OSMC
Reply
#13
(2015-03-06, 08:14)Fry7 Wrote: You are of course right concerning your SMB path, simply missed to write down your folder 'Video'.

Anyway, if Kodi can access your NAS using its IP but not when using its name 'NASBOX' the only things I could think of would be missing DNS and/or WINS resolution.

One thing I don't get is that you updated from 13 to 14 - then everything should already have been in place...?

You also said that you didn't have a sources.xml, maybe you take a look at the wiki: http://kodi.wiki/view/sources.xml and try to create one completely on your own...


I do not have an issues with using a host name VS an IP. It is when I choose to do the windows share browsing VS a direct connect. When I browse my network for available shares, I see the top level folder but nothing underneath it. When direct connect, I can traverse to a lower level directory, but when I do, only a single movie shows up and not my entire library. Kodi does not appear to be listing my shares.

I am probably doing a terrible job at explaining this. The problem is not connecting to the NAS. It is when I connect to my share via Kodi, none of my folders show up. When I connect to the share via windows on the same machine, I can see all my folders just fine. So from the upgrade from 13 to 14, I had my sources, but none of the directories in my defined sources appeared.

I believe you misread my previous statement. I do have a sources.xml, I do not have a password.xml. When connection via SMB, it can use local account credentials on a windows machine (using NTLM) to authenticate to a remote resource. That way you don't have your passwords sitting in a text file (although I am aware that NTLM is not a great form of security, I can say that it is better than plain text). So I do have a sources.xml, but I do not have a password.xml.
Reply
#14
I actually have exactly the same problem. As long as I am using XBMC I can access all smb shares on my NAS. Updating to any Kodi versions results in the same problem Blwavg is describing. I have no access to the smb shares. Currently XBMC and Kodi are installed in paralell. With XBMC it works, with Kodi not. If I can do anything to help (by posting some logs or similar) please tell me. Right now I have no idea how to solve the problem.
Reply
#15
I am having a similar issue. No problem seeing the shared folder on the NAS through windows (10) but as soon as i fire up Kodi the network connection fails. Exit Kodi and the connection pops up again.

Most peculiar..
Reply

Logout Mark Read Team Forum Stats Members Help
SMB Shares Not Working in Kodi0