Kodi Community Forum

Full Version: Cant access SMB share from Libreelec
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I have Kodi on multiple devices in the house. It is shared via a MySQL database. On my windows htpc and fire sticks, this works fine (using 17.3 on those) and files play fine.

I just setup a machine with libreelec and used the Kodi 18 test build so I can use the Netflix addon (which works great). Problem is, using the same advancedsettings.xml file as all the other machines, it does show all the movies and shows in the library but if you click on them they say the file is no longer available. Per the log, it shows access is denied when trying to access over SMB. Windows is set to share with the everyone user and I have gone into the security policy to allow anonymous users. Password protected sharing is turned off.

How can I get this machine to play the files over the network?

Log: http://sprunge.us/YICc
Libraries shared via MySQL databases need to use the same Kodi version for the clients. You can't mix v17.xx with v18.xx
(2017-08-19, 18:54)Dangelus Wrote: [ -> ]Libraries shared via MySQL databases need to use the same Kodi version for the clients. You can't mix v17.xx with v18.xx
That's not his issue. There's no problem running different versions with mysql as long as you don't expect them to remain synced.
(2017-08-19, 18:54)Dangelus Wrote: [ -> ]Libraries shared via MySQL databases need to use the same Kodi version for the clients. You can't mix v17.xx with v18.xx

Before upgrading the firesticks to v17 they worked fine on v16 while every other machine was on v17. The only exception was that library updates on 17 didnt reflect on the 16 sticks, and vice versa.
(2017-08-19, 18:50)thesuffering Wrote: [ -> ]So I have Kodi on multiple devices in the house. It is shared via a MySQL database. On my windows htpc and fire sticks, this works fine (using 17.3 on those) and files play fine.

I just setup a machine with libreelec and used the Kodi 18 test build so I can use the Netflix addon (which works great). Problem is, using the same advancedsettings.xml file as all the other machines, it does show all the movies and shows in the library but if you click on them they say the file is no longer available. Per the log, it shows access is denied when trying to access over SMB. Windows is set to share with the everyone user and I have gone into the security policy to allow anonymous users. Password protected sharing is turned off.

How can I get this machine to play the files over the network?

Log: http://sprunge.us/YICc
I'm pretty sure you'll need to turn passwords on to use v18, and possibly specify smb versions to use in kodi settings. I know there've been a fair few posts about smb in the Millhouse pi thread; I imagine it's the same in the x86 thread.
(2017-08-19, 19:10)trogggy Wrote: [ -> ]
(2017-08-19, 18:50)thesuffering Wrote: [ -> ]So I have Kodi on multiple devices in the house. It is shared via a MySQL database. On my windows htpc and fire sticks, this works fine (using 17.3 on those) and files play fine.

I just setup a machine with libreelec and used the Kodi 18 test build so I can use the Netflix addon (which works great). Problem is, using the same advancedsettings.xml file as all the other machines, it does show all the movies and shows in the library but if you click on them they say the file is no longer available. Per the log, it shows access is denied when trying to access over SMB. Windows is set to share with the everyone user and I have gone into the security policy to allow anonymous users. Password protected sharing is turned off.

How can I get this machine to play the files over the network?

Log: http://sprunge.us/YICc
I'm pretty sure you'll need to turn passwords on to use v18, and possibly specify smb versions to use in kodi settings. I know there've been a fair few posts about smb in the Millhouse pi thread; I imagine it's the same in the x86 thread.
how can i specify a password to use for the libreelec machine only? Windows is sharing the folders to two users: laptop (the admin profile name) and everyone. If i could set the libreelec device to use the laptop user (instead of guest or anonymous) id think itd satisfy this requirement.
Do you have the same sources.xml on all clients? Kodi won't be able to read the content of files that are not included in your sources.xml - it's a security feature.

Assuming you have the same sources.xml on all clients, then Kodi with Samba4 no longer supports anonymous/everyone SMB access so you'll need to use a username/password. Create a user on your Samba server, grant this user access to your share, then when you access the share in Kodi (Video > Files > <your-smb-share>) it should prompt you for a username/password - enter both, and enable the "Remember" option (can't recall exact wording) so that your Samba username/password for the share is saved in passwords.xml (which can be copied to your other clients if necessary).
(2017-08-19, 19:48)Milhouse Wrote: [ -> ]Do you have the same sources.xml on all clients? Kodi won't be able to read the content of files that are not included in your sources.xml - it's a security feature.

Assuming you have the same sources.xml on all clients, then Kodi with Samba4 no longer supports anonymous/everyone SMB access so you'll need to use a username/password. Create a user on your Samba server, grant this user access to your share, then when you access the share in Kodi (Video > Files > <your-smb-share>) it should prompt you for a username/password - enter both, and enable the "Remember" option (can't recall exact wording) so that your Samba username/password for the share is saved in passwords.xml (which can be copied to your other clients if necessary).
This worked. I just added the user, copied the sources.xml to it and then went in on the client to modify the source, it asked for the password, i entered it and its happy now.

Is there a reason it wont support anonymous/everyone access anymore? I know passwords are more secure, but for a local network its so much more convenient to do everyone access.
(2017-08-19, 20:40)thesuffering Wrote: [ -> ]Is there a reason it wont support anonymous/everyone access anymore? I know passwords are more secure, but for a local network its so much more convenient to do everyone access.

Convenient yes, secure or recommended no.

https://answers.microsoft.com/en-us/insi...841?auth=1

With all the recent news about WannaCry and SMB-related security failings (that are being actively exploited) it should be obvious why Microsoft are trying to close the stable door after the SMB horse has bolted. In doing so they're breaking some convenient but insecure "features", but ultimately it's for your own good.
Will this be true if using samba via a linux server?
(2017-08-19, 23:56)nickr Wrote: [ -> ]Will this be true if using samba via a linux server?

It depends how the Samba server is configured, but yes it is still possible to access a Samba4 server using a Windows or Samba4 libsmbclient (ie. Kodi) without a username/password - for instance, the LibreELEC Samba4 server can be accessed without a username/password. So this isn't necessarily a Samba4 issue, it's a Microsoft Windows "server-side" issue.

As mentioned in the link I posted there is a registry hack to work around/reverse the Microsoft anonymous authentication changes (though I've never tried it myself). However, since the registry hack is not recommend by Microsoft - and the solution for Kodi is pretty simple - re-enabling anonymous access is not something I'd recommend either.

Note that it is possible to enable username/password authentication for the LibreELEC Samba server - this is currently disabled by default but really is something users should consider configuring. We haven't yet chosen to enable authentication by default but it's something we'll review in future (just as soon as some other issues have been addressed, such as the fixed/default/well known root password etc.). Adding an option to disable SMB1 support in the LE Samba server might also be something we consider in future, although most of the recent SMB exploits have been against the Windows implementation of SMB1 and not Samba.
Thanks Millhouse.