Bug 130287 - usermod will not add NIS users to locally defined groups in /etc/group
Summary: usermod will not add NIS users to locally defined groups in /etc/group
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: shadow-utils
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2004-08-18 20:24 UTC by Eric Paris
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2005-04-11 09:10:19 UTC

Attachments (Terms of Use)

Description Eric Paris 2004-08-18 20:24:08 UTC
Description of problem:
We wish to be able to use usermod to add a NIS user to a group defined
locally on a single machine in the /etc/group file.  Currently usermod
just returns an error because the user is not defined in /etc/passwd.
 This works just fine if the /etc/group file is edited by hand to
include the nis user.  Its just the usermod tool that refused to
create the entry.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.create a nis user: nis_user
2.create a local group: local_group
3.run "usermod -G local_group nis_user"

Actual Results:  User is not added to the local group.  Usermod
returns with the error

usermod: nis_user not found in /etc/passwd

Expected Results:  I would expect a line such as 
to appear in the /etc/group file

Additional info:

Comment 3 Peter Vrabec 2005-04-11 09:08:50 UTC
You must make any changes involving NIS on the NIS server
(man usermod)

U can use "gpasswd -a nis_user local_group" instead of "usermod -G local_group

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