This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 49609 - usermod/groupmod lack ability to add a user to a group w/o removing from other groups
usermod/groupmod lack ability to add a user to a group w/o removing from othe...
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-21 11:31 EDT by Wayne Pollock
Modified: 2007-04-18 12:34 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-06 04:24:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Wayne Pollock 2001-07-21 11:31:53 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (Win98; U)

Description of problem:
There seems no way to add a user "user" as a member of the group "grp", without removing user
from all other groups.  by editing the /etc/group file directly the user can be added.  But
"usermod -G grp user" will remove user from all other groups.  There is no option for
groupmod command to add a user to a group, a logical place for such an option.

How reproducible:
Always

Steps to Reproduce:
1.usermod -G grp1 user
2.usermod -G grp2 user
	

Additional info:

It is important to be able to script user additions and changes such as group membership.
Comment 1 Louie Hannen 2002-09-12 12:48:08 EDT
In migrating 2000+ users from OS/2 servers to Linux servers, I've run into this
same problem. It makes scripting mass user/group changes more complicated than
it should be in some situations. This feature addition would be well received by
my team.
Comment 2 Peter Vrabec 2005-09-06 04:24:35 EDT
fixed in shadow-utils >= 4.0.12.
$usermod -a -G grp1 user

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