remove backslash

This commit is contained in:
Sangelo 2023-07-14 10:23:57 +02:00
parent 42b0869883
commit 19b19d071d

View file

@ -34,12 +34,12 @@ case "$1" in
echo "$USAGE" echo "$USAGE"
exit $E_BADARGS exit $E_BADARGS
fi fi
Q1="INSERT INTO usermgmt.users (username, name, description) VALUES ('\$2', '\$3', '\$4');" Q1="INSERT INTO usermgmt.users (username, name, description) VALUES ('$2', '$3', '$4');"
SQL="${Q1}" SQL="${Q1}"
PASSWORD=$(openssl rand -base64 12) PASSWORD=$(openssl rand -base64 12)
useradd -m -p "$PASSWORD" -s /bin/bash "\$2" useradd -m -p "$PASSWORD" -s /bin/bash "$2"
echo "$PASSWORD" >"/home/\$2/password.txt" echo "$PASSWORD" >"/home/$2/password.txt"
echo "This is your password. Please delete this file after saving the password." >>"/home/\$2/password.txt" echo "This is your password. Please delete this file after saving the password." >>"/home/$2/password.txt"
;; ;;
"delete") "delete")