Explorar el Código

Merge pull request #612 from teryanik/master

Fix bug with "user already exists"
Serghey Rodin hace 9 años
padre
commit
745769dab8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      bin/v-add-user

+ 1 - 1
bin/v-add-user

@@ -22,7 +22,7 @@ source $VESTA/func/main.sh
 source $VESTA/conf/vesta.conf
 
 is_user_free() {
-    check_sysuser=$(cut -f 1 -d : /etc/passwd | grep -w "$user" )
+    check_sysuser=$(cut -f 1 -d : /etc/passwd | grep "^$user$" )
     if [ ! -z "$check_sysuser" ] || [ -e "$USER_DATA" ]; then
         check_result $E_EXISTS "user $user exists"
     fi