I just installed Solaris 10 on a new SPARC server, now I need to migrate the userids and groups over. The optimal way to migrate the userids while retaining their password is to simply copy three files from the Solaris 9 server over to the new Solaris 10. The three files are /etc/passwd, /etc/shadow, and /etc/group. Before you do that make a backup of the original files on the new server, you may need them to reverse the effect. Make sure to change the ownership of the files after you have copied them, the owner should be root and the group is sys.
Make copies of the original files first.
pwd
/etc# cp passwd passwd.original.lina
# ls -l pass*
-rw-r–r– 1 root sys 672 Sep 3 14:22 passwd
-rw-r–r– 1 root root 672 Dec 23 14:53 passwd.original.lina
# chown root:sys passwd.original.lina
# ls -l passw*
-rw-r–r– 1 root sys 672 Sep 3 14:22 passwd
-rw-r–r– 1 root sys 672 Dec 23 14:53 passwd.original.lina
# cp shadow shadow.original.lina# chown root:sys shadow.original.lina
# cp group group.original.lina
# ls -l group*
-rw-r–r– 1 root sys 289 Sep 3 14:22 group
-rw-r–r– 1 root root 289 Dec 23 14:56 group.original.lina
# chown root:sys group.original.lina
#
Copy the 3 files from fameserver2 to the new server:
/etc/passwd, /etc/shadow, and /etc/group.
The easiest way to copy the files from a remote server is to use ftp. Change to the destination directory before you issue the ftp command. When copying files via ftp the destination is the directory where you run the ftp command from.
For example:
# cd /etc
# ftp remote.server.com
ftp> get /etc/passwd
ftp> bye
Here is a brief description of the three files.
passwd contains the usedids and path for their home directory
shadow contains the encrypted password
group contains the groups
1 comment for “How to migrate users and groups from Solaris 9 to 10?”