Open SSH installation failed : useradd: cannot lock /etc/passwd; try again later.

Bug #501234 reported by Diana C
8
This bug affects 1 person
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-blacklist-extra
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://ro.archive.ubuntu.com karmic/main openssh-server 1:5.1p1-6ubuntu2 [286kB]
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-server_1%3a5.1p1-6ubuntu2_i386.deb) ...
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)
NonfreeKernelModules: fglrx
Package: openssh-server 1:5.1p1-6ubuntu2
ProcVersionSignature: Ubuntu 2.6.31-16.53-generic
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

Revision history for this message
Diana C (chincesdiana) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

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?

Changed in openssh (Ubuntu):
status: New → Incomplete
summary: - Open SSH installation failed
+ Open SSH installation failed : useradd: cannot lock /etc/passwd; try
+ again later.
Revision history for this message
Diana C (chincesdiana) wrote :

Removing those files fixed the issue. Thanks

Changed in openssh (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for following up. I'm marking as duplicate of bug 432964. Don't hesitate to submit any new bug.

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.