Update easy-arch.sh

Now will ask for passwd.
This commit is contained in:
Cyfraka 2021-11-07 20:05:12 +01:00 committed by GitHub
parent 96b047eaf6
commit 93a6baf961
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -321,7 +321,10 @@ arch-chroot /mnt /bin/passwd
# Setting user password. # Setting user password.
if [ -n "$username" ]; then if [ -n "$username" ]; then
print "Adding $username with root privilege." print "Adding $username with root privilege."
useradd -m -G wheel "$username" useradd -m "$username"
usermod -aG wheel "$username"
echo "Setting user password for $username."
passwd $username
echo "$username ALL=(ALL) ALL" >> /etc/sudoers.d/"$username" echo "$username ALL=(ALL) ALL" >> /etc/sudoers.d/"$username"
print "Setting user password for $username." print "Setting user password for $username."
arch-chroot /mnt /bin/passwd "$username" arch-chroot /mnt /bin/passwd "$username"