L
L
linux0id172018-03-08 20:34:25
linux
linux0id17, 2018-03-08 20:34:25

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

4 answer(s)
P
Puma Thailand, 2018-03-09
@opium

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

N
Nikon_NLG, 2018-03-15
@Nikon_NLG

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

S
Saboteur, 2018-03-08
@saboteur_kiev

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.

V
Valentine, 2018-03-17
@ProFfeSsoRr

LDAP was created for this - so that the information about the accounts on all machines is the same.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question