From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 22 21:40:01 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1B91C61 for ; Mon, 22 Oct 2012 21:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id A947A8FC17 for ; Mon, 22 Oct 2012 21:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9MLe1a7098646 for ; Mon, 22 Oct 2012 21:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9MLe1OQ098645; Mon, 22 Oct 2012 21:40:01 GMT (envelope-from gnats) Date: Mon, 22 Oct 2012 21:40:01 GMT Message-Id: <201210222140.q9MLe1OQ098645@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: J B Subject: Re: misc/172965: pw useradd does not allow -g "" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: J B List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 21:40:01 -0000 The following reply was made to PR misc/172965; it has been noted by GNATS. From: J B To: bug-followup@FreeBSD.org, jeff@bovine.net Cc: Subject: Re: misc/172965: pw useradd does not allow -g "" Date: Mon, 22 Oct 2012 23:35:49 +0200 You took it out of context. $ man pw ... The useradd command also has the ability to set new user and group defaults by using the -D option. Instead of adding a new user, pw writes a new set of defaults to its configuration file, /etc/pw.conf. When using the -D option, you must not use either -n name or -u uid or an error will result. Use of -D changes the meaning of several command line switches in the useradd command. These are: -D Set default values in /etc/pw.conf configuration file, or a different named configuration file if the -C config option is used. ... # pw useradd -D -g "" # cat /etc/pw.conf ... # Default group (leave blank for new group per user) defaultgroup = "" ... # pw useradd moo3 # grep -i moo3 /etc/passwd moo3:*:1005:1005:User &:/home/moo3:/bin/sh # pw useradd -D -g "nobody" # cat /etc/pw.conf ... # Default group (leave blank for new group per user) defaultgroup = "nobody" ... # pw useradd moo4 # grep -i moo4 /etc/passwd moo4:*:1006:65534:User &:/home/moo4:/bin/sh jb