Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jul 2005 17:39:35 +0800
From:      Xu Qiang <Qiang.Xu@fujixerox.com>
To:        =?iso-8859-1?B?SvZyZyBSZWlzZW53ZWJlcg==?= <me@reusel.de>, Xu Qiang <Qiang.Xu@fujixerox.com>
Cc:        freebsd-questions@freebsd.org
Subject:   RE: groupadd/useradd in FreeBSD?
Message-ID:  <20050728093613.5318F1D92E@imss.sgp.fujixerox.com>

next in thread | raw e-mail | index | archive | help
J=F6rg Reisenweber wrote:
> =

> pw groupadd mysql ; pw useradd mysql -g mysql

Thanks for providing the correct usage of "pw useradd". =


At first sight, I thought your "pw useradd mysql -g mysql" is a typo, which=
 misplaced the first "mysql" and "-g" option, so I used "pw useradd -g mysq=
l mysql", but got an error saying "pw: user name or id required"

Then I "man pw", and found the usage of (pw) user add is a little different=
 from the standard ones: =

pw [-V etcdir] useradd [name|uid] [-C config] [-q] [-n name] [-u uid]
   [-c comment] [-d dir] [-e date] [-p date] [-g group] [-G grouplist]
   [-m] [-k dir] [-w method] [-s shell] [-o] [-L class] [-h fd | -H fd]
   [-N] [-P] [-Y]

In FreeBSD, it should be "pw useradd username -g groupname", and not "pw us=
eradd -g groupname username". =


Last but not least, thanks for everyone who helped me in this thread. =


Regards,
Xu Qiang





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050728093613.5318F1D92E>