username to uid resolution when chrooting the first time

Daniel Roethlisberger admin at
Sat Dec 23 07:56:01 PST 2000


well, I ran into problems when setting up a box with current LFS
guidelines. When I chroot into LFS the first time (chapter 6),
the user name to UID resolution doesn't work. ln -l displays
numbers instead of names, and most notably, chown root anyfile
doesn't work (root - unknown user).

I double-checked the $LFS/etc/passwd and group files. They exist
and are 100% identical to those presented in the book.

Now I've ran the id command - and it returned me:
uid=0 gid=0 groups=0,1,2,3,4,6,10
although I only have GIDs up to 8 in $LFS/etc/group.
So I check the installation system (a RedHat 6.2 installed for
the sole purpose of installing LFS), and whoops: id returns the
same GIDs as when ran inside chroot, but with the corresponding
group names.

So somehow, when within the chrooted env, the system is still
somehow remembering the 'old' groups of the underlying install
system instead of looking in $LFS/etc/passwd and group.

You might ask: why do you need user name to uid resolution? The
answer is simple: the MAKEDEV script which should be run first
thing after chrooting the first time is using chown with user
names, not UIDs. So you get hundreds of errors and the device
files aren't created correctly.

Any ideas what happened?

Would changing the underlying RedHat's passwd/group files to
match the $LFS one help? But I fear doing so might have severe
consequences on the RedHat system. Thoughts?


Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list