unset root password in xen-create-image
[invirt/packages/invirt-autoinstaller.git] / common / usr / lib / xen-tools / debian.d / 36-clear-root-password
diff --git a/common/usr/lib/xen-tools/debian.d/36-clear-root-password b/common/usr/lib/xen-tools/debian.d/36-clear-root-password
new file mode 100755 (executable)
index 0000000..e3ed53d
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+#  This script unsets the root password, so the VM owner can log in at
+#  the console.
+#
+
+prefix=$1
+
+if [ -e /usr/lib/xen-tools/common.sh ]; then
+    . /usr/lib/xen-tools/common.sh
+else
+    . ./hooks/common.sh
+fi
+
+logMessage Script $0 starting
+
+chroot ${prefix} passwd root -d
+
+logMessage Script $0 finished