Fix script-user-add
This commit is contained in:
@@ -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[@]}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user