Bug 73375 - redhat-config-users doesn't start
redhat-config-users doesn't start
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-users (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
: 80105 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2002-09-03 13:23 EDT by Joe Orton
Modified: 2008-05-01 11:38 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-25 10:29:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
rh-config-users does not start (51 bytes, text/plain)
2002-12-13 11:25 EST, Leo Vekemans
no flags Details

  None (edit)
Description Joe Orton 2002-09-03 13:23:07 EDT
Description of Problem:
redhat-config-users fails to start, giving a traceback.

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

How Reproducible:
Not sure.  Since entering #73370 I manually deleted a load of entries from
/etc/passwd using vi; now it has stopped working.  I'll attach my current

Backtrace is:

[root@host240 root]# redhat-config-users
Traceback (most recent call last):
  File "/usr/share/redhat-config-users/redhat-config-users.py", line 36, in ?
  File "/usr/share/redhat-config-users/mainWindow.py", line 257, in __init__
  File "/usr/share/redhat-config-users/mainWindow.py", line 422, in refresh
  File "/usr/share/redhat-config-users/mainWindow.py", line 331, in refresh_users
    gidNumber = userEnt.get(libuser.GIDNUMBER)[0]
IndexError: list index out of range
Comment 1 Joe Orton 2002-09-03 13:40:47 EDT
I tried to debug this but got confused. I added:

            print "got user: %s" % userName

            gidNumber = userEnt.get(libuser.GIDNUMBER)[0]

in mainWindow.py, and it gives the backtrace after printing "got user: test"
but I don't have a test user, but this is user I already deleted!

[root@host240 root]# grep test /etc/passwd
[root@host240 root]# grep test /etc/group

is something caching the user IDs?
Comment 2 Brent Fox 2002-09-03 18:07:01 EDT
You probably have user 'test' in /etc/shadow and libuser is getting horribly
confused.  Is this the case?
Comment 3 Joe Orton 2002-09-03 18:43:57 EDT
Ah, yes, indeed. /etc/shadow has an entry for the 'test' user, but not /etc/passwd.
Comment 4 Brent Fox 2002-10-01 11:32:48 EDT
Does that fix the problem?  

If so, I've got a question for you because I've gotten a few reports about this.
 As the user, what would you expect the program to do in this situation?  I can
think of a few possibilities.

1) Automatically delete the orphaned line(s) from /etc/shadow.  I don't like
this because doing things behind the user's back with password files is a little
dodgy.  Also not good because what if the problem is more complicated than an
orphaned line.  What if the user added illegal characters in the file that
breaks the parser?  It's not clear what to do.

2) Pop up a dialog that says that the user database is corrupt and that the
program will exit.  I'm not crazy about this because it doesn't fix the problem
with the user list, but it's almost impossible to figure out in what way the
database is corrupt and fix it reliably.

As of now, I'm leaning towards #2, but what do you think the user would expect
in this situation?
Comment 5 Joe Orton 2002-10-01 11:45:40 EDT
Yes, sorry; removing the orphaned lines from /etc/shadow did fix the problem.

I agree that (1) is definitely not a good solution; I think (2) would be okay.

Maybe the ideal thing to do would be to display entries for the users with
orphaned passwords along with the rest of the users in the main UI; allowing the
admin to correct or remove them as necessary. If these broken users could be
distinguished by greying them out or something, that would be neat.
Comment 6 geydel 2002-11-23 16:16:54 EST
I seem to have the won't start problem. If I try to start redhat-config-users in
terminal I get /usr/share/redhat-config-users/redhat-config-users: line 4: 21883
Segmentation fault     /usr/bin/python2.2
/usr/share/redhat-config-users/redhat-config-users. py
Comment 7 Brent Fox 2002-11-26 10:30:25 EST
geydel, your problem seems unrelated to the original bug report.  The original
poster was seeing a python traceback while you are seeing a segmentation fault.
Comment 8 yuppiedrone 2002-12-04 15:54:13 EST
I experienced the same problem when running redhat-config-users - same 
traceback errors, same line numbers, etc.  The applet worked right out of the 
box after the very first install.  I thought the various errata updates were 
the cause of this problem.

I think I've figured it out, at least why it seems broken on my system.

I've made a _manual_ change to /etc/passwd.  Specifically, I added a "#" in 
front of the 'ftp' user - this to prevent anonymous ftp logins.  Out of a 
hunch, I removed the "#" and restarted the applet.  Voila!

I also tried just deleting the line that contains 'ftp'.  redhat-config-users 
didn't like that.  So, it would seem that this program can not 
parse /etc/passwd properly, or it is trying to associate this file with some 
other file on a line by line basis.
Comment 9 Brent Fox 2002-12-04 20:41:52 EST
yuppiedrone, the problem is probably that you commented out the 'ftp' user in
/etc/passwd but forgot to comment out the 'ftp' line in /etc/shadow.  If you are
using shadow passwords (which most machines do these days), then for each entry
in /etc/passwd, there is a corresponding entry in /etc/shadow.  

