Bug 68245 - libuser crashes when shadow passwords are not used
Summary: libuser crashes when shadow passwords are not used
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libuser
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
: 75590 76292 86397 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-08 15:25 UTC by Tom Cross
Modified: 2008-05-01 15:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-21 21:38:01 UTC
Embargoed:


Attachments (Terms of Use)

Description Tom Cross 2002-07-08 15:25:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020606

Description of problem:
Upgrade our Dell 2400 server from 6.2 to 7.3.  I installed the
redhat-config-users package (and python2, pygtk2, etc).  Tried running
'redhat-config-users' and get a segmentation fault.

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


How reproducible:
Always

Steps to Reproduce:
1.telnet to mail server, login as normal user
2.su to root
3.redhat-config-users
	

Actual Results:  /usr/share/redhat-config-users/redhat-config-users: line 4:
19151 Segmentation fault      (core dumped) /usr/bin/python2.2
/usr/share/redhat-config-users/redhat-config-users.py


Additional info:

I double checked the DISPLAY variable.  I have display permission to my desktop.
 Other X applications display fine.  I tried running it as normal user first. 
The prompt for the root password displayed and worked fine, then I get
'Segmentation Fault' after putting in the root password.

Comment 1 Brent Fox 2002-07-09 22:12:27 UTC
Very odd.  Try this:

1. Log in as root
2. Type '/usr/bin/python2.2'
3. At the ">>>" prompt, type 'import libuser'.  Does this cause a crash?

Comment 2 Tom Cross 2002-07-09 22:23:48 UTC
Nope, sorry:

