Password setup failsafe

This commit is contained in:
lemniskett 2020-11-08 22:42:18 +07:00
parent a3b9c1c3e5
commit fdcb3acf30

View File

@ -19,7 +19,11 @@ CHROOT_USER="$(cat /tmp/archbox_user)"
useradd -m $CHROOT_USER useradd -m $CHROOT_USER
gpasswd -a $CHROOT_USER wheel gpasswd -a $CHROOT_USER wheel
echo "Enter root password" echo "Enter root password"
passwd while true; do
passwd && break
done
echo "Enter $CHROOT_USER password" 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 sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' /etc/sudoers