cannot add user account

Bug #97527 reported by octavianh
6
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
New
Low
Ubuntu Desktop Bugs

Bug Description

There is definitely a bug involved with the graphical "Users and Groups" applet. Following steps reproduce the bug in the most current Feisty Fawn with all updates.

1. Open "Users and Groups"
2. Create user "test" with Administrator role
3. Delete user "test" from the same applet
4. Delete home directory using "sudo rm -Rf /home/test"
5. Open "Users and Groups"
6. Create user "test"
- user shows up in the list in the applet
- home directory not created
- user added to /etc/group but NOT to /etc/passwd
7. Log out and the user vanishes and no longer will appear in the "Users and Groups" applet

8. commandline "adduser test" works correctly however.

This bug is confirmed by me on both i386 and PPC versions of Feisty with all the latest updates as of March 28th, 2007. This leads me to believe that the graphical user management tool is storing either the old user name or the "administrator role" somewhere and this conflicts with the attempt to re-add the user after deletion. At least it's fair to speculate that's what it might be.

Referenced Forum Thread:

http://ubuntuforums.org/showthread.php?p=2367114#post2367114

ProblemType: Bug
Architecture: i386
Date: Wed Mar 28 11:33:54 2007
DistroRelease: Ubuntu 7.04
Uname: Linux ubuntubeta 2.6.20-13-generic #2 SMP Sun Mar 25 00:21:25 UTC 2007 i686 GNU/Linux

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. That works correctly on my feisty desktop. Debugging the tool is not trivial, could you try to get debug log?
- run users-admin
- ps ax | grep UsersConfig , the number on the start of the line is <pid> to use for the next line
- sudo cat /proc/<pid>/environ
- export DBUS_SESSION_BUS_ADDRESS=value_listed_to_the_environ
- sudo /usr/share/system-tools-backends-2.0/scripts/SystemToolsBackends.pl -m UsersConfig --disable-shutdown --report --verbose

then do the steps and note if there is an error on the debug log

Changed in gnome-system-tools:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Unconfirmed → Needs Info
Revision history for this message
octavianh (octavianh) wrote :

I ran the commands as you listed them, here is a complete output from my terminal session along with the compile error on the debug i got. it seems i don't have "pw" on my system or something.

octavian@ubuntubeta:~$ ps ax | grep Users
 5611 ? S 0:00 perl /usr/share//system-tools-backends-2.0/scripts/SystemToolsBackends.pl -m UsersConfig
 5671 pts/0 R+ 0:00 grep Users
octavian@ubuntubeta:~$ sudo cat /proc/5611/environ
Password:
runlevel=2QUIET=yesUPSTART_JOB=rc2UPSTART_JOB_ID=5TERM=linuxPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binRUNLEVEL=2PREVLEVEL=NUPSTART_EVENT=runlevelprevious=NPWD=/VERBOSE=noDBUS_STARTER_ADDRESS=unix:abstract=/tmp/dbus-nztGKtwqLP,guid=e4169c1741a03f78452ed8004612b486DBUS_STARTER_BUS_TYPE=sessionDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-nztGKtwqLP,guid=e4169c1741a03f78452ed8004612b486octavian@ubuntubeta:~$ export DBUS_SESSION_BUS_ADDRESS=value_listed_octavian@ubuntubeta:~$ export DBUS_SESSION_BUS_ADDRESS=value_listed_to_the_environ
octavian@ubuntubeta:~$ sudo /usr/share/system-tools-backends-2.0/scripts/SystemToolsBackends.pl -m UsersConfig --disable-shutdown --report --verbose
begin::Start of work report.
sys::begin::Start of work report.
file_locate_tool_success::Found tool [uname].
info::file_locate_tool_success::Found tool [%s].::uname
file_run_pipe_success::Piping command [LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /bin/uname -s 2> /dev/null |] for reading.
info::file_run_pipe_success::Piping command [%s] for reading.::LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /bin/uname -s 2> /dev/null |
file_locate_tool_success::Found tool [usermod].
info::file_locate_tool_success::Found tool [%s].::usermod
file_locate_tool_success::Found tool [userdel].
info::file_locate_tool_success::Found tool [%s].::userdel
file_locate_tool_success::Found tool [useradd].
info::file_locate_tool_success::Found tool [%s].::useradd
file_locate_tool_success::Found tool [adduser].
info::file_locate_tool_success::Found tool [%s].::adduser
file_locate_tool_success::Found tool [deluser].
info::file_locate_tool_success::Found tool [%s].::deluser
file_locate_tool_success::Found tool [chfn].
info::file_locate_tool_success::Found tool [%s].::chfn
file_locate_tool_failed::Couldn't find tool [pw].
warn::file_locate_tool_failed::Couldn't find tool [%s].::pw
org.freedesktop.DBus.Error.BadAddress: Address does not contain a colon
Compilation failed in require at /usr/share/system-tools-backends-2.0/scripts/SystemToolsBackends.pl line 49.
octavian@ubuntubeta:~$

Revision history for this message
Sebastien Bacher (seb128) wrote :

"value_listed_to_the_environ" is what you read after the "sudo cat /proc/5611/environ", on your example it's "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-nztGKtwqLP,guid=e4169c1741a03f78452ed8004612b486"

Revision history for this message
octavianh (octavianh) wrote :
Download full text (4.6 KiB)

Here is the complete output for adding a user "test" with password "testtest" same results, no homedir created and user doesn't really get created either

