Fix script-files-permissions-set

This commit is contained in:
2021-10-22 16:01:25 -04:00
parent 0aebe9073a
commit 4bace617ef
2 changed files with 6 additions and 5 deletions

View File

@@ -34,9 +34,6 @@ ask_ok "Make user $username an admin?" && \
useradd_cmd+=("-G" "$group_str")
useradd_cmd+=("$username")
echo "Command: ${useradd_cmd[*]}"
"${useradd_cmd[@]}"
echo "$username":"$password" | chpasswd
if [[ "$restore" == "yes" ]]; then
if rsync -av --progress=info2 /mnt/array/home-retired/"$username" /home/"$username"; then
@@ -45,6 +42,10 @@ if [[ "$restore" == "yes" ]]; then
fi
fi
echo "Command: ${useradd_cmd[*]}"
"${useradd_cmd[@]}"
echo "$username":"$password" | chpasswd
if [[ "$samba" == "yes" ]]; then
(echo "$password"; echo "$password") | smbpasswd -a -s "$username"
fi