From eefaaecddd26080e88dbb0cbabdd4b8e7d5a9351 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 8 Sep 2021 14:31:08 +0200 Subject: Allow for empty password for the live and root accounts --- liveinit.tpl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'liveinit.tpl') diff --git a/liveinit.tpl b/liveinit.tpl index 1eaba1d..e25bf9b 100644 --- a/liveinit.tpl +++ b/liveinit.tpl @@ -106,6 +106,11 @@ HNMAC_ALLOWED="YES" INTERFACE="" NFSHOST="" +# Password handling, assign random initialization: +DEFPW="7af0aed2-d900-4ed8-89f0" +ROOTPW=$DEFPW +LIVEPW=$DEFPW + # Max wait time for DHCP client to configure an interface: DHCPWAIT=20 @@ -1162,20 +1167,28 @@ EOT fi fi - if [ ! -z "$LIVEPW" ]; then + if [ -n "$LIVEPW" ] && [ "$LIVEPW" != "${DEFPW}" ]; then # User entered a custom live password on the boot commandline: echo "${MARKER}: Changing password for user '${LIVEUID}'." chroot /mnt/overlay /usr/sbin/chpasswd <