Fix script-user-add

This commit is contained in:
2021-10-22 15:20:15 -04:00
parent a11faac581
commit 9369082968

View File

@@ -22,12 +22,14 @@ if [[ -d /mnt/array/home-retired/"$username" ]]; then
fi
ask_ok "Make user $username an admin?" && \
useradd_cmd+=("-G" "wheel")
group_str="wheel"
ask_ok "Enable shared file access for user $username?" && \
useradd_cmd+=("-G" "smbgrp") && \
group_str+=",smbgrp" && \
(echo "$password"; echo "$password") | smbpasswd -a -s "$username"
useradd_cmd=("-G" "$group_str")
useradd_cmd+=("$username")
echo "Command: ${useradd_cmd[*]}"
"${useradd_cmd[@]}"