mirror of
https://github.com/tommytran732/Arch-Setup-Script
synced 2024-11-09 20:21: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:
parent
1f9c0451b7
commit
75215fe0a7
12
install.sh
12
install.sh
@ -279,9 +279,15 @@ arch-chroot /mnt /bin/bash -e <<EOF
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Setting root password.
|
#Creating Wheel user
|
||||||
echo "Setting root password."
|
read -r -p "Please choose an admin user to create: " USER
|
||||||
arch-chroot /mnt /bin/passwd
|
|
||||||
|
# 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.
|
# Enabling auto-trimming service.
|
||||||
systemctl enable fstrim.timer --root=/mnt &>/dev/null
|
systemctl enable fstrim.timer --root=/mnt &>/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user