Moving users from Debian (using an existing /home)

Bill Moseley moseley at hank.org
Sun Dec 2 15:16:44 UTC 2007


I have a Debian Sid machine and considering installing Gutsy
on it.  Probably Xubuntu since I'll likely not use Gnome (I currently
use Icewm on that machine).

I have a few spare drives around so I'm planning throwing one of those
in as a secondary drive and install to that.  I'd like to use the
existing /home on the old drive.

My question is about how to map the UIDs from the old users to the
new install.  Does the installation process provide for this?

How should I add the users that are in /home on the old drive?

- Should I create the users in the new OS and then hack the
/etc/passwd entries so their UIDs and home dir match
what was in Debian?

- Or should I create the new users and then chown -R their home
directory?

- Or just do a normal install and copy their entries to /etc/passwd
and /etc/shadow?

I realize I'll need to deal with their groups, too.

Any other suggestions for migrating?  I'll set up for dual boot (which
I assume the installer will do anyway) -- not that I see any real
reason to dual boot.




Debian disk currently looks like:

$ sudo fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         608     4883728+  83  Linux
/dev/hda2             609         670      498015   82  Linux swap / Solaris
/dev/hda3             671        9729    72766417+   5  Extended
/dev/hda5             671         913     1951866   83  Linux
/dev/hda6             914        2129     9767488+  83  Linux
/dev/hda7            2130        2737     4883728+  83  Linux
/dev/hda8            2738        3953     9767488+  83  Linux
/dev/hda9            3954        9729    46395688+  83  Linux



$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             4.7G  292M  4.4G   7% /
tmpfs                 443M     0  443M   0% /lib/init/rw
tmpfs                 443M  4.0K  443M   1% /dev/shm
/dev/hda5             1.9G   17M  1.9G   1% /tmp
/dev/hda6             9.4G  5.7G  3.7G  61% /usr
/dev/hda7             4.7G  2.6G  2.1G  56% /var
/dev/hda8             9.4G  6.8G  2.7G  72% /usr/local
/dev/hda9              45G   38G  6.5G  86% /home


-- 
Bill Moseley
moseley at hank.org





More information about the ubuntu-users mailing list