How to share media drive ONLY over Samba?

  • I'm using the latest LibreELEC on a Raspberry Pi 4 for my media center. I have a USB hard drive attached to the Pi, and I've enabled the Samba server so that other Kodi instances on my local network can access the media easily. It works great (really, GREAT...superb work on this!). But I notice that lots of directories are exposed -- I would like to ONLY share the external hard drive containing the media. Is there a way I can change the Samba configuration to do this? I'm not at all conversant with the details of Samba settings.

    Edited once, last by donutlover ().

  • Code
    cp /storage/.config/samba.conf.sample /storage/.config/samba.conf

    ^ edit the list of shares and reboot to effect the change

  • Thanks for the response! As I mentioned, I'm something of a Samba simp, so I don't REALLY know what I'm doing with regards to editing a Samba config file. I copied the file as you suggested, and took the easiest route available to me: I commented out the list of shares (would it be better to just change the "available" fields to "no"?), and that eliminated of all but two folders: my media drive (which I want), and a folder called "Boot OS X", (which I don't want). A bit of research suggests that the latter folder is a partition on my external drive that OS X managed to sneak on there somehow (the drive is formatted as ext4, BTW). There's nothing of any interest there, but I'd still like to exclude that from the list of shares. Unfortunately neither of the two were in the list to begin with, so I'm at a bit of a loss at how to block them. Any idea of how I can keep the "Boot OS X" partition from showing up?

  • Two options:

    a) Disable the "auto-share removable media" option in LE settings and then manually add a config section to the samba.conf for the drive/share.

    b) Format the drive so the OSX parition isn't present, then we won't auto-mount it.