From fdcb3acf30c2119703c8bccc1f64567728cbdcc1 Mon Sep 17 00:00:00 2001 From: lemniskett Date: Sun, 8 Nov 2020 22:42:18 +0700 Subject: [PATCH] Password setup failsafe --- chroot_setup.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chroot_setup.bash b/chroot_setup.bash index 3e81f3f..7032a91 100755 --- a/chroot_setup.bash +++ b/chroot_setup.bash @@ -19,7 +19,11 @@ CHROOT_USER="$(cat /tmp/archbox_user)" useradd -m $CHROOT_USER gpasswd -a $CHROOT_USER wheel echo "Enter root password" -passwd +while true; do + passwd && break +done echo "Enter $CHROOT_USER password" -passwd $CHROOT_USER +while true; do + passwd $CHROOT_USER && break +done sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers