Red Hat Bugzilla – Bug 130287
usermod will not add NIS users to locally defined groups in /etc/group
Last modified: 2007-11-30 17:07:03 EST
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):
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
You must make any changes involving NIS on the NIS server
U can use "gpasswd -a nis_user local_group" instead of "usermod -G local_group