Bug 27369 - adduser -g staff doesn't change /etc/group is group 'staff' exists
Summary: adduser -g staff doesn't change /etc/group is group 'staff' exists
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: David Lawrence
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2001-02-13 08:06 UTC by Pekka Savola
Modified: 2007-03-27 03:40 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description Pekka Savola 2001-02-13 08:06:35 UTC
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 19:02:04 UTC
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 22:20:56 UTC
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.