Samba in a Container on LE ??

  • Hi,

    I make heavy use of my LE box beside TV, Netflix, Video and Music also as a media-server for all other devices in the house. I have huge HDD capacity and so I think how I can use it also as a backup server for the computers. I have already created a script that switches Samba between read-only and read-write, because we know that it is not a good idea to give continuous write permissions for computers to their backup. But this is not very handy....

    So I saw that it is possible to have samba or Apple afp (timemachine) in a container. My 1st test was not so easy, I deactivated samba in LE and tried to generate users in a samba-container. So the question arises in my mind, if it is possible to run a container on a single User system, that uses more than one user to manage different shares? Does LE support the "adduser" etc. commands that are necessary to maintain different users and their access rights in samba?? Password db file etc.?

    Can anybody confirm or has experience ?

    Thanks,

    /BJ

  • Our packaging for Samba (where files live) is a little different to conventional distributions but we provide /usr/bin/smbpasswd so you can create and maintain a Samba credential file somewhere on /storage that's referenced from samba.conf. There shouldn't be any functional need to run Samba in a container at all if you use the right configuration. NB: You're straying firmly off the trodden path from an LE use-case perspective and should not expect detailed support for things like TimeMachine backups, but our Samba is just Samba and such things should be possible.

  • Hmmm. I know your position very well about what LE should do and what not. And looking for LE as a "firmware" I love it because it just works out of the box, and that is the reason why I am not enthusiastic to do everything on a plain linux installation with days of configuration and updates. You really do an excellent job ! But there is only one more thing........: beeing able to use an additional user with readonly rights while root/libreelec (OMG? my family doesn't read this ;)) has full access.

    I will do some test....

    Thanks,

    /BJ

    Edited once, last by berniejonnie (April 19, 2019 at 12:34 PM).

  • Well, I reached the point where I can have guests with readonly and can log into samba with root account and r/w access. That was not so difficult. But am I right that LE has no adduser command so I can only use smbpasswd for users that are already in the System (shadow db) ?

    So I guess that using samba in a container would not change that, if it dos not bring with it adduser (unlikely)?

  • That's an easy answer, yes, you'r absolutely right ! :)

    But I don't want to start with a plain Linux in a container and do everything from scratch (see my post #3). So I have to see if I get along with guest and root or if I wanna test an existing samba container.