Chuck Peters on 7 May 2013 14:56:24 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Moving user accounts

On Tue, May 7, 2013 at 4:58 PM, JP Vossen <> wrote:
That said, I'd probably do something like:

tar czf /tmp/data.tgz /etc/passwd /etc/shadow /home
scp /tmp/data.tgz root@newmachine:/tmp

cd tmp
mkdir data && cd $_
tar xzf /tmp/data.tgz
mv home/* /home

You could just rsync the home directory if you setup a ssh server and root ssh authorization keys temporarily.

Then manually merge user data:
        /tmp/data/etc/passwd --> /etc/passwd
        /tmp/data/etc/shadow --> /etc/shadow

I'd personally use the awesome 'meld' GUI diff/merge tool, but you can use 'vi' or whatever you are comfortable with too.

Don't forget the group files /etc/group and /etc/gshadow.  The default adduser in Ubuntu/Debian create a group for each user, and usually the uid and gid numbers match.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --