#!/bin/bash
TARGET="$1"
HOSTNAME="$2"
ROOTPW="$3"
(printf "%s\n" "$ROOTPW"; sleep .2; printf "%s\n" "$ROOTPW") \
 | /usr/sbin/chroot "$TARGET" /usr/bin/passwd root
