diff --git a/hdd/adduser.sh b/hdd/adduser.sh
index 4b103c370da233ea9472844961300910ffc45027..e77c00e537ce3ca19806dff2f9137f70cc5075d4 100755
--- a/hdd/adduser.sh
+++ b/hdd/adduser.sh
@@ -112,13 +112,12 @@ remove_group(){
 }
 
 remove_user(){
-
-    userDetail=$1
-    userName=$( echo $userDetail | cut -d':' -f1 );
+    local userDetail=$1
+    local userName=$( echo $userDetail | cut -d':' -f1 );
     echo $0": Removendo usuário "$userName" do passwd e shadow"
 
     #remove from passwd
-    temp=mktemp;
+    local temp=$(mktemp)
     sed "/^$userDetail:/d" /etc/passwd > $temp
     cp $temp /etc/passwd
     chown root:root /etc/passwd
@@ -126,7 +125,7 @@ remove_user(){
     rm $temp
 
     #remove from shadow
-    temp=mktemp;
+    local temp=$(mktemp)
     sed "/^$userName:/d" /etc/shadow > $temp
     cp $temp /etc/shadow
     chown root:shadow /etc/shadow