From 4b93866392cd79c61a2beffead6f899b4e37a416 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Mon, 8 Feb 2021 19:01:57 +0100 Subject: [PATCH] set user password with passwd, chpasswd does not work for some reason --- bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap b/bootstrap index b4f686e..a2d57ba 100755 --- a/bootstrap +++ b/bootstrap @@ -181,14 +181,14 @@ set_user() { user_name="$(get_value "user_name" "username")" local user_pw - user_pw="$(get_value "user_pw" "user password")" + user_pw="$(get_value "user_pw" "user password" 1)" chroot /mnt /bin/env -i \ user_name="$user_name" \ user_pw="$user_pw" \ /bin/bash <<"EOT" useradd --groups wheel --create-home --shell /bin/bash --user-group $user_name -echo "$user_name:$user_pw" | chpasswd +echo -e "$user_pw\n$user_pw" | passwd "$user_name" EOT }