Christoph Maier wrote:
> 
> The gotcha is that ubuntu and Fedora assigned different UID to me,
> (1000 and 500, respectively).  Is it possible (and not too painful to
> bother) to change the UID of an existing user?  Is it better to create
> a group that contains both users #500 and #1000??
> 
> Messing with UIDs looks like one of the things that don't look _too_
> hard, but may be a minefield of side effects...

Here's an idea.

Create a user with a hgh UID, say 5000. No one uses that. During
install, make a different user than your typical. Once you have gotten
into the system, you can create your prefered user, with your prefered
UID (5000) and everythng should Just Work.


For the short term, you can go ahead and change the UID of the existing
users.

# find / -user 500 -print0 | xargs -0 chown 5000
# find / -group 500 -print0 | xargs -0 chgrp 5000

Adjust the favour to suite your exact needs.

find will search for files matching your criteria (in this case, it is
all files owned by the 500 user ID). xargs takes a list of files, and
runs a command with those as arguments. In this case, t will run the
chown command, changing the ownership to the 5000 UID.

Please see the manpages for find(1) and xargs(1) for a more complete
description.

-john

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to