groupadd/useradd in FreeBSD?
Xu Qiang
Qiang.Xu at fujixerox.com
Thu Jul 28 09:37:00 GMT 2005
Jörg 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 mysql 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 useradd -g groupname username".
Last but not least, thanks for everyone who helped me in this thread.
Regards,
Xu Qiang
More information about the freebsd-questions
mailing list