Red Hat Bugzilla – Bug 154651
system-config-user does not work correctly with NIS accounts in compat mode.
Last modified: 2007-11-30 17:11:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1
Description of problem:
I use NIS in compat mode, i. e. my "nsswitch.conf" file contains the following lines:
# --- nsswitch.conf ---
passwd: compat nis
shadow: compat nis
group: compat nis
Here is my "passwd" file:
# --- /etc/passwd ---
Pay attention to plus sign before "lev" -- it means that all missed entries should be taken from NIS.
Here is my group file:
# --- /etc/group ---
Note, that "users" is *not* a NIS group, it is a local one.
I added "lev" user to "users" group using "system-config-users" tool ("Groups" tab -> double-click on "users" group -> click on "Group Users" tab, ), it shows me a list of users, and this list includes "+user" at the top. (It is not a bug yet.) Ok, I clicked on the radiobutton in front of "+lev", pressed "Ok" button, and exited "system-config-users". Here is my "group" file after adding a member to "users" group:
# --- /etc/group ---
It *is* a bug. To let "lev" user to be a member of "users" gropu, his account name should be listed in "users" record *without* plus sign.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Add "+lev:::::/home/lev:" line to "/etc/passwd" file.
2. Start "system-config-users".
3. Create a local group, e. g. "dummy".
4. Add "+lev" user to "dummy" group.
5. Exit "system-config=users".
Actual Results: Take a look into "/etc/group" file, it contains "dummy:x:<some_number>:+lev". "+" in front of "lev" is a bug.
Expected Results: "group" file contains "dummy:x:<some_number>:lev" line (no "+" in fron of "lev").
"+" sign should not appear in "/etc/group" file. However, it is not clear whether it should appear in user interface (in the list of users). Plus in user interface is not so bad -- it distinguish NIS users from local ones. However, if this difference is expressed with another way (e. g. with icon, different font color, etc.), plus may be removed.
s-c-users uses libuser for the "low level" work, ressigning to libuser.
libuser-0.53.5-1, which will appear in rawhide soon, ignores the nss_compat
lines completely. This allows editing local users and groups, but doesn't
allow e.g. adding a NIS user to a local group.
I don't think we can support nss_compat better; the "local overrides" model
is not well supported by the libuser interface and s-c-users interface would
also have to support an "unchanged" state for each widget.