Password protect specific USB drives

  • I've done a bit of searching both here and Google and haven't really come up with any results that matched my needs. So, to start, I'll list out what I have and what I'm running.

    I recently acquired a Raspberry Pi 4 4Gb so I thought I'd turn it into a super cool little media server. I didn't necessarily want to run LibreELEC, however it fit my needs aptly and has been performing awesomely for a few days now. My main needs were and still are: supply TV/Video/YouTube to my main non-smart TV as well as provide NAS storage options for the whole home. I have the Raspberry Pi 4 velcroed to the back of the TV and an Ethernet cable strung up to it to provide network access. I control the whole thing with a Rii Mini i8 mini touchpad/keyboard. It works fantastic. For added info, this is the build I'm using of LibreELEC.

    I have 3 4Tb external drives hooked up to the thing. I would have more, but I haven't been able to get to the store for a 4 port USB3 hub yet. That's planned for later today. (Being paraplegic can be a chore sometimes) Anyway, when I get that hub, I'd like to also hook up two more external drives. Both of these need to be password protected. In other words, I don't need my kid accessing either of the drives. I know the build of LibreELEC automatically mounts external drives as a SMB share. I just haven't been able to figure out how. I can add passwords to all or nothing in the settings.

    I have two scenarios I'm OK with. First, the drives aren't visible when accessing the Pi 4 through the network but if you know they exist and know the mount point, they're accessible. They still require a password to access them. Second, they're visible but require a password to access them. But I can't even figure out how to hide the drives other than just disabling Samba shares for all drives.

    Is what I am after even achievable?

  • LE mount's USB drives drives by default not SMB.

    1) Do you actually need Kodi? If not then you'd be better off using the RPi4 as a NAS solution. Look for OMV or just google NAS raspberry pi - there are other solutions.

    2) Have you looked at using profiles within Kodi. That might give you the control you want.

    3) A dirty method would be to unmount the drives when Kodi starts, relying on you to mount them when needed.