As far as I know, libuser (the backend that redhat-config-users uses to parse
the files) assumes that the data in /etc/passwd, /etc/shadow, and /etc/group is
valid.  There are an infinite number of ways to break a parser if you can feed
it random data.  I can try to pop up a dialog telling the user that the file
can't be properly parsed, but trying to fix the file is undesirable, for reasons
that I explain in item #1 from my 2002-10-01 post above.
Comment 10 Milan Kerslager 2002-12-05 01:51:04 EST
The program should not traceback and should show warning window at least.
Traceback is not acceptable in any way.
Comment 11 Brent Fox 2002-12-06 10:44:49 EST
milan: I absolutely agree.
Comment 12 Leo Vekemans 2002-12-13 11:25:49 EST
Created attachment 88692 [details]
rh-config-users does not start

New install RH 8.0 under Gnome does not start config-users from menu .No
warnings or error messages , just some disk activity and then nothing . 
Started from terminal , following error message appears : 
root@LINUX root]# redhat-config-users
> /usr/share/redhat-config-users/redhat-config-users: line 4:  1195
> Segmentation fault   /usr/bin/python2.2
> /usr/share/redhat-config-users/redhat-config-users.
> py
Reinstalling redhat config users with rh network did not solve the problem .
Comment 13 Brent Fox 2002-12-22 11:56:24 EST
*** Bug 80105 has been marked as a duplicate of this bug. ***
Comment 14 Brent Fox 2003-01-07 21:54:32 EST
redhat-config-users-1.1.1-9 in Rawhide should address this problem.  If the user
database cannot be read for some reason, like if /etc/passwd and /etc/shadow are
out of sync, the app pops up a dialog that says "The user database cannot be
read.  Program will exit now."

I wish there were some way to magically repair the database, but that may not be
possible depending on how messed up the files are.  At least this way we notify
the user that something has gone wrong and the program exits gracefully.  Thanks
for your report.  

QA, please verify.

Leo, it looks like you are seeing a problem that is unrelated to this report.
Comment 15 Peter van Egdom 2003-03-11 17:35:46 EST
Tested with "redhat-config-users-1.1.5-5" on Phoebe 8.0.93 :

If "/etc/shadow" contains an (valid) entry that is not in "/etc/passwd",
redhat-config-users will display the message :
"The user database cannot be read.  Program will exit now."

If "/etc/passwd" contains an (valid) entry that is not in "/etc/shadow", 
redhat-config-users will start without error.

If "/etc/passwd" contains an (invalid) entry (for example the string "banana"),
the following error appears:

** (redhat-config-users.py:6163): WARNING **: entry is incorrectly formatted

(redhat-config-users.py:6163): GLib-GObject-CRITICAL **: file gvaluearray.c:
line 42 (g_value_array_get_nth): assertion `value_array != NULL' failed

** ERROR **: file user.c: line 658 (merge_ent_array_duplicates): should not be
/usr/share/redhat-config-users/redhat-config-users: line 4:  6163 Afgebroken   
          /usr/bin/python2.2 /usr/share/redhat-config-users/redhat-config-users.py

If "/etc/shadow" contains an (invalid) entry (for example the string "banana"),
the following error appears:

** (redhat-config-users.py:6173): WARNING **: entry is incorrectly formatted

(redhat-config-users.py:6173): GLib-GObject-CRITICAL **: file gvaluearray.c:
line 42 (g_value_array_get_nth): assertion `value_array != NULL' failed

** ERROR **: file user.c: line 658 (merge_ent_array_duplicates): should not be
/usr/share/redhat-config-users/redhat-config-users: line 4:  6173 Afgebroken   
          /usr/bin/python2.2 /usr/share/redhat-config-users/redhat-config-users.py

Comment 16 Peter van Egdom 2003-04-08 18:02:10 EDT
Described comments in comment #15 still occur with "redhat-config-users-1.1.5-7"
on Red Hat Linux release 9 (Shrike).

Furthermore, if "/etc/passwd" contains a valid entry not in "/etc/group" and
"/etc/shadow", the following errors are returned to the shell:

** (redhat-config-users.py:27552): CRITICAL **: file user.c: line 245
(extract_id): assertion `array != NULL' failed

** (redhat-config-users.py:27552): CRITICAL **: file user.c: line 1100
(lu_dispatch): assertion `ldata != INVALID' failed
Comment 17 Brent Fox 2003-05-25 10:29:30 EDT
There is a stack of 64 bugs that have been in Modified state for a long period
of time.  I am closing these as Rawhide now.  If you find that the issue is not
fixed, please reopen this report.

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