From 26a9ea62f1aa48551d6fdf325120d0450c862142 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Fri, 24 Mar 2023 11:11:20 +0100 Subject: [PATCH] create-installimg: include systemd config for sshpassword support This should indeed be part of host-installer-startup, see https://github.com/xenserver/host-installer/pull/42 Will need to be reverted when that PR is merged. Signed-off-by: Yann Dirson --- .../etc/systemd/system/sshd.service.d/installer.conf | 5 +++++ .../etc/systemd/system/sshd.service.d/sshd_installer.conf | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 templates/installimg/8.2.updates/etc/systemd/system/sshd.service.d/installer.conf create mode 100644 templates/installimg/8.3.0/etc/systemd/system/sshd.service.d/sshd_installer.conf diff --git a/templates/installimg/8.2.updates/etc/systemd/system/sshd.service.d/installer.conf b/templates/installimg/8.2.updates/etc/systemd/system/sshd.service.d/installer.conf new file mode 100644 index 0000000..a68ce22 --- /dev/null +++ b/templates/installimg/8.2.updates/etc/systemd/system/sshd.service.d/installer.conf @@ -0,0 +1,5 @@ +[Unit] +ConditionKernelCommandLine=sshpassword + +[Service] +ExecStartPre=/bin/sh -c '/bin/sed -e "s/.*sshpassword=\([^ ]*\).*/root:\1/" /proc/cmdline | /sbin/chpasswd' diff --git a/templates/installimg/8.3.0/etc/systemd/system/sshd.service.d/sshd_installer.conf b/templates/installimg/8.3.0/etc/systemd/system/sshd.service.d/sshd_installer.conf new file mode 100644 index 0000000..a68ce22 --- /dev/null +++ b/templates/installimg/8.3.0/etc/systemd/system/sshd.service.d/sshd_installer.conf @@ -0,0 +1,5 @@ +[Unit] +ConditionKernelCommandLine=sshpassword + +[Service] +ExecStartPre=/bin/sh -c '/bin/sed -e "s/.*sshpassword=\([^ ]*\).*/root:\1/" /proc/cmdline | /sbin/chpasswd'