[users-admin] Can't create new user accounts

Bug #459474 reported by jonathan bidwell boitano
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: gnome-system-tools

I've tried to add new users in "users-admin" but it's impossible... I click on "add user", then follow the instructions but nothing happen, only the root account appears. Very strange. In the login screen I can my name, nobody else. May the problem possibly be in the package "policykit"? I've experienced configuration problems with that...

ProblemType: Bug
Architecture: i386
Date: Fri Oct 23 20:38:16 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/users-admin
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate i386 (20091020.3)
NonfreeKernelModules: wl nvidia
Package: gnome-system-tools 2.28.1-0ubuntu1
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: gnome-system-tools
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
jonathan bidwell boitano (jonathan-bidwell) wrote :
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Thanks for your report. We need more information to understand how the bug you describe could happen. Please read the instructions at https://wiki.ubuntu.com/DebuggingGnomeSystemTools, and follow the procedure for the tool users-admin.

Changed in gnome-system-tools (Ubuntu):
status: New → Incomplete
summary: - Can't create new user accounts
+ [users-admin] Can't create new user accounts
Revision history for this message
jonathan bidwell boitano (jonathan-bidwell) wrote :
Revision history for this message
jonathan bidwell boitano (jonathan-bidwell) wrote :
Revision history for this message
jonathan bidwell boitano (jonathan-bidwell) wrote :

And users-admin.log was an empty file.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Thanks! So far the only strange thing from the logs is the GID set to 0. I guess you did not change manually the user's main group, did you?

Does the directory /home/invitado exist? What does running the command
sudo /usr/sbin/adduser --gecos --disabled-password --home /home/invitado --gid 0 --shell /bin/bash --uid 1001 invitado
say? If that fails, please also check that no group called 'invitado' or using GID 1001 exists, and try
sudo addgroup --gid 1001 invitado
sudo /usr/sbin/adduser --gecos --disabled-password --home /home/invitado --gid 1001 --shell /bin/bash --uid 1001 invitado

Revision history for this message
jonathan bidwell boitano (jonathan-bidwell) wrote :

No, I didn't change anything... The directory /home/invitado doesn't exist.

jonathan@Masicora:~$ sudo /usr/sbin/adduser --gecos --disabled-password --home /home/invitado --gid 0 --shell /bin/bash --uid 1001 invitado
Adding user `invitado' ...
Adding new user `invitado' (1001) with group `root' ...
useradd: cannot lock /etc/gshadow; try again later.
adduser: `/usr/sbin/useradd -d /home/invitado -g root -s /bin/bash -u 1001 invitado' returned error code 10. Exiting.

There's no group called "invitado"...

jonathan@Masicora:~$ sudo addgroup --gid 1001 invitado
Adding group `invitado' (GID 1001) ...
groupadd: cannot lock /etc/gshadow; try again later.
addgroup: `/usr/sbin/groupadd -g 1001 invitado' returned error code 10. Exiting.

jonathan@Masicora:~$ sudo /usr/sbin/adduser --gecos --disabled-password --home /home/invitado --gid 1001 --shell /bin/bash --uid 1001 invitado

adduser: The GID 1001 does not exist.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

OK, I see the problem. That's very similar to bug 432964. Check that there's a file called /etc/gshadow.lock, and possibly /etc/shadow.lock, /etc/passwd.lock too; if that's the case, remove them (no risk), and retry. The problem might come from a crash while using the guest session: do you remember such a situation?

If that fixes your issue, I'd still like to have a look at the '--gid 0' option that is used, which can really be a security risk. But I need to check the code and see what I can get here.

Revision history for this message
cosmos (alantonop) wrote :

I have a similar problem.I'm trying to create an account for the user sofoklis and i get the message below.I tried erasing the files described in post #8 but i always get the same message.The problem existed under Ubuntu 9.10 Karmic and also in 10.04 Lucid.

uname -a
Linux alexandros-desktop 2.6.32-16-generic #25-Ubuntu SMP Tue Mar 9 16:33:12 UTC 2010 x86_64 GNU/Linux

sudo adduser sofoklis
Adding user `sofoklis' ...
Adding new group `sofoklis' (1001) ...
Adding new user `sofoklis' (1001) with group `sofoklis' ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /home/sofoklis -g sofoklis -s /bin/bash -u 1001 sofoklis' returned error code 1. Exiting.

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Well, just have a look at bug 432964, but in short: remove the file /etc/passwd.lock, /etc/shadow.lock or /etc/gshadow.lock.

Revision history for this message
Majed Aly (majed-aly) wrote :

I had the same error while trying to install openssh. The error was related to /etc/group.lock when deleted, everything went OK with the installation. I remember having a crash couple of days ago which might have caused the lock.
Thanks

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

Other bug subscribers

Related questions

Remote bug watches

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