# /usr/bin/python2.2
Python 2.2 (#1, Apr 12 2002, 15:29:57) 
[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libuser
>>> 


Comment 3 Need Real Name 2002-07-11 23:09:05 UTC
I had the same problem (redhat_config_users started segfaulting after an
upgrade).  I ran an strace, saw that it was looking for /etc/shadow, then
checked and found that shadow passwords were disabled.  I re-enabled them using
authconfig, and now it runs.

Try enabling shadow passwords using authconfig and see if that works.  Or try
removing shadow from the modules line in the [default] section of /etc/libuser.conf.

My guess is that one of two things happened:  either the auth configuration and
libuser.conf files got mismatched during the upgrade, or the pervious version of
redhat_config_users was willing to keep running even if it didn't find a shadow
password file.

The last few lines of my strace are:
stat64("/etc/shadow", 0xbffff380)       = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/messages.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/messages.mo", O_RDONLY) = -1 ENOENT (No
such file or directory)
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++


Comment 4 Tom Cross 2002-07-12 12:58:35 UTC
Well, I can't use shadow passwords since I couldn't get that to work with NIS. 
This machine is an NIS server and one of the machines that need that NIS info
doesn't do well with this server setup with shadow passwords.

So, I took your other suggestion and edited /etc/libuser.conf.  It appears to
work a little better/further, but still crashes:

# redhat-config-users 
/usr/share/redhat-config-users/userWindow.py:73: DeprecationWarning: use
GtkListStore/GtkTreeView
  self.loginShellCombo.list.select_item(self.shells.index(default))

** (redhat-config-users.py:8976): CRITICAL **: file user.c: line 393
(run_single): assertion `strlen(sdata) > 0' failed

** (redhat-config-users.py:8976): CRITICAL **: file user.c: line 357
(run_single): assertion `strlen(sdata) > 0' failed
Traceback (most recent call last):
  File "/usr/share/redhat-config-users/redhat-config-users.py", line 36, in ?
    mainWindow.mainWindow()
  File "/usr/share/redhat-config-users/mainWindow.py", line 228, in __init__
    self.refresh()
  File "/usr/share/redhat-config-users/mainWindow.py", line 395, in refresh
    self.populate_lists()
  File "/usr/share/redhat-config-users/mainWindow.py", line 487, in populate_lists
    self.populate_group_list()
  File "/usr/share/redhat-config-users/mainWindow.py", line 456, in
populate_group_list
    if groupEnt.get(libuser.GIDNUMBER) != []:
AttributeError: 'NoneType' object has no attribute 'get'


Could this be caused by a Ximian package?

Comment 5 Tom Cross 2002-07-12 13:01:36 UTC
Oh wait, what am *I* thinking... I don't have Ximian installed on this machine...

Comment 6 Brent Fox 2002-08-14 05:57:20 UTC
Nalin, does this look like a libuser problem to you?

Comment 7 akonstam 2002-08-17 19:14:56 UTC
This program does not work for me and I do not use shadow passwds. I have
narrowed down the problem as follows: 
The file:/usr/share/redhat-config-users/redhat-config-users.py
In that file are the statements to be executed by:
/usr/bin/python2.2

import sys
import signal
import libuser
import mainWindow

Well the first three commands work but mainWindow can't be found.
mainWindow.py  is in /usr/share/dateconfig but python does not see it,


Any advice?


Comment 8 Brent Fox 2002-10-11 19:00:14 UTC
I think this is a problem in the way libuser handles machines that don't have
shadow passwords enabled.  Nalin, can you take a look at this?

Comment 9 Brent Fox 2002-10-14 16:43:26 UTC
*** Bug 75590 has been marked as a duplicate of this bug. ***

Comment 10 akonstam 2002-10-14 17:56:21 UTC
I agree this is a duplicate of the problem in bug 75590. However this was never
resolved when posted for 7.3 and it is still not resolved in RH 8.0.

When will this be resolved since this has been going on for several months.

Comment 11 Hao Li 2002-10-22 00:13:47 UTC
Removing "shadow" from the following two lines in /etc/libuser.conf fixed the
problem for me:

modules = files shadow
create_modules = files shadow


Comment 12 Brent Fox 2002-10-22 20:36:03 UTC
tomc, I forgot one crucial step.  After importing libuser into the python
interpreter, try initializing it by:
>>> admin = libuser.admin()

This causes libuser to segfault on my box.

Comment 13 Brent Fox 2002-10-22 20:36:31 UTC
*** Bug 76292 has been marked as a duplicate of this bug. ***

Comment 14 Tom Cross 2002-10-22 20:51:30 UTC
If I have /etc/libuser.conf set (incorrectly) with:

modules = files shadow
create_modules = files shadow

it bombs when I run the following on the python command line:

>>> import libuser
>>> admin = libuser.admin()
Segmentation fault (core dumped)


However, if /etc/libuser.conf is set correctly with:

modules = files
create_modules = files

the import works fine:


# /usr/bin/python2.2                      ^[OA
Python 2.2 (#1, Apr 12 2002, 15:29:57) 
[GCC 2.96 20000731 (Red Hat Linux 7.2 2.96-109)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libuser
>>> admin = libuser.admin();
>>> 


But redhat-config-users still does not work.  A window is briefly displayed, but
the program crashes:



# redhat-config-users
/usr/share/redhat-config-users/userWindow.py:73: DeprecationWarning: use
GtkListStore/GtkTreeView
  self.loginShellCombo.list.select_item(self.shells.index(default))

** (redhat-config-users.py:5713): CRITICAL **: file user.c: line 393
(run_single): assertion `strlen(sdata) > 0' failed

** (redhat-config-users.py:5713): CRITICAL **: file user.c: line 357
(run_single): assertion `strlen(sdata) > 0' failed
Traceback (most recent call last):
  File "/usr/share/redhat-config-users/redhat-config-users.py", line 36, in ?
    mainWindow.mainWindow()
  File "/usr/share/redhat-config-users/mainWindow.py", line 228, in __init__
    self.refresh()
  File "/usr/share/redhat-config-users/mainWindow.py", line 395, in refresh
    self.populate_lists()
  File "/usr/share/redhat-config-users/mainWindow.py", line 487, in populate_lists
    self.populate_group_list()
  File "/usr/share/redhat-config-users/mainWindow.py", line 456, in
populate_group_list
    if groupEnt.get(libuser.GIDNUMBER) != []:
AttributeError: 'NoneType' object has no attribute 'get'



Comment 15 Brent Fox 2003-03-21 21:38:01 UTC
I don't see this problem anymore in the Psyche betas with libuser-0.51.7-1 and
redhat-config-users-1.1.5-7.  Resolving as Rawhide.

Comment 16 Brent Fox 2003-03-21 21:38:33 UTC
*** Bug 86397 has been marked as a duplicate of this bug. ***


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