User IDs and Group IDs

Tushar Teredesai sukucorp at
Tue Nov 22 14:33:31 PST 2005

On 11/22/05, Gerard Beekmans <gerard at> wrote:
> You work through the CLFS book and you install a service using those
> instructions and that book suggest UID 25 and GID 25.
> Now you move on to BLFS and the BLFS has you install another service.
> But becuase our IDs are out of sync, the BLFS book uses UID 25 and GID
> 25 as well, but not for the same thing you installed with CLFS.

This is exactly the scenario that makes the useradd/groupadd
modifications useful. CLFS would have used the -K options for adding
the users and groups. Hence the UID/GID would have been assigned based
on the available free slot. When the user moves to BLFS and installs a
different service, useradd/groupadd automatically find an unused
UID/GID and create the new user. No clashes. Ever (well unless the
complete range is full of-course).

> Now we have two LFS books that use the same ID for different purposes.

With the scheme I mentioned, they would not be hard coding the UID/GID at all.

Tushar Teredesai
   mailto:tushar at

More information about the lfs-dev mailing list