fix: chown parent directory

This commit is contained in:
Jackson Law 2020-04-24 02:54:39 -07:00 committed by GitHub
parent 268943c9c4
commit 7516755106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ adduserandpass() { \
dialog --infobox "Adding user \"$name\"..." 4 50 dialog --infobox "Adding user \"$name\"..." 4 50
useradd -m -g wheel -s /bin/bash "$name" >/dev/null 2>&1 || useradd -m -g wheel -s /bin/bash "$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"
repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name":wheel "$repodir" repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name":wheel $(dirname "$repodir")
echo "$name:$pass1" | chpasswd echo "$name:$pass1" | chpasswd
unset pass1 pass2 ;} unset pass1 pass2 ;}