Fix creating new user when already exists

This commit is contained in:
joeri 2024-08-03 13:25:08 +02:00
parent e2cc046e3a
commit 368c261a4c

View file

@ -57,6 +57,7 @@ create_new_user() {
# Check if the username already exists
if id "$USERNAME" &>/dev/null; then
echo "User $USERNAME already exists!"
create_new_user
else
echo "Enter the password for the new user: "
read -s PASSWORD