This is the process I run. There may be better ways...
On the old system, create a copy of the existing /etc/passwd and /etc/shadow files.
From those files, remove all the "SYSTEM" accounts. Also remove any users which will not be migrated to the new system. When you are done, both files should contain the same number of lines.
Using one of those files as a guide, create a tarfile of the affected users' $HOME directories.
Copy that tarfile and the temporary passwd and shadow files to the new box.
Restore the $HOME tarfile. Since these are new users, you shouldn't be over-writing anything. If in doubt, check first.
Append the transferred passwd and shadow files to the existing entries in /etc: (note use of APPEND (>>) syntax!!!!)
I used the "ap" command (Account profile) - it's designed for copying users from one machine to another
On the old system:
# ap -dg > users
(the d option is for creating the file, g tells it to do groups too)
On the new system:
# ap -ro -f users
(r option for restoring the users, o is for overwrite so will alter any existing users to the same profile settings as the old system)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.