From owner-freebsd-bugs@FreeBSD.ORG Thu Nov 3 14:16:59 2005 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.ORG Delivered-To: freebsd-bugs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7748A16A41F for ; Thu, 3 Nov 2005 14:16:59 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id B320E43D5C for ; Thu, 3 Nov 2005 14:16:58 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (crytyt@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.1/8.13.1) with ESMTP id jA3EGqDh006368; Thu, 3 Nov 2005 15:16:53 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.1/8.13.1/Submit) id jA3EGqgp006367; Thu, 3 Nov 2005 15:16:52 +0100 (CET) (envelope-from olli) Date: Thu, 3 Nov 2005 15:16:52 +0100 (CET) Message-Id: <200511031416.jA3EGqgp006367@lurza.secnetix.de> From: Oliver Fromme To: freebsd-bugs@FreeBSD.ORG, thib@mi.is In-Reply-To: <20051103003132.64eca4f7.thib@mi.is> X-Newsgroups: list.freebsd-bugs User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-RELEASE (i386)) Cc: Subject: Re: Reopening a closed PR... bin/63160 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-bugs@FreeBSD.ORG, thib@mi.is List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 14:16:59 -0000 Thordur I. Bjornsson 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@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@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 -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd 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