From be235fa8d4d19e2da84132911a0ff29558f5c59c Mon Sep 17 00:00:00 2001 From: Matt C Date: Thu, 24 Feb 2022 22:43:16 -0500 Subject: [PATCH] add user as basically the last thing we do --- citrine.internal.sh | 77 ++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/citrine.internal.sh b/citrine.internal.sh index c67a0e3..ed48b62 100755 --- a/citrine.internal.sh +++ b/citrine.internal.sh @@ -318,45 +318,6 @@ fi echo "127.0.0.1 ${HOSTNAME}.localdomain ${HOSTNAME}" >> /mnt/etc/hosts clear -inf "Set a password for root" -done="nope" -while [[ "$done" == "nope" ]]; do - passbox "Please enter root password" - passInit="$pass" - passbox "Please confirm root password" - passConf="$pass" - if [[ "$passInit" == "$passConf" ]]; then - done="yep" - else - dumptitle "Password error" - dump "Passwords do not match. Please try again." - fi -done -arch-chroot /mnt usermod --password $(echo ${pass} | openssl passwd -1 -stdin) ${UN} - -msgbox "Your username" -UN="$msgdat" -arch-chroot /mnt useradd -m -G wheel -s /bin/bash ${UN} -inf "Set password for ${UN}" -done="nope" -while [[ "$done" == "nope" ]]; do - passbox "Please enter password for ${UN}" - passInit="$pass" - passbox "Please confirm password for ${UN}" - passConf="$pass" - if [[ "$passInit" == "$passConf" ]]; then - done="yep" - else - dumptitle "Password error" - dump "Passwords do not match. Please try again." - fi -done -arch-chroot /mnt usermod --password $(echo ${pass} | openssl passwd -1 -stdin) ${UN} - -echo >> /mnt/etc/sudoers -echo "# Enabled by Crystalinstall (citrine)" >> /mnt/etc/sudoers -echo "%wheel ALL=(ALL) ALL" >> /mnt/etc/sudoers -echo "Defaults pwfeedback" >> /mnt/etc/sudoers arch-chroot /mnt systemctl enable NetworkManager arch-chroot /mnt pacman-key --init @@ -501,7 +462,45 @@ else fi arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg +inf "Set a password for root" +done="nope" +while [[ "$done" == "nope" ]]; do + passbox "Please enter root password" + passInit="$pass" + passbox "Please confirm root password" + passConf="$pass" + if [[ "$passInit" == "$passConf" ]]; then + done="yep" + else + dumptitle "Password error" + dump "Passwords do not match. Please try again." + fi +done +arch-chroot /mnt usermod --password $(echo ${pass} | openssl passwd -1 -stdin) ${UN} + +msgbox "Your username" +UN="$msgdat" +arch-chroot /mnt useradd -m -G wheel -s /bin/bash ${UN} +inf "Set password for ${UN}" +done="nope" +while [[ "$done" == "nope" ]]; do + passbox "Please enter password for ${UN}" + passInit="$pass" + passbox "Please confirm password for ${UN}" + passConf="$pass" + if [[ "$passInit" == "$passConf" ]]; then + done="yep" + else + dumptitle "Password error" + dump "Passwords do not match. Please try again." + fi +done +arch-chroot /mnt usermod --password $(echo ${pass} | openssl passwd -1 -stdin) ${UN} +echo >> /mnt/etc/sudoers +echo "# Enabled by Crystalinstall (citrine)" >> /mnt/etc/sudoers +echo "%wheel ALL=(ALL) ALL" >> /mnt/etc/sudoers +echo "Defaults pwfeedback" >> /mnt/etc/sudoers inf "Installation should now be complete."