The module Users & Groups could not be loaded

Bug #34311 reported by Bert Vorenholt
34
Affects Status Importance Assigned to Milestone
kde-guidance (Ubuntu)
Fix Released
Medium
Sebastian Kügler

Bug Description

Clicking on the "User & Groups" icon in the "System Settings" application gives this error message. The possible reasons given are not the case, because i removed the package compleetly and after verifying that there is no userconfig* on my system anymore, I installed (--reinstall) kde-guidance again.
I'm on Kubuntu amd64 and the packageversion is 0.6.2-0ubuntu1.

Revision history for this message
Bert Vorenholt (bert-vorenholt-nl) wrote : Screenshot

Screenshot of "Users & Groups" in "System Settings" (Dutch: Systeem instellingen)

Revision history for this message
Bert Vorenholt (bert-vorenholt-nl) wrote :

kcmshell output from console:

bert@avwork:~$ kcmshell userconfig

Pythonize constructor -- pid = 15359
Python interpreter initialized!

Pythonize constructor -- pid = 15359
0755 default chmod
0755 default chmod
Traceback (most recent call last):
  File "<string>", line 8, in kcontrol_bridge_create_userconfig
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 1641, in create_userconfig
    return UserConfigApp(parent, name)
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 271, in __init__
    self.__updateGroupList()
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 504, in __updateGroupList
    self.__selectGroup(self.selectedgroupid)
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 510, in __selectGroup
    lvi = self.groupidsToListItems[groupid]
KeyError
error: *** runFunction failure
;
bert@avwork:~$

Kenny Duffus (kduffus)
Changed in kde-guidance:
assignee: nobody → kubuntu-team
Revision history for this message
Nicolas Dumoulin (nicolas-dumoulin) wrote :

I confirm this bug.
I've got the same error message on a up-to-date dapper with kde 3.5.2 and kde-guidance 0.6.3-0ubuntu1.

After some tests, it seems to be related to an error in the groups config.
In /usr/lib/python2.4/site-packages/unixauthdb.py at line 524, the self._context.lookupGID method fails to obtains the GUID of the main user. self._gid is 501, and None is returned.

Now in a shell :
$groups $LOGNAME
id: cannot find name for group ID 501

If it could helps someone ...

Revision history for this message
Nicolas Dumoulin (nicolas-dumoulin) wrote :

Sorry, but in fact my erro message in not the same !
Below is mine :
$kcmshell userconfig

Pythonize constructor -- pid = 3625
Python interpreter initialized!

Pythonize constructor -- pid = 3625
Traceback (most recent call last):
  File "<string>", line 8, in kcontrol_bridge_create_userconfig
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 1656, in create_userconfig
    return UserConfigApp(parent, name)
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 264, in __init__
    self.admincontext = unixauthdb.getContext(isroot)
  File "/usr/lib/python2.4/site-packages/unixauthdb.py", line 58, in getContext
    return PwdContext(editmode)
  File "/usr/lib/python2.4/site-packages/unixauthdb.py", line 787, in __init__
    user.polish()
  File "/usr/lib/python2.4/site-packages/unixauthdb.py", line 472, in polish
    self.setPrimaryGroup(self._context.lookupGID(self._gid))
  File "/usr/lib/python2.4/site-packages/unixauthdb.py", line 522, in setPrimaryGroup
    self.addToGroup(groupobj)
  File "/usr/lib/python2.4/site-packages/unixauthdb.py", line 541, in addToGroup
    groupobj._addUser(self)
AttributeError: 'NoneType' object has no attribute '_addUser'
error: *** runFunction failure
;

Revision history for this message
Simon Edwards (simon-simonzone) wrote :

Nicolas Dumoulin's python exception will be fixed in the next Guidance version (0.6.5). I would need more info about the error that Vorenholt is seeing though.

Revision history for this message
Bert Vorenholt (bert-vorenholt-nl) wrote :

Hi all,

First of all... thanks for your time!

>> I would need more info about the error that Vorenholt is seeing
>> though.

Shoot :-) (what is it you want/have to know)

Revision history for this message
Didier Raboud (odyx) wrote :

Guidance is now 0.6.6.

Bert : Can you still reproduce the bug ?

Revision history for this message
Bert Vorenholt (bert-vorenholt-nl) wrote :

>>Guidance is now 0.6.6.

Guidance version installed: 0.6.7-0ubuntu1

>>Bert : Can you still reproduce the bug ?

Yes, only the "0755 default chmod" lines aren't there anymore and the line numbers are different. The rest of the kcmshell output is the same as my original post.

