From 47c3ff91f9081c93e3afff4ab4a9f5c59faea735 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 9 Oct 2024 22:55:09 +0200 Subject: [PATCH] fix: Remove extra quote --- samba.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samba.sh b/samba.sh index 52c2fba..41171c2 100644 --- a/samba.sh +++ b/samba.sh @@ -48,11 +48,11 @@ add_user() { # Check if the user is a samba user if pdbedit -s "$cfg" -L | grep -q "^$username:"; then # if the user is a samba user, change its password - echo -e "$password\n$password" | smbpasswd -c "$cfg" -s "$username" " > /dev/null || { echo "Failed to update Samba password for $username"; return 1; } + echo -e "$password\n$password" | smbpasswd -c "$cfg" -s "$username" > /dev/null || { echo "Failed to update Samba password for $username"; return 1; } [[ "$username" != "samba" ]] && echo "Password for existing Samba user $username has been updated." else # if the user is not a samba user, create it and set a password - echo -e "$password\n$password" | smbpasswd -a -c "$cfg" -s "$username" " > /dev/null || { echo "Failed to add Samba user $username"; return 1; } + echo -e "$password\n$password" | smbpasswd -a -c "$cfg" -s "$username" > /dev/null || { echo "Failed to add Samba user $username"; return 1; } [[ "$username" != "samba" ]] && echo "User $username has been added to Samba and password set." fi }