Bug 68245 - libuser crashes when shadow passwords are not used
libuser crashes when shadow passwords are not used
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: libuser (Show other bugs)
7.3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
:
: 75590 76292 86397 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-07-08 11:25 EDT by Tom Cross
Modified: 2008-05-01 11:38 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-21 16:38:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom Cross 2002-07-08 11:25:52 EDT
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 18:12:27 EDT
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 18:23:48 EDT
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 19:09:05 EDT
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 08:58:35 EDT
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 09:01:36 EDT
Oh wait, what am *I* thinking... I don't have Ximian installed on this machine...
Comment 6 Brent Fox 2002-08-14 01:57:20 EDT
Nalin, does this look like a libuser problem to you?
Comment 7 akonstam 2002-08-17 15:14:56 EDT
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 15:00:14 EDT
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 12:43:26 EDT
*** Bug 75590 has been marked as a duplicate of this bug. ***
Comment 10 akonstam 2002-10-14 13:56:21 EDT
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-21 20:13:47 EDT
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 16:36:03 EDT
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 16:36:31 EDT
*** Bug 76292 has been marked as a duplicate of this bug. ***
Comment 14 Tom Cross 2002-10-22 16:51:30 EDT
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 16:38:01 EST
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 16:38:33 EST
*** 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.