From 070b3fe62a0f790fb793ed22cd9b539026fa0b1f Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 28 Nov 2019 13:00:49 +0100 Subject: Added option for sudo usr or not --- joes-arch-install.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/joes-arch-install.sh b/joes-arch-install.sh index 656b3e2..c58a9d7 100755 --- a/joes-arch-install.sh +++ b/joes-arch-install.sh @@ -726,7 +726,8 @@ $rtpwd sleep 2 ARCH_CHROOT_CMDS if [ "$isusr" = true ]; then -arch-chroot /mnt/arch << ARCH_CHROOT_CMDS + if [ "$isusrsudo" = true ]; then + arch-chroot /mnt/arch << ARCH_CHROOT_CMDS sleep 2 clear #===== V. CONFIGURING LINUX ======# @@ -737,6 +738,23 @@ arch-chroot /mnt/arch << ARCH_CHROOT_CMDS useradd -m -g wheel -s /bin/zsh $usr passwd $usr $usrpwd +$usrpwd + sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers + sleep 2 + exit +ARCH_CHROOT_CMDS + else + arch-chroot /mnt/arch << ARCH_CHROOT_CMDS + sleep 2 + clear + #===== V. CONFIGURING LINUX ======# + # # + # 9. Generating user # + # # + #=================================# + useradd -m -s /bin/zsh $usr + passwd $usr +$usrpwd $usrpwd sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers sleep 2 -- cgit v1.2.3