Chown: can't change owner of files.
gerard at linuxfromscratch.org
Thu Dec 28 12:39:35 PST 2000
On December 28, 2000 03:06 pm, Andy Peeters wrote:
> Sergey Ostrovsky wrote:
> > What doesn't work in particular, I mean
> > which commands return what ?
> > Sergey Ostrovsky.
> I run the MAKEDEV script to create all the device files for my LFS system.
> After every created device file the script runs chown to set the owner of
> the device. And that's where it goes wrong. Chown always return something
> like this:
> 'chown: root.kmem: invalid user'.
> The weird thing is that the group (with all the required groups of course)
> file and the passwd file exist in the /etc directory.
> So the device file are created but without any owner.
It happens sometimes when Glibc isn't able to find the passwd and group
files. Glibc does not just look for the files /etc/passwd and /etc/group. It
asks the libnss library (part of glibc) to access the password database. Your
problems can stem from the fact that LibNSS doesn't know where to find that
Solution 1) Create the $LFS/etc/nsswitch.conf file, later in chapter 6 is an
But that often won't fix it (because if nsswitch.conf is missing or corrupt
libnss defaults to certain defaults which happen to be the same defaults as
found in the file in chapter 6).
Solution 2) copy the libnss files from your starting distribution to $LFS/lib
(as suggested in chapter 5 when you install Glibc). Even if starting
distribution uses glibc-2.1.3 as well just do it. Perhaps your starting
distro uses something older or newer than 2.1.3, which can cause these
Yes, even a statically linked program still depends on the dynamic libnss
libarary for certain operations.
-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
More information about the lfs-dev