Reopening a closed PR... bin/63160

Oliver Fromme olli at
Thu Nov 3 06:16:59 PST 2005

Thordur I. Bjornsson <thib at> wrote:
 > I'm not sure how you reopen a PR or if you are supposed to send a new PR

You can open a new PR, or ask someone (preferably the
person who closed it) to re-open it -- _if_ you have a
convincing reason to do so.

 > Here goes,
 > I'm not able to chown a dir/file what-have-you with the user nobody
 > e.g
 > [thib at caulfield ~]$ chown nobody foo
 > chown: nobody: Invalid argument

That happens when the user doesn't exist.  chown(8) first
tries to resolve the user via getpwnam(3).  That _should_
succeed for user "nobody".  But if it fails, chown tries
to convert it as a numerical UID via strtoul(3), which
fails with EINVAL if no conversion could be done (i.e. if
it's not a valid number).  This is clearly documented in
the strtoul(8) manpage.

Arguably, the chown(8) manpage should contain a note that
the "invalid argument" error message indicates that the
user (or group) does not exist.  Or, preferably, chown
should be fixed to print a more helpful error message in
that case.  You might consider opening a new PR on this.

 > [thib at caulfield ~]$ fgrep nobody /etc/passwd 
 > nobody:*:65534:65534:Unprivileged user:/nonexistent:/usr/sbin/nologin

Note that /etc/passwd is irrelevant.  Do you have a valid
"nobody" user in master.passwd, _and_ are your pwd.db and
spwd.db files up to date?  To be sure, use this command:

# pwd_mkdb -p /etc/master.passwd

With the option "-C" pwd_mkdb will check the syntax of the
master.passwd file.  See the manual page for details.
Also note that other authentication mechanisms can come
into play here, e.g. when you're using NIS etc.

I also wonder what other programs do when you try to use
nobody.  For example, what's the output from the command
"ps -U nobody" (upper-case -U) on your machine?

Best regards

Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD:
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"To this day, many C programmers believe that 'strong typing'
just means pounding extra hard on the keyboard."
        -- Peter van der Linden

More information about the freebsd-bugs mailing list