Re: Error when adding user with multiple groups with bsdconfig

From: Tom Evans <tevans.uk_at_googlemail.com>
Date: Sun, 9 Mar 2014 23:43:00 +0000
On Fri, Jan 10, 2014 at 12:37 AM, Lundberg, Johannes
<johannes_at_brilliantservice.co.jp> wrote:
> Hi
>
> I'm on 11-CURRENT amd64. I wanted to add a user using "bsdconfig" but got
> an error when adding to several groups.
>
> Error message:
> ERROR!: pw
> pw: group `wheel daemon operator dialer network` does not exist.
>
> Creating a user who is only added to one group (for example wheel) works
> fine.
>
> I have submitted a PR.

What command line did you use? A user can only have one primary group
(-g), but can be in multiple groups (-G).

     -g group      Set the account's primary group to the given group.  group
           may be defined by either its name or group number.

     -G grouplist  Set additional group memberships for an account.  grouplist
           is a comma, space or tab-separated list of group names or
           group numbers.  The user's name is added to the group lists
           in /etc/group, and removed from any groups not specified in
           grouplist.  Note: a user should not be added to their pri‐
           mary group with grouplist.  Also, group membership changes
           do not take effect for current user login sessions, requir‐
           ing the user to reconnect to be affected by the changes.

Cheers

Tom
Received on Sun Mar 09 2014 - 22:43:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:47 UTC