[Pkg-shadow-devel] Bug#353813: passwd.config fails when root password is '!'

Vagrant Cascadian vagrant+bugs at freegeek.org
Tue Feb 21 04:12:50 UTC 2006


Package: passwd
Version: 4.0.14-6
Severity: important
Tags: patch

i found that when root password is set to '!', passwd.config seems to
fail with the error message:

Shadow passwords are now on.
/var/lib/dpkg/info/passwd.config: line 41: [: too many arguments
/var/lib/dpkg/info/passwd.config: line 41: [: too many arguments

the following patch gets it to work, and is a little more POSIX, to
boot.

--- passwd.config.old   2006-02-20 20:02:27.079896858 -0800
+++ passwd.config       2006-02-20 20:01:22.265376554 -0800
@@ -38,8 +38,8 @@
        fi
        
        if [ -e /etc/shadow ] && \
-          [ "`grep ^root: /etc/shadow | cut -d : -f 2`" -a \
-            "`grep ^root: /etc/shadow | cut -d : -f 2`" != '*' ]; then
+          [ "`grep ^root: /etc/shadow | cut -d : -f 2`" ] && \
+          [ "`grep ^root: /etc/shadow | cut -d : -f 2`" != '*' ]; then
                return 0
        fi

live well,
  vagrant




More information about the Pkg-shadow-devel mailing list