Answer the question
In order to leave comments, you need to log in
How to add users to make it convenient to transfer files between servers?
Hello,
please tell me how to add users correctly so that when transferring files between servers, the name and group of the owner of the files are saved.
For example, on the first server the user id is 1001, on the other server there may be another user under the same id.
In principle, when creating a user, you can specify his id and start, for example, with 1010, but I think there is some more thoughtful solution, this can be taken into account in configuration management systems, for example, in ansible.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
copy to a new server under the user to which you are copying, it will automatically change the rights to the necessary ones, well, or chown and everything is ok
Set up an LDAP server, and store users there. At the same time authorization on keys in the same place it is possible to store. Look towards ldap and sssd
State - no way. Files are copied with process permissions, and the user cannot create a file with a different owner/group. The only thing that root can change is through chown.
If you share via NFS, or transfer the disk - not the names of users and groups are stored in the files, but their UID / GID - in this case, you can match users by ID on different computers.
It is convenient to create a group that is the same on all servers and add all the necessary users to it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question