Bug 68245
Summary: | libuser crashes when shadow passwords are not used | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Tom Cross <tomc> |
Component: | libuser | Assignee: | Nalin Dahyabhai <nalin> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | akonstam, bfox, ipesando |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-03-21 21:38:01 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tom Cross
2002-07-08 15:25:52 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? 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
>>>
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 +++ 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? Oh wait, what am *I* thinking... I don't have Ximian installed on this machine... Nalin, does this look like a libuser problem to you? 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? 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? *** Bug 75590 has been marked as a duplicate of this bug. *** 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. Removing "shadow" from the following two lines in /etc/libuser.conf fixed the problem for me: modules = files shadow create_modules = files shadow 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.
*** Bug 76292 has been marked as a duplicate of this bug. *** 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' 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. *** Bug 86397 has been marked as a duplicate of this bug. *** |