Open SSH installation failed : useradd: cannot lock /etc/passwd; try again later.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
sudo apt-get install openssh-server openssh-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssh-client is already the newest version.
Suggested packages:
rssh molly-guard openssh-blacklist openssh-
The following NEW packages will be installed:
openssh-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 286kB of archives.
After this operation, 766kB of additional disk space will be used.
Get:1 http://
Fetched 286kB in 0s (840kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 153810 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.1p1-6ubuntu2) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /var/run/sshd -g nogroup -s /usr/sbin/nologin -u 114 sshd' returned error code 1. Exiting.
dpkg: error processing openssh-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
openssh-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Package
AptOrdering:
openssh-server: Install
openssh-server: Configure
Architecture: i386
Date: Tue Dec 29 09:36:08 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelMo
Package: openssh-server 1:5.1p1-6ubuntu2
ProcVersionSign
SourcePackage: openssh
Title: package openssh-server 1:5.1p1-6ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Uname: Linux 2.6.31-16-generic i686
Thanks for your report.
This is 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?