Fix script-user-add

This commit is contained in:
2021-10-22 15:34:38 -04:00
parent fc39695365
commit 87b3c9b211
2 changed files with 6 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# This script will add scripts-* to the PATH # This script will add scripts-* to the PATH and the manual to each user's Desktop
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 [[ -f functions ]] && . functions || exit 1

View File

@@ -14,6 +14,11 @@ echo "$@"
useradd_cmd=("useradd" "-m" "-U") useradd_cmd=("useradd" "-m" "-U")
if id -u "$username"; then
ask_ok "User $username exists. Run script-user-remove?" || exit $?
script-user-remove "$username"
fi
ask_ok "Create user $username with password $password?" || exit $? ask_ok "Create user $username with password $password?" || exit $?
restore="no" restore="no"