1
0
mirror of https://github.com/tommytran732/Arch-Setup-Script synced 2024-11-21 17:11:34 -05:00

Add user creation

Based on the changes made in https://github.com/patarapolw/arch-btrfs/blob/main/scripts/03-root-install.sh
This commit is contained in:
TommyTran732 2021-07-25 06:48:46 +00:00 committed by tommytran732
parent 1f9c0451b7
commit 75215fe0a7
No known key found for this signature in database
GPG Key ID: 060B29EB996BD9F2

View File

@ -279,9 +279,15 @@ arch-chroot /mnt /bin/bash -e <<EOF
EOF
# Setting root password.
echo "Setting root password."
arch-chroot /mnt /bin/passwd
#Creating Wheel user
read -r -p "Please choose an admin user to create: " USER
# Create user
echo "Creating user $USER"
useradd -m -g wheel $USER
passwd $USER
sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g' /etc/sudoers
# Enabling auto-trimming service.
systemctl enable fstrim.timer --root=/mnt &>/dev/null