Revision history for this message
Bert Vorenholt (bert-vorenholt-nl) wrote :

Could the problem ly in the fact that my primary group isn't the group based on my username but instead the group "users" (gid 100)?

Revision history for this message
Rocco Stanzione (trappist) wrote :

I can't reproduce this in kde-guidance 0.6.7, shipped with kde 3.5.4. Can anyone else?

Changed in kde-guidance:
status: Unconfirmed → Needs Info
Revision history for this message
Michael Hirsch (mdhirsch) wrote : Still seeing the problem in kde3.5.4

I have kde-guidance 0.6.7, shipped with kde 3.5.4, and see this exact problem, too. I'm up to date with all updates, AFAIK.

[502] ~> kcmshell userconfig
kio (KSycoca): Trying to open ksycoca from /var/tmp/kdecache-hirschlNq11X/ksycoca
kutils (KCMultiDialog): KCMultiDialog::addModule Users & Groups
kutils (KCModuleProxy): [void KCModuleProxy::init(const KCModuleInfo&)]
kutils (KCMultiDialog): [void KCMultiDialog::slotAboutToShow(QWidget*)]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCModuleProxy): Module not already loaded, loading module

Pythonize constructor -- pid = 5578
Python interpreter initialized!

kdecore (KLibLoader): Loading the next library global with flag 257.
kdecore (KLibLoader): library libpython2.4.so not found under 'module' but under 'lib'

Pythonize constructor -- pid = 5578
kdeui (KAboutDialog): setPixmap (iconName): kcmshell
Traceback (most recent call last):
  File "<string>", line 8, in kcontrol_bridge_create_userconfig
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 1687, in create_userconfig
    return UserConfigApp(parent, name)
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 275, in __init__
    self.__updateGroupList()
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 515, in __updateGroupList
    self.__selectGroup(self.selectedgroupid)
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 521, in __selectGroup
    lvi = self.groupidsToListItems[groupid]
KeyError
error: *** runFunction failure
;
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCMultiDialog): [void KCMultiDialog::slotAboutToShow(QWidget*)]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCModuleProxy): [virtual void KCModuleProxy::showEvent(QShowEvent*)]
kutils (KCModuleProxy): [KCModule* KCModuleProxy::realModule() const]
kutils (KCMultiDialog): [void KCMultiDialog::dialogClosed()]
kdecore (KLibLoader): The KLibLoader contains the library libpython2.4.so (0x699490)
[503] ~>

Revision history for this message
Michael Hirsch (mdhirsch) wrote :

I might be important that my /etc/passwd and /etc/group files are a little unusual and I can imagine that causing errors. My users are number 500, 501 and 502 because my Kubuntu installation was originally on Redhat, then Mandriva. I've ported the home partition across the changes. Since that was the original uids and gids, it has always been simplest for me to bring them along. But that is non-standard for Kubuntu, so I thought I should mention it.

Revision history for this message
mhanski (ma-han2000) wrote :

I confirm exactly the same error as Bert on two different machines with Kubuntu Dapper Drake.

BTW, importance should be "urgent", not "medium", since *buntu targets newbies, who usually cannot manage users and groups without a GUI. IMHO, it should't take 7 months to deliver a working fix to such an importand bug.

Revision history for this message
mhanski (ma-han2000) wrote :

Pythonize constructor -- pid = 5076
kdeui (KAboutDialog): setPixmap (iconName): kcmshell
Traceback (most recent call last):
  File "<string>", line 8, in kcontrol_bridge_create_userconfig
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 1687, in create_userconfig
    return UserConfigApp(parent, name)
  File "/usr/lib/python2.4/site-packages/userconfig.py", line 267, in __init__
    self.admincontext = unixauthdb.getContext(isroot)
  File "/usr/lib/python2.4/site-packages/unixauthdb.py", line 58, in getContext
    return PwdContext(editmode)
  File "/usr/lib/python2.4/site-packages/unixauthdb.py", line 706, in __init__
    for line in fhandle.readlines():
  File "/usr/lib/python2.4/codecs.py", line 489, in readlines
    return self.reader.readlines(sizehint)
  File "/usr/lib/python2.4/codecs.py", line 404, in readlines
    data = self.read()
  File "/usr/lib/python2.4/codecs.py", line 293, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1269-1270: invalid data
error: *** runFunction failure

Revision history for this message
SpookyGhost (francesco-g) wrote :

Same problem after upgrade from dapper to edgy rc :

$ kcmshell System/userconfig

