From 19b19d071dc53b3fae6f128935303c9790ec9cce Mon Sep 17 00:00:00 2001 From: Sangelo Date: Fri, 14 Jul 2023 10:23:57 +0200 Subject: [PATCH] remove backslash --- management/user-mgmt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/management/user-mgmt.sh b/management/user-mgmt.sh index 9af514e..f461aaa 100755 --- a/management/user-mgmt.sh +++ b/management/user-mgmt.sh @@ -34,12 +34,12 @@ case "$1" in echo "$USAGE" exit $E_BADARGS 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}" PASSWORD=$(openssl rand -base64 12) - useradd -m -p "$PASSWORD" -s /bin/bash "\$2" - echo "$PASSWORD" >"/home/\$2/password.txt" - echo "This is your password. Please delete this file after saving the password." >>"/home/\$2/password.txt" + useradd -m -p "$PASSWORD" -s /bin/bash "$2" + echo "$PASSWORD" >"/home/$2/password.txt" + echo "This is your password. Please delete this file after saving the password." >>"/home/$2/password.txt" ;; "delete")