Date: Mon, 22 Oct 2012 21:40:01 GMT From: J B <jb.1234abcd@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/172965: pw useradd does not allow -g "" Message-ID: <201210222140.q9MLe1OQ098645@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/172965; it has been noted by GNATS. From: J B <jb.1234abcd@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210222140.q9MLe1OQ098645>