Allow numbers in username

This commit is contained in:
Igor
2023-03-27 23:04:07 +02:00
committed by Igor Pečovnik
parent b850beb50a
commit 5de120edfe

View File

@@ -249,7 +249,7 @@ add_user()
while [ -f "/root/.not_logged_in_yet" ]; do
echo -e "\nPlease provide a username (eg. your first name): \c"
read -r -e username
if ! grep '^[a-zA-Z]*$' <<< "$username" > /dev/null ; then
if ! grep '^[a-zA-Z0-9]*$' <<< "$username" > /dev/null ; then
echo -e "\n\x1B[91mError\x1B[0m: illegal characters in username"
return
fi