How to migrate users from old server to new server
Hello, I want to know that how we can migrate user from old server to new server. But my question is about how we can implement user on new server where user id is same as in old server. i.e. user called joshi whozz UID is 500 in old server and user call Naveen whozz UID is 500 same as joshi in new server. please help me in clear this difficulty
|
You can specify the UID when adding the user using useradd, it's the -u flag.
So in this case, you'll have useradd joshi -u 500 Check out the man pages for useradd for more information. (man useradd or useradd --help) |
Migration of users in old to new server but in new server same UID users are present
Actually, i m migrating the users from old server to new server, but there is already a users whos id is 500, 501, 503 in new server.. and these UIDs are alerady present in old server too.. i cant over write it how can i change UID of the old server users id While migrating the all users in the new server, in one command
|
Quote:
|
If you're migrating the users and their files, you'll need to write a short bash script and run it as root.
It just needs to calc new uid, create user (inc home dir) & copy the files over and change the ownerships to match. Don't forget the gids as well. |
All times are GMT -5. The time now is 05:58 PM. |