[Bug 523896] Re: useradd: cannot lock /etc/passwd; try again later.

Mark - Syminet 523896 at bugs.launchpad.net
Tue Aug 28 01:57:55 UTC 2012


Just got bit by this one again, clean lucid install.  The fix is to "rm
-f /etc/gshadow.lock".

"sudo do-release-upgrade" finishes with this:


The upgrade has aborted. Your system could be in an unusable state. A 
recovery will run now (dpkg --configure -a). 

Setting up dbus (1.4.18-1ubuntu1) ...
groupadd: cannot lock /etc/gshadow; try again later.
adduser: `/usr/sbin/groupadd -g 112 messagebus' returned error code 10. Exiting.
dpkg: error processing dbus (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up whoopsie (0.1.32) ...
groupadd: cannot lock /etc/gshadow; try again later.
adduser: `/usr/sbin/groupadd -g 112 whoopsie' returned error code 10. Exiting.
dpkg: error processing whoopsie (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of language-selector-common:
 language-selector-common depends on dbus; however:
  Package dbus is not configured yet.
dpkg: error processing language-selector-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-standard:
 ubuntu-standard depends on language-selector-common; however:
  Package language-selector-common is not configured yet.
dpkg: error processing ubuntu-standard (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of accountsservice:
 accountsservice depends on dbus; however:
  Package dbus is not configured yet.
dpkg: error processing accountsservice (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 dbus
 whoopsie
 language-selector-common
 ubuntu-standard
 accountsservice

Upgrade complete

The upgrade has completed but there were errors during the upgrade 
process. 

To continue please press [ENTER]

--------------

...'x' to get out of it, then:

root at asdf:~# cd /etc
root at asdf:/etc# ls -l *lock
ls: unrecognized prefix: hl
ls: unparsable value for LS_COLORS environment variable
-rw------- 1 root root 0 Aug 14 16:41 gshadow.lock
root at asdf:/etc# lsof gshadow.lock
root at asdf:/etc# rm -f gshadow.lock
root at asdf:/etc# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
Setting up dbus (1.4.18-1ubuntu1) ...
dbus start/running, process 4465
Setting up accountsservice (0.6.15-2ubuntu9.3) ...
Setting up language-selector-common (0.79) ...
Installing new version of config file /etc/fonts/conf.avail/69-language-selector-zh-tw.conf ...
Installing new version of config file /etc/fonts/conf.avail/69-language-selector-ja-jp.conf ...
Installing new version of config file /etc/fonts/conf.avail/30-cjk-aliases.conf ...
Removing obsolete conffile /etc/fonts/conf.avail/69-language-selector-ko-kr.conf ...
Removing obsolete conffile /etc/fonts/conf.avail/29-language-selector-ko-kr.conf ...
Setting up whoopsie (0.1.32) ...
whoopsie start/running, process 4562
Setting up ubuntu-standard (1.267) ...
root at asdf:/etc# 

...I've replicated this three times in a row now on kvm guests,happy to
run any commands on this side and post results here if that would be
useful.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to shadow in Ubuntu.
https://bugs.launchpad.net/bugs/523896

Title:
  useradd: cannot lock /etc/passwd; try again later.

Status in “shadow” package in Ubuntu:
  Triaged
Status in “shadow” source package in Precise:
  Triaged
Status in “shadow” source package in Quantal:
  Triaged

Bug description:
  Binary package hint: postfix

  Ubuntu 9.10, via Update Manager.

  SOLUTION:

  Look for /etc/group.lock, /etc/passwd.lock and /etc/shadow.lock files
  and remove them.

  Be careful to only remove the files ending in 'lock' or else you might
  damage your system.

  Please do not add comments just containing "Me too", instead please provide any information that could indicate why the files were locked:
   * the list of locked files:
      ls /etc/passwd.lock /etc/shadow.lock /etc/group.lock /etc/gshadow.lock

   * check the /var/log/auth.log for any message that could indicate the
  failure of any other tool (prior to the failure which reported the
  locked file)

   * any abnormal operation on the machine (reset, shutdown while the
  computer is still running)

  ProblemType: Package
  Architecture: i386
  Date: Thu Feb 18 09:49:47 2010
  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: postfix 2.6.5-3
  ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
  SourcePackage: postfix
  Title: package postfix 2.6.5-3 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
  Uname: Linux 2.6.31-19-generic i686

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/523896/+subscriptions




More information about the foundations-bugs mailing list