[kwlug-disc] migrating a user/group setup from system to system
Robert P. J. Day
rpjday at crashcourse.ca
Sat Sep 19 06:48:58 EDT 2009
(probably the first in a series of questions this weekend, just to
confirm some things since i want to write this all up after i'm done.)
following up on a few questions i've had so far about doing a debian
migration, i want to ask some undeniably trivial questions over the
next day or two to make sure there are no hidden subtleties in a
number of things i'm trying to do involving moving an existing 32-bit
debian install to a 64-bit system.
first, moving the existing user/group configuration -- what does
that involve? it's not just blindly copying files like /etc/passwd,
/etc/group and so on since, unless you take care to sync the UIDs and
GIDs of software packages, those IDs are most likely not going to
match across the systems.
my strategy is to take the following files:
copy them, *strip* them of everything but their additional
user-oriented info (UIDs >= 1000), and simply append the remaining
info to the corresponding files of the new system. from long
experience, adding that information is all that's necessary to define
new users and their respective groups.
*note* that i'm not talking about also copying home dirs (clearly,
that will be done as well), or adding any accounts to system package
files (such as, say, adding people to /etc/ftpusers or stuff like
that). that's *additional* work that will still be done. all i'm
talking about is the minimal work to officially create those accounts
identically to their current setup and, AFAICT, those four files are
the only files that need to be adjusted to make that happen. does
that sound reasonable?
p.s. oooh, i just found the "newusers" command as well, for bulk
account reproduction. i had no idea it existed on debian. that might
make things even simpler.
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Annoying Kernel Pedantry.
Web page: http://crashcourse.ca
More information about the kwlug-disc_kwlug.org