Username downcased because of quirks

This commit is contained in:
Blade of Darkness 2021-01-03 15:31:52 +01:00
parent 35cff1a7b9
commit 79e7cfb13f
2 changed files with 11 additions and 5 deletions

View File

@ -24,13 +24,16 @@ case $1 in
usage; error_exit "unknown option $1" ;;
*)
$(sudo grep -qiw $1 $BANNED) && error_exit "$1 is on the ban list!"
# username passed lowercased
username=$(echo $1 | tr '[:upper:]' '[:lower:]')
#adding new user
makeuser_no_ansible $1 $2
add_account_recovery $1 $2
makeuser_no_ansible $username $2
add_account_recovery $username $2
#Thunix specific section
makeuser_ansible $1 $2
makeuser_ansible $username $2
# End Thunix specific section
;;

View File

@ -24,9 +24,12 @@ case $1 in
*)
$(sudo grep -qiw $1 $BANNED) && error_exit "$1 is on the ban list!"
# username passed lowercased
username=$(echo $1 | tr '[:upper:]' '[:lower:]')
#adding new user
makeuser_no_ansible $1 $2
add_account_recovery $1 $2
makeuser_no_ansible $username $2
add_account_recovery $username $2
;;