[issue363] grml-debootstrap: please retry setting the root password until it succeeds

Wolfgang Karall bts at bts.grml.org
Fri Dec 14 10:12:14 CET 2007


New submission from Wolfgang Karall <spiney at spiney.org>:

When misspelling the root password, the scripts ignores the error and no root
password gets set.

Something like the following should do the trick, feel free to issue some pretty
warning message inside the loop. :)

--- /etc/debootstrap/chroot-script.orig 2007-12-14 10:06:04.835720597 +0100
+++ /etc/debootstrap/chroot-script      2007-12-14 10:06:37.007592595 +0100
@@ -252,7 +252,7 @@ passwords() {
   else
      echo "Setting password for user root:"
      set +e # do not exit if passwd returns error due to missmatching passwords
-     passwd
+     until passwd; do :; done
      echo ""
      set -e # restore default behaviour again
   fi

----------
messages: 1017
nosy: spiney
priority: wish
status: unread
title: grml-debootstrap: please retry setting the root password until it succeeds

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue363>
_____________________________________



More information about the Bugs-changes mailing list