file_create_path::Directory [//var/cache/system-tools-backends/backup///1/] created.
info::file_create_path::Directory [%s] created.:://var/cache/system-tools-backends/backup///1/
file_backup_rotate::Backup directory [//var/cache/system-tools-backends/backup//] was rotated.
info::file_backup_rotate::Backup directory [%s] was rotated.:://var/cache/system-tools-backends/backup//
file_create_path::Directory [//var/cache/system-tools-backends/backup///1//etc/master.passwd] created.
info::file_create_path::Directory [%s] created.:://var/cache/system-tools-backends/backup///1//etc/master.passwd
file_backup_success::Saved backup for [//var/cache/system-tools-backends/backup//].
info::file_backup_success::Saved backup for [%s].:://var/cache/system-tools-backends/backup//
file_open_read_success::Reading options from [/etc/passwd].
info::file_open_read_success::Reading options from [%s].::/etc/passwd
file_open_read_success::Reading options from [/etc/shadow].
info::file_open_read_success::Reading options from [%s].::/etc/shadow
file_locate_tool_success::Found tool [mkdir].
info::file_locate_tool_success::Found tool [%s].::mkdir
file_run::Running command [LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /bin/mkdir -p /home 2> /dev/null > /dev/null].
info::file_run::Running command [%s].::LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /bin/mkdir -p /home 2> /dev/null > /dev/null
file_run::Running command [LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /usr/sbin/adduser --gecos '' --disabled-password --home '/home/test' --gid '1006' --shell '/bin/bash' --uid '1001' 'test' 2> /dev/null > /dev/null].
info::file_run::Running command [%s].::LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /usr/sbin/adduser --gecos '' --disabled-password --home '/home/test' --gid '1006' --shell '/bin/bash' --uid '1001' 'test' 2> /dev/null > /dev/null
file_run::Running command [LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /usr/sbin/usermod -p '$1$k6snP$DL9SUP9Iay1kXr0JSe83/1' test 2> /dev/null > /dev/null].
info::file_run::Running command [%s].::LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /usr/sbin/usermod -p '$1$k6snP$DL9SUP9Iay1kXr0JSe83/1' test 2> /dev/null > /dev/null
file_run::Running command [LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /usr/sbin/usermod -c ',,,,' test 2> /dev/null > /dev/null].
info::file_run::Running command [%s].::LC_ALL=C PATH=$PATH:/sbin:/usr/sbin /usr/sbin/usermod -c ',,,,' test 2> /dev/null > /dev/null
file_buffer_load::Loading file [/etc/shells] to buffer.
info::file_buffer_load::Loading file [%s] to buffer.::/etc/shells
file_open_read_success::Reading options from [/etc/shells].
info::file_open_read_success::Reading options from [%s].::/etc/shells
file_buffer_save::Saving buffer to file [/etc/shells].
info::file_buffer_save::Saving buffer to file [%s].::/etc/shells
file_open_write_success::Writing to [/etc/shells].
info::file_open_write_success::Writing to [%s].::/etc/shells
file_create_path::Directory [/etc/shells] created.
info::file_create_path::Directory [%s] created.::/etc/shells
replace_split::Replacing key [UID_MIN] in [/etc/login.defs].
info::replace_split...

Read more...

Revision history for this message
octavianh (octavianh) wrote :

Ok, here's how i got it to work after a few hacks

1. went into /var/cache/system-tools-backends/backup and removed all the folders for backups
2. went into /etc/group and removed the bogus entry for the user "test" (without this backups would simply re-create in previous folder with no success on user addition)
3. went into user account manager and re-created user "test"
4. success (homedir created along with actual user in /etc/passwd and shadow and after restarting user account manager the account is still there.

It seems something bad is happening in /var/cache where old backups are stored.

Revision history for this message
octavianh (octavianh) wrote :

Problem repeats after you remove the "test" user and try to re-create it again so deleting the old backups didn't fix the problem permanently

Revision history for this message
Sebastien Bacher (seb128) wrote :

Does running "/usr/sbin/adduser --gecos --disabled-password --home '/home/test' --gid '1006' --shell '/bin/bash' --uid '1001' 'test'" work correctly?

Revision history for this message
octavianh (octavianh) wrote :

Following is the output:

root@ubuntubeta:~# /usr/sbin/adduser --gecos --disabled-password --home '/home/test' --gid '1006' --shell '/bin/bash' --uid '1001' 'test'
adduser: The GID 1006 does not exist.

Revision history for this message
octavianh (octavianh) wrote :

Here is the output of 'tail /etc/group' as well:

scanner:x:114:cupsys,hplip,octavian
slocate:x:115:
gdm:x:116:
fuse:x:117:
octavian:x:1000:
admin:x:118:octavian
postgres:x:119:
web:x:1001:octavian
mysql:x:120:
nvram:x:121:

I created a custom group called 'web' for my own purposes, dunno if that might be part of the problem or not

Revision history for this message
octavianh (octavianh) wrote :

actually, that custom group is not present on my other two machines running feisty and they're still having the problem so nevermind

Revision history for this message
Sebastien Bacher (seb128) wrote :

changing to unconfirmed, we get too many bugs to work on everything, you are the only one to get the bug and it's low importance, it might take some time before we do work on it

Changed in gnome-system-tools:
status: Needs Info → Unconfirmed
Revision history for this message
Saivann Carignan (oxmosys) wrote :

This bug is a duplicate of bug #66051 which is currently fixed in latest Hardy release. Thanks for the time you took to help improving ubuntu and please feel free to report any other bugs you might find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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