Use -G flag in useradd.

This commit is contained in:
unknown 2022-01-03 14:41:00 +01:00
parent 42c03f62f1
commit 55a36d347a
No known key found for this signature in database
GPG Key ID: 4A76C276C36475F7

View File

@ -57,7 +57,7 @@ preinstallmsg() { \
adduserandpass() { \ adduserandpass() { \
# Adds user `$name` with password $pass1. # Adds user `$name` with password $pass1.
dialog --infobox "Adding user \"$name\"..." 4 50 dialog --infobox "Adding user \"$name\"..." 4 50
useradd -m -g wheel -s /bin/zsh "$name" >/dev/null 2>&1 || useradd -m -G wheel -s /bin/zsh "$name" >/dev/null 2>&1 ||
usermod -a -G wheel "$name" && mkdir -p /home/"$name" && chown "$name":wheel /home/"$name" usermod -a -G wheel "$name" && mkdir -p /home/"$name" && chown "$name":wheel /home/"$name"
export repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name":wheel "$(dirname "$repodir")" export repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name":wheel "$(dirname "$repodir")"
echo "$name:$pass1" | chpasswd echo "$name:$pass1" | chpasswd