Same users for seperate LXC Containers

danyo2008

New Member
May 12, 2020
2
0
1
44
Hello, everyone,

I am new here in the forum. Hello first.

I have a question. I'd like to know how to create a user management across multiple LXC containers.

Background is, I am using an LXC container, which offers me a SAMBA Service. Now I would like to use another LXC container that provides FTP.
In both containers I have a ZFS Mountpoint mounted from the host. Works fine.
But now I need directory/file permissions for users who shall access the directories. For now, i have created users inside the LXC SAMBA Container. The User can access the directory. Works fine. But i have to create the same users now in the LXC FTP Container with same UID and GUID to grant access to their directories and file.
Is there a way, to solve this in a better manner? I dont want to put both services in one container. Yes i could, but want to seperate the Services..... Or should i put all in one Container....? What is the best practise here? Any suggestions?

Thanks for you answers an have a nice day...
dan
 
hi,

simplest way i can think of would be using LDAP. you can create users and they can access multiple machines with the same credentials.

you'll need to create a VM/CT to host the LDAP server, there are many guides online

hope this helps
 
Hi Oguz,

wow, that was a fast answer.... Thank you very much.... Ok, i will check this out.... Thanks you this suggestion.........

Regards
Dan