summaryrefslogtreecommitdiff
path: root/bin/debvm-create
diff options
context:
space:
mode:
Diffstat (limited to 'bin/debvm-create')
-rwxr-xr-xbin/debvm-create4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/debvm-create b/bin/debvm-create
index 0fffd70..eecc803 100755
--- a/bin/debvm-create
+++ b/bin/debvm-create
@@ -356,7 +356,9 @@ set -- \
"$@"
# allow password-less root login
-set -- '--customize-hook=passwd --root "$1" --delete root' "$@"
+# We would like to use passwd --root "$1" --delete here, but uses chroot() and
+# then attempts to load shared libraries, which is doomed in the foreign case.
+set -- '--customize-hook=sed -i -e "1s/^root:\\*:/root::/" "$1/etc/shadow"' "$@"
if test "$INITSYSTEM" = systemd && ! check_skip systemdnetwork; then
# dhcp on all network interfaces, and add a dns resolver