groupadd -g 1001 foo
useradd -u 1001 -g foo -G wheel,floppy,audio,cdrom,dialout,cdrw foo
This is the best way if you want to boot back and forth between OS
versions, you have files with unexpected owners inside the home
directories, or you have programs that refer to users by UID rather than
name.
Alternatively, you can just go with the new UIDs and switch the existing
home directories with "chown -R USER.GROUP /home/USER". (Note that chown
is going through a syntax change from "USER.GROUP" to "USER:GROUP"; you'll
have to see which syntax your version supports.)
(!) [Ben] Being the tool-using critter that I am, things like this (the
word "manually", specifically) bring a shudder to the spine and a script
to mind.
while read user x uid gid foo
do
adduser --uid $uid --gid $gid $user
done < /mnt/hda/etc/passwd
I suppose you could always put in a line that says
((uid+=1000))
right below the 'do'.
(!) [Thomas] This presupposes that the users were added with "adduser" to
begin with (note that UIDs from 1000+ are indicative of this). But on some
systems, UIDs > 499 are used as a valid starting place for normal user
IDs.
(!) [Ben] I was walking past a haberdashery and happened to see a nice hat
in the window, so I extracted a '1000' from it. };> The number would have
to come from examining the password file on the current system and
adapting the existing number range to what is available - obviously,
there's no single 'right' answer. Sorry I didn't make that more explicit.
Oh, and the '' in the '/mnt/hda' isn't the explicit version either.
:)
(?) What does the Answer Gang recommend, update or clean installation?
(!) [Thomas] An update.
(!) [Neil] As you've noted a clean install requires you to set the whole
system up again, whereas a good update should be seamless. Again as you
note, there may be circumstances where the update leaves the seams
showing. A clean install will normally leave you with a nice consistent
system, with any cruft that was in your configuration cleaned out and
everything shiny and sparkly.
Obviously, if you're changing distributions, rather than just changing
versions of the same distribution then a clean install is the way to go.
Personally I incline towards doing a clean install every so often. If
you're only taking every 3rd release or so, then a clean install may be
worth the effort, but if you're putting every release on, then I would
alternate upgrades and clean installs, or even keep the clean installs to
every 3rd release.
In practice, I tend to have a number of old releases lying around in
separate partitions, so I wipe an old partition and install there, then
when I'm happy I've got it set up the way I like it, I copy /home across
and change my default boot. This means I also have a number of old copies
of my home directory left lying around.
(?) b) managing /home etc.
I have read recommendations about distributing the various directories but
assume that they only apply to environments with different physical drives
(load-balancing). In this specific installation there is only one hard drive
(at a time) involved.
(!) [Thomas] This "load balancing" concept is a marketing myth, a
band-wagon of terminology that's thrown around the place which people
latch on to.
(!) [Neil] Generally, I think it's about reliability more than load
balancing. The point being that if some eejit fills up one partition, e.g.
/home, with junk, there's still space in the other partitions, e.g. /var
and /tmp, for the system to go on about it's business until the problem is
rectified. If it's all in one big partition the the whole system is likely
to fail.
In practice that's more applicable to big IT departments than simple home
systems. At home I install everything in one big partition. It keeps
things simple and I've had no problems with reliability, but I wouldn't
recommend it for my work systems.
(?) How can one best deal with update or install in order to avoid having to
back up /home, waste the drive, install the software and then restore /home?
(!) [Thomas] (see above about partitions and installation)
(!) [Mike] For ease of use, put everything in one partition. To guard
against disk I/O errors or stupid admins who don't look before they "rm
-rf", put /boot, /home/ and /usr on separate partitions, make /boot and
/usr readonly, and don't mount /boot by default. The reason is that if a
=3= |