On Thu, Dec 14, 2000 at 02:06:26PM -0800, B. Dragoo wrote: > > My main issue is getting user accounts over. It would > be very easy to copy the lines from my passwd, shadow, > and group files over to the potato box, but I'm > concerned about the fact that RH begins uids with 500, > while Debian begins with 1000. If I copied accounts > directly from passwd file to passwd file, I'd end up > with a bunch of Debian users with uids between 500 and > 700. I've already tested this with several user > accounts, and it seemed to work fine; I'm just worried > about things breaking down the road. > > My questions, then, are these: is there anything > about this situation that will make Debian break? Are > there debianized packages that rely on having normal > (i.e., non-system user) uids above 1000? Is there > anything > else about the migration of users that I need to be > worried about? I want this to be a very smooth > transition that takes place at 3am some night; > ideally, the less attentive users won't even know that > the change has taken place.
uid's 100 - 999 are reserved for the packaging system/daemons etc.
you won't likely have a problem but it would be better to migrate to
debian policy anyway.
you can just write a small awk script to take the accounts from your
redhat system (delete all of redhat's system accounts/groups before
running it) to create all the users with proper UIDs on debian, just a
quick not thought out script:
for i in `awk -F: rhpwd '{print $1}'`
do adduser --no-create-home --gecos "$(grep ^$i rhpwd | awk -F: '{print
$5}')" \
--home "$(grep ^$i rhpwd | awk -F:'{print $6}')" $i ; \
chsh -s "$(grep ^$i | awk -F: '{print $7}')" $i
done
another method would be to use sed to change the uid/gid.
if you extract the home directories after creating the new user
accounts they should get the new ownership properly as GNU tar is
fairly smart about this sort of thing.
--
Ethan Benson
http://www.alaska.net/~erbenson/
pgpJOSL1gCZuT.pgp
Description: PGP signature

