Changing UID/GIDs

Clint Savage herlo1 at gmail.com
Tue May 15 17:59:34 MDT 2007


On 5/15/07, Charles Curley <charlescurley at charlescurley.com> wrote:
>
> Being unhappy with Fedora, I thought I'd try Ubuntu. I now have a
> systewm that dual boots with Fedora Core 6 and Ubuntu Feisty Fawn
> (7.04). I would like to use the same /home partition for each
> installation.


What makes you unhappy about Fedora?  Is the User Private Group (UPG)
scheme?

The (first) problem I have hit is that Fedora creates users with UIDs
> and GIDs starting at 500, where Ubuntu starts at 1000. I've already
> found out that Ubuntu does not like regular accounts with UIDs or GIDs
> less than 1000.


You can change the UID_MIN and GID_MIN values in /etc/login.defs in Fedora
to be any value you like.

I can change the UIDs of files with "chown -R --from=500 1000" and
> similarly for GIDs. I can delete and recreate the account.


Create a user with:

groupadd -g 1001 groupname
useradd -g groupname -u 1001 username
passwd username

And that will accomplish the same thing before you even create the account.


> What other little beartraps are there waiting for me? Or is there a
> better way to do this.


Yes, there's a better way, as I described above.  For the most part, that
will work on both Ubuntu and Fedora AFAIK.

Cheers,

Clint


More information about the PLUG mailing list