Update random password code
authorMichael Prokop <devnull@localhost>
Thu, 25 Sep 2008 15:38:50 +0000 (17:38 +0200)
committerMichael Prokop <devnull@localhost>
Thu, 25 Sep 2008 15:38:50 +0000 (17:38 +0200)
autoconfig.functions
debian/changelog

index debf31f..5751634 100755 (executable)
@@ -1346,7 +1346,11 @@ if checkbootparam ssh ; then
    einfo "Bootoption ssh found, trying to set password for user grml."
    eindent
    if [ -z "$SSH_PASSWD" ] ; then
    einfo "Bootoption ssh found, trying to set password for user grml."
    eindent
    if [ -z "$SSH_PASSWD" ] ; then
-      if [ -x /usr/bin/pwgen ] ; then
+      if [ -x /usr/bin/apg ] ; then
+         SSH_PASSWD="$(apg -M NL -a 0 -m 8 -x 12 -n 1)"
+      elif [ -x /usr/bin/gpw ] ; then
+         SSH_PASSWD="$(gpw 1)"
+      elif [ -x /usr/bin/pwgen ] ; then
          SSH_PASSWD="$(pwgen -1 8)"
       elif [ -x /usr/bin/hexdump ] ; then
          SSH_PASSWD="$(dd if=/dev/urandom bs=14 count=1 2>/dev/null | hexdump | awk '{print $3 $4}')"
          SSH_PASSWD="$(pwgen -1 8)"
       elif [ -x /usr/bin/hexdump ] ; then
          SSH_PASSWD="$(dd if=/dev/urandom bs=14 count=1 2>/dev/null | hexdump | awk '{print $3 $4}')"
index 66b1844..6dba290 100644 (file)
@@ -1,7 +1,7 @@
 grml-autoconfig (0.8.13) unstable; urgency=low
 
   * Use random password if bootoption 'ssh' doesn't have an option.
 grml-autoconfig (0.8.13) unstable; urgency=low
 
   * Use random password if bootoption 'ssh' doesn't have an option.
-    Thanks for the idea to Marc Haber!
+    Thanks to Michael Holzt and Marc Haber!
   * Update swedish language settings, thanks again to Martin Karresand.
 
  -- Michael Prokop <mika@grml.org>  Thu, 25 Sep 2008 17:25:30 +0200
   * Update swedish language settings, thanks again to Martin Karresand.
 
  -- Michael Prokop <mika@grml.org>  Thu, 25 Sep 2008 17:25:30 +0200