[Pkg-shadow-devel] Bug#614946: passwd: /usr/sbin/groupadd fails because it cannot rename /etc/group.
Jeremy Sowden
jeremy at azazel.net
Thu Feb 24 11:56:18 UTC 2011
Package: passwd
Version: 1:4.1.4.2+svn3283-3
Severity: normal
aptitude failed to install the pcscd package failed because the postinst
script could not add the pcscd group. It turned out that /usr/sbin/groupadd
was failing, because it could not rename /etc/group+ to /etc/group and I had to
edit /etc/group manually. I have reproduced the problem below:
[root at ulthar:/etc] # groupadd grptest
groupadd: failure while writing changes to /etc/group
[root at ulthar:/etc] # strace -e rename groupadd grptest
rename("/etc/group+", "/etc/group") = -1 EBUSY (Device or resource busy)
groupadd: failure while writing changes to /etc/group
lsof shows nothing:
[root at ulthar:/etc] # lsof /etc/group
Move and patch also fail:
[root at ulthar:/etc] # mv group+ group
mv: cannot move `group+' to `group': Device or resource busy
[root at ulthar:/etc] # mv group /tmp/
mv: cannot move `group' to `/tmp/group': Device or resource busy
[root at ulthar:/etc] # diff -u group group+
--- group 2011-02-24 11:50:32.000000000 +0000
+++ group+ 2011-02-24 11:50:41.000000000 +0000
@@ -70,3 +70,4 @@
cl-builder:x:127:
ntpd:x:128:
pcscd:x:129:
+grptest:x:1004:
[root at ulthar:/etc] # diff -u group group+ | patch -p0
patching file group
patch: **** Can't rename file /root/tmp/pogtvZ4Y to group : Device or resource busy
Editing the file in-place works as expected:
[root at ulthar:/etc] # tail -1 group+ >> group
[root at ulthar:/etc] # diff group group+
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (900, 'stable'), (90, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages passwd depends on:
ii debianutils 3.4.4 Miscellaneous utilities specific t
ii libc6 2.11.2-11 Embedded GNU C Library: Shared lib
ii libpam-modules 1.1.1-6.1 Pluggable Authentication Modules f
ii libpam0g 1.1.1-6.1 Pluggable Authentication Modules l
ii libselinux1 2.0.96-1 SELinux runtime shared libraries
passwd recommends no packages.
passwd suggests no packages.
-- debconf information:
passwd/password-mismatch:
passwd/username: azazel
passwd/password-empty:
passwd/user-uid:
passwd/shadow: true
passwd/username-bad:
passwd/user-fullname:
passwd/make-user: true
passwd/title:
More information about the Pkg-shadow-devel
mailing list