Samba and non root user

  • I know that libreelec comes with a single user "root" but I would like to know if is possible to create something like a fake user.

    I have syncthing running as docker container and on run it specifies the user 10 and the group 10. In the docs it's advised to run syncthing with a non root-user. So the files created from syncthing have the 10:10 as user group. This user does not exist in the /etc/passwd as it's not writable.

    In samba.conf there's a possibility to specify the owner of the file created with

    force user = 10

    force group = 10

    This would theoretically create a user with 10:10. But when I try to browse the samba shares I receiver "The specified user does not exist". The problem is that without that settings, samba write a file that is owned by root so syncthing cannot delete/rename it.

    Is there a user between root and nobody that I can use instead? Or is is possible to create a new temporary user after boot without the need of changing the /etc/passwd?

  • A year ago I had the same problem and my solution was to use 'root' in syncthing. Regarding 'samba' I did not see any possibility to use more users and I configured hidden directories in '/storage/.config/samba.conf', later when I met the docker container drakkan / sftpgo (server SSH / SFTP / FTP / WebDAB) I definitely stopped using samba.

    My 'syncthing' install SSH command is:

    My 'sftpgo' install SSH command is:

    but you will have to find the usage and setup instructions at hub.docker.com and at http://github.com/drakkan/sftpgo.