Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 27369 - adduser -g staff doesn't change /etc/group is group 'staff' exists
adduser -g staff doesn't change /etc/group is group 'staff' exists
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Eido Inoue
David Lawrence
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2001-02-13 03:06 EST by Pekka Savola
Modified: 2007-03-26 23:40 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-16 18:20:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pekka Savola 2001-02-13 03:06:35 EST
This might be an old feature, but anyway...

adduser -g staff test 

doesn't change /etc/group if the group staff already exists.
The correct way is to add the user is to use:

adduser -g staff -G staff test.

Now, the member list in 'staff' is updated.

But isn't this a bit redundant?  If you specify '-g' you should expect
password to
add it to the group too.
Comment 1 Jonathan Briggs 2001-03-22 14:02:04 EST
A user's primary group (the one in /etc/passwd) should not also be listed in the
group file.  The group file user list is only for listing the secondary groups
of users.
At least, this is how I understand it to work, based on experience with HP-UX,
Solaris and Linux.  I could be wrong.
Comment 2 Eido Inoue 2004-09-16 18:20:56 EDT
The behavior of "-g" is consistent with the documention. Won't change
because this will break too many things.

Note You need to log in before you can comment on or make changes to this bug.