access windows shares

  • LibreELEC 8.0
    When trying to access windows shares, it just shows timeout.
    my opensuse install acted same way until i add 'wins mdns' and make sure winbind is installed. I added file ~/.config/nsswitch.conf with these lines added but libreelec still cannot see the shares.

    is there something else I have to do for libreelec to see windows shares?

    Edited once, last by skittle (March 19, 2017 at 11:54 PM).

  • You are making an incorrect assumption that any conf file placed in /storage/.config overwrites the equivalent in /etc. This only works for a very limited set of files and nsswitch.conf is not one of them. Make sure Kodi has been configured with the name of your workgroup and WINS server.

  • Not sure where you would configure the WINS server in kodi... I don't understand windows networking I know it is too complicated of a mess.

    All i know is that both kodi and my PC can connect to my windows 8.1 network shares via IP but only the PC can connect to SMB shares with the wins name. after adding 'wins' to the nsswitch.conf ie:

    Code
    hosts:          files wins mdns [NOTFOUND=return] resolve [!UNAVAIL=return]  dns
    networks:       files dns

    connecting via IP is ok but less than ideal on home networks with dhcp.

    Edited once, last by skittle (March 26, 2017 at 10:25 PM).

  • The primary reason for using a WINS server is if you want to access computers located on different subnets via NETBIOS names. On a flat home network it's not needed. The way Windows browsing works is there's an automatic "election" process where one computer is selected to be a local master browser for each workgroup name. If that machine gets shut off using NETBIOS names could be troublesome until a new master browser has been elected.

    Make sure that all your computers are using the same workgroup name and you should be fine. If your HTPC running LE is always on it might be a good idea to force it to be a local master browser (see the samba.conf.sample in /storage/.config).

  • My HTPC is not always on, but the windows computer where everything is stored is always on.
    pretty vanilla windows 8.1 pro with workgroup is just default WORKGROUP

    on my opensuse pc I just add 'wins' and it magically starts to work.

    Edited once, last by skittle (March 26, 2017 at 10:31 PM).

  • Microsoft stopped Workgroup support in Windows 10. What is the current solution to the Windows name resolve issue? It doesn't seem to be working out of the box.

  • The primary reason for using a WINS server is if you want to access computers located on different subnets via NETBIOS names. On a flat home network it's not needed. The way Windows browsing works is there's an automatic "election" process where one computer is selected to be a local master browser for each workgroup name. If that machine gets shut off using NETBIOS names could be troublesome until a new master browser has been elected.

    Make sure that all your computers are using the same workgroup name and you should be fine. If your HTPC running LE is always on it might be a good idea to force it to be a local master browser (see the samba.conf.sample in /storage/.config).

    It took me a while to figure this one out. All my computers are now Windows 10 except for a file server running Windows 2008 Server. All my Libreelec devices no longer appeared in the network and my Network receiver could no longer browse the my home network. Then one day they suddenly reappeared. After a lengthy investigation I finally discovered that my Libreelec device which I had left on for an extended period of time had become the Master Browser for the network. It appears that when a Windows 10 computer becomes the Master Browser it's only using WSD. All the SMB shares are not seen. Understanding this I made the Windows 2008 Server fileserver the Master Browser. Now everything appears in the network again.

  • It took me a while to figure this one out. All my computers are now Windows 10 except for a file server running Windows 2008 Server. All my Libreelec devices no longer appeared in the network and my Network receiver could no longer browse the my home network. Then one day they suddenly reappeared. After a lengthy investigation I finally discovered that my Libreelec device which I had left on for an extended period of time had become the Master Browser for the network. It appears that when a Windows 10 computer becomes the Master Browser it's only using WSD. All the SMB shares are not seen. Understanding this I made the Windows 2008 Server fileserver the Master Browser. Now everything appears in the network again.

    Unfortunately I have only Windows 10 machines on the network. This HTPC would be the only exception as I happened to buy a weird motherboard which has very limited Win 10 support. After struggling with it for a few weeks I've decided to give Linux a try - and so far it works flawlessly apart from this issue with the host names.

  • Microsoft stopped Workgroup support in Windows 10. What is the current solution to the Windows name resolve issue? It doesn't seem to be working out of the box.

    /storage/.config/hosts.conf .. which is applied to /etc/hosts on boot?

    Browsing is gone and needs Kodi to think about adding support for ONVIF etc. but that will probably not happen until a more general refactoring of Kodi SMB support takes place. It's stinky fragile code so there's a long-running shortage of volunteers to touch it.

  • Well despite the Master Browser solution making all devices visible on the network again, network discovery from the Libreelec end remains broken. Browsing the Windows SMB network still yields a blank. I can create network resources on the Libreelec devices using IP or NetBios names so the names are being resolved.

    So what is actually broken with browsing from Kodi? My Master Browser is now on a Windows Server 2008 and it is displaying all devices discovered by WSD and NetBios. My Onkyo Network Receiver which I suspect is running on some kind of Linux is able to browse the network once again. Before this Network Discovery was a blank.

  • Support for "SMB browsing" only exists in the SMB1 (NT1) protocol which is now deprecated almost everywhere due to the huge number of security issues it contains. There is no native support for browsing in SMB2 or higher, it's not part of the protocol, you have to use an entirely new discovery protocol (ONVIF). "under the hood" Kodi uses the Samba smbclient which does not include ONVIF support, so once you start using SMB2 or SMB3 (the default in Kodi v17 and up and all current versions of Windows) there is no support for browsing. If browsing is essential, i.e. you're not capable of learning an alternative way of doing things, you must downgrade all your 'server' devices to SMB1 and then force both min/max SMB protocol support in the Kodi SMB client to SMB1. Then everything speaks SMB1 which supports browsing. If you choose the sensible option and keep your devices on SMB2 you just need to configure things properly (once, in sources.xml) and that should be it. As a rule anything you serve media from should be on a static address (via DHCP reservation in the router is easiest) and then you can configure sources using an IP or a hostname. As long as something on the network is a master browser the names should resolve. At least, that's my personal experience. I set sources.xml once ~8 years ago pointing at a device called MEDIABOX and haven't changed it since (the box has changed, but the share names remained the same, so no reason to change clients).

  • Thanks for your reply. I did try downgrading to SMBv1 but it still didn't work. After reading your post I realized that you have to change it under Service/SMB Client. I had changed it under Libreelec/Samba.