Pythonize constructor -- pid = 10659
Python interpreter initialized!

Pythonize constructor -- pid = 10659
Traceback (most recent call last):
  File "<string>", line 8, in kcontrol_bridge_create_userconfig
  File "/var/lib/python-support/python2.4/userconfig.py", line 1694, in create_userconfig
    return UserConfigApp(parent, name)
  File "/var/lib/python-support/python2.4/userconfig.py", line 267, in __init__
    self.admincontext = unixauthdb.getContext(isroot)
  File "/var/lib/python-support/python2.4/unixauthdb.py", line 58, in getContext
    return PwdContext(editmode)
  File "/var/lib/python-support/python2.4/unixauthdb.py", line 728, in __init__
    newgroupobj._initString(line)
  File "/var/lib/python-support/python2.4/unixauthdb.py", line 1069, in _initString
    (self._groupname,self._encpass,self._gid,self._memberids) = tuple(line.strip().split(":"))
ValueError: too many values to unpack
error: *** runFunction failure

Revision history for this message
Sebastian Kügler (sebasje) wrote :

Those seem to be different problems.

mhanski: Your bug seems to be fixed in current svn. Can you confirm this?

SpookyGhost: Can you attach your /etc/group to this bugreport?

Revision history for this message
Sebastian Kügler (sebasje) wrote :

Michael Hirsch: Can I have your /etc/passwd and /etc/group as well?

Revision history for this message
Michael Hirsch (mdhirsch) wrote : Re: [Bug 34311] Re: The module Users & Groups could not be loaded

On Sunday 29 October 2006 2:52, sebas wrote:
> Michael Hirsch: Can I have your /etc/passwd and /etc/group as well?

Sure. I've attached them. As I mentioned in the bug report, my system
used to be a Mandriva (and before that Mandrake, and even earlier
RedHat) system, so I have somewhat different numberings on my user
accounts.

Michael

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
dhcp:x:101:101::/nonexistent:/bin/false
syslog:x:102:102::/home/syslog:/bin/false
klog:x:103:103::/home/klog:/bin/false
cupsys:x:100:104::/:/bin/false
fetchmail:x:104:65534::/var/lib/fetchmail:/bin/sh
messagebus:x:105:110::/var/run/dbus:/bin/false
hal:x:111:111:Hardware abstraction layer,,,:/var/run/hal:/bin/false
saned:x:112:112::/home/saned:/bin/false
hplip:x:106:7:HPLIP system user,,,:/var/run/hplip:/bin/false
hirsch:x:500:500:Michael D. Hirsch:/home/hirsch:/bin/bash
marti:x:501:501:Marti Hirsch:/home/marti:/bin/bash
testuser:x:502:502:testuser:/home/testuser:/bin/bash
haldaemon:x:113:113:Hardware abstraction layer,,,:/var/run/hal:/bin/false
sshd:x:107:65534::/var/run/sshd:/bin/false
moe:x:503:503:Morris Hirsch:/home/moe:/bin/bash

root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:hirsch
tty:x:5:
disk:x:6:
lp:x:7:cupsys
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:hirsch,cupsys
fax:x:21:
voice:x:22:
cdrom:x:24:hirsch,hal,haldaemon
floppy:x:25:hirsch,hal,haldaemon
tape:x:26:
sudo:x:27:
audio:x:29:hirsch
dip:x:30:hirsch
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:hirsch
sasl:x:45:
plugdev:x:46:hirsch,hal,haldaemon
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
dhcp:x:101:
syslog:x:102:
klog:x:103:
lpadmin:x:104:hirsch
scanner:x:105:hirsch,cupsys
admin:x:106:hirsch
crontab:x:107:
ssh:x:108:
slocate:x:109:
messagebus:x:110:
hal:x:111:
saned:x:112:
hirsch:x:500:
marti:x:501:
parents:x:499:hirsch,marti
testuser:x:502:
haldaemon:x:113:
moe:x:503:

Revision history for this message
Michael Hirsch (mdhirsch) wrote :

I'm pretty sure that the userid and groupid numbers is the problem. When I added a user with userid1000 then this module started working.

Revision history for this message
Luka Renko (lure) wrote :

That could be it - I think Users module considers all UIDs below 1000 as system and do not handle properly the case when there is no user with UID >= 1000

Revision history for this message
Sebastian Kügler (sebasje) wrote :

I cannot reproduce this problems in current version, if you still encounter this problem, please reopen.

Changed in kde-guidance:
assignee: kubuntu-team → sebas-kde
status: Needs Info → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.