GNOME Bugzilla – Bug 521438
Unable to create new users with G-S-T 2.22 on Slackware
Last modified: 2009-08-28 22:48:02 UTC
Please describe the problem: Gnome 2.21.92, GST 2.22, STB 2.6.0, liboobs 2.22, dbus 1.1.20 on Slackware 11.0. Create a new user. Close the dialog window. Restart users-admin. The newly created user does not exist. Steps to reproduce: 1. See above... Actual results: Expected results: Does this happen every time? Yes, happens every time. Other information: root@io scripts # gdb users-admin GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run Starting program: /usr/bin/users-admin [Thread debugging using libthread_db enabled] [New Thread -1219987776 (LWP 4281)] (users-admin:4281): Liboobs-CRITICAL **: create_dbus_struct_from_user: assertion `(login && password && homedir && shell)' failed (users-admin:4281): Liboobs-CRITICAL **: Not committing due to inconsistencies in the configuration, this reflects a bug in the application Program exited normally. (gdb) bt No stack. (gdb)
I forgot to add that users-admin did work well on Slackware using GNOME 2.20 with STB 2.4.x and GST 2.20.
> (users-admin:4281): Liboobs-CRITICAL **: create_dbus_struct_from_user: > assertion `(login && password && homedir && shell)' failed That's because for the configuration for an user doesn't have either login, password, home directory or default shell, are you sure you filled these up properly? Also, do you have an up to date liboobs?
Thx for the reply: >> Gnome 2.21.92, GST 2.22, STB 2.6.0, liboobs 2.22, dbus 1.1.20 on Slackware 11.0. As you can see me is using the latest releases of stb, gst and liboobs. And yes: me is sure that i filled in login, password, homedir, shell. Except login and password all fields are automatically filled with data. And if empty fields could be a problem then the GUI should check this but i don't think this is the problem... login: slack password: ******** home: /home/slack Shell: /bin/bash Markus
(In reply to comment #3) > Thx for the reply: > > >> Gnome 2.21.92, GST 2.22, STB 2.6.0, liboobs 2.22, dbus 1.1.20 on Slackware > 11.0. > > As you can see me is using the latest releases of stb, gst and liboobs. Ah, managed not to read that :) > > And yes: me is sure that i filled in login, password, homedir, shell. Except > login and password all fields are automatically filled with data. And if empty > fields could be a problem then the GUI should check this but i don't think this > is the problem... The gui does check these, I was just wondering if there was something evil going on. There's a test app in the system-tools-backends source called test-backends.pl, could you send me the output of "./test-backends.pl UsersConfig" ? Maybe the backend is failing to provide that data for some user, so that check fails when returning back the configuration to the backends... But that's strange, I don't think users-admin backend has changed a lot, and its code is reasonably distro agnostic.
Created attachment 107035 [details] Output of test_backends UsersConfig Attached you will find the output of test-backends UsersConfig. Something else is not working: When i set username and password, then switch to the ADVANCED tab, the home directory is set to /home/username. But i cannot select any other Shell. /bin/bash is preselected. /bin/csh or /bin/zsh do exist. The dropdown list is empty. Markus
I spent some more time in testing: When starting 'users-admin' and going to "Manage Groups" i can't create a new group: 1) "Add group" 2) Group name: "slackware" 3) Group id: 2000 4) "OK" The "groups settings" window now includes an new but empty line for the group i have created. I can double-click that empty line and the "properties" dialog opens again... but with no data for Group name and a new Group id (the last one selected+1). While i cannot add a new group i can modify existing groups. For example if i change the group id then this change will be saved. When adding a new user i still can't select any other shell then /bin/bash. The 'kuser' tool shows all available shell applications. The test_backends did list them also in the output. The newly created user disappears from the "Users Settings" window after a few seconds automatically... Is there is any more data i can provide to help finding out what is the problem? I have tested the other tools like time-admin, network-admin, services-admin and they all do work, it's just users-config that seem to have problems ... Markus
According to the output in comment #5, there are several groups (games, bin, nobody, lp, ...) whithout any shell (not even /bin/false), is that the system default? pretty weird if it is. That's probably what's causing that check to fail when trying to save the configuration again, not the new added user.
Thanks for the reply. I just did a quick check and added /bin/false to all users not having a valid shell yet (and yes, that's the default on Slackware 11/Wolvix but has changed on Slackware 12/Bluewhite64). That did the trick. But according to 'man 5 passwd': The command interpreter field provides the name of the user's command language interpreter, or the name of the initial program to execute. Login uses this information to set the value of the SHELL environmental variable. If this field is empty, it defaults to the value /bin/sh. So this field can be empty and /bin/sh is used then. Anyway... there is now something a user can do to get it to work. But i still cannot add new groups and i cannot select any other shell except /bin/bash from the advanced settings tab. Any ideas? Markus
Created attachment 109909 [details] Output of test-backends.in UsersConfig I've got exactly the same issue as Marcus. I can't add or delete any users, and I get the following spat out in the terminal: (users-admin:21721): Liboobs-CRITICAL **: create_dbus_struct_from_user: assertion `(login && password && homedir && shell)' failed (users-admin:21721): Liboobs-CRITICAL **: Not committing due to inconsistencies in the configuration, this reflects a bug in the application I've attached my output of test-backends UsersConfig. In my case, all users have a valid shell. I'm also experiencing the other symptoms here (no shells appear in drop-down list when I attempt to add a user). This is on Ubuntu Hardy. Some version info: chr1s@chris-desktop:~/system-tools-backends-2.6.0$ apt-cache policy gnome-system-tools gnome-system-tools: Installed: 2.22.0-0ubuntu9 Candidate: 2.22.0-0ubuntu9 Version table: *** 2.22.0-0ubuntu9 0 500 http://archive.ubuntu.com hardy/main Packages 100 /var/lib/dpkg/status chr1s@chris-desktop:~/system-tools-backends-2.6.0$ apt-cache policy system-tools-backends system-tools-backends: Installed: 2.6.0-0ubuntu7 Candidate: 2.6.0-0ubuntu7 Version table: *** 2.6.0-0ubuntu7 0 500 http://archive.ubuntu.com hardy/main Packages 100 /var/lib/dpkg/status chr1s@chris-desktop:~/system-tools-backends-2.6.0$ apt-cache policy liboobs-1-4 liboobs-1-4: Installed: 2.22.0-0ubuntu1 Candidate: 2.22.0-0ubuntu1 Version table: *** 2.22.0-0ubuntu1 0 500 http://archive.ubuntu.com hardy/main Packages 100 /var/lib/dpkg/status chr1s@chris-desktop:~/system-tools-backends-2.6.0$ apt-cache policy dbus dbus: Installed: 1.1.20-1ubuntu1 Candidate: 1.1.20-1ubuntu1 Version table: *** 1.1.20-1ubuntu1 0 500 http://archive.ubuntu.com hardy/main Packages 100 /var/lib/dpkg/status
Also i have the same problem using Ubuntu Hardy Heron. Creating users works perfectly well with the useradd-command. When i want to do it graphically the newly created user appears immediately after i created him. But after closing an reopening users-admin the user is not there. Deleting users works fine for me, also graphically. What is else i don't get any messages in the terminal when creating a user. I have also looked at the system-log, where first a new group is added (name=test, GID=1003), then a new user is added (name=test, UID=1002, GID=1003, home=/home/test, shell=/bin/bash). Then it gets weird: The user test is deleted, the group test is removed and a new group (name=test, GID=1003) is added. When i add the user with the useradd command like that (after removing the newly created group test) "sudo useradd test" the following happens: A new group (name=test, GID=1003) and a new user (name=test, UID=1002, GID=1003, home=/home/test, shell=/bin/sh).
In addition to the above problems with not having a valid shell i also figured out that users-admin cannot create new users if the /etc/passwd file includes users without a valid home directory. I know this is a problem in the configuration file but i don't see any reason why users-admin could not add a new user to that file. At least there should be a more informative error message on screen if the user could not be added instead of list the new user in the users-admin window while it has not beed added to the /etc/passwd file. Markus
Created attachment 129105 [details] [review] Don't fail if homedir or shell are not set Hi, I've been hit by this because there was an entry in my /etc/passwd whose home dir wasn't set. That will happen to everybody who uses sabayon, as it resets the homedir of the sabayon user to "". As you can see with the following command, it doesn't seem to be forbidden to have an empty homedir: # usermod -d "" someuser unlike the following that is not allowed: # usermod -l "" someuser So I believe empty home dirs should be allowed. Also as documented in passwd(5) and usermod(8), the shell field is optional and if empty the default system shell will be used: "Setting this field to blank causes the system to select the default login shell." Therefore I propose the following change to liboobs (please reassign if appropriate).
g-s-t is unmaintained: http://blogs.gnome.org/carlosg/2008/02/01/two-new-children-in-cookieville/
Thanks Emilio for that fix! Pushed as 6a26d8f603e37eed0a2617e8b705f04c1676b1a1. I'll try to release a new version of liboobs before GNOME 2.28 is released. Please report if you still experience this problem.
For reference, I've just pushed a fix so that we don't even fail even password is NULL, since that's also allowed ('passwd -d'). The backends already handle this gracefully. So the login is the only required field. Commit a5834c47b9cec3c4abbba148e5d609ebb79d3794, see also https://bugs.launchpad.net/ubuntu/+source/liboobs/+bug/316667.