Help - Search - Members - Calendar
Full Version: Migrating Users From One Machine To Another
Linuxhelp > Support > Technical Support
delsoto_osu
I need to migrate the users and their passwords from my current mail server (rh7.2) to my new mail server which fill be running fedora. Is there a good way to do this painlessly. I would like to move the mail that the users have as well. Any help would be greatly appreciated.....thanks!!
hughesjr
the files you need to be concerned about to move users and passwords over are:

/etc/passwd
/etc/shadow
/etc/group

BUT it isn't as easy as just copying the old files to the new server ... you will need to edit the new files (on the new server) and add any users that are not already in the new files ... but don't change or add users that exist already in the new files.

SO ... copy the old passwd and shadow files over to the new server ... name them passwd.old and shadow.old

open /etc/passwd on the new server and passwd.old from the old server ...

the user john is in old ... but not new ... so copy the whole line for john from the old to the new file (add it at the bottom of the file) ... do that for all users not currently in new.

Now keep passwd (from the new server) open ... open shadow new and shadow old ... copy the entries for shadow old into shadow new (put them in using the same order that they are in on the new passwd file).

Now for /etc/group ... add all the groups not currently in new from old....

save the three new files /etc/passwd, /etc/shadow, /etc/groups
--------------------------------------
next, copy all the users directories from the old server to the new server (everything in /home old to /home new)

if the mail gets delivered to the home directories, you are done ... if it goes somewhere else, you need to copy those directories over as well...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.