Przeglądaj źródła

fixed suspend/unsuspend issues

Serghey Rodin 10 lat temu
rodzic
commit
8194ee854f
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      bin/v-suspend-user
  2. 1 1
      bin/v-unsuspend-user

+ 1 - 1
bin/v-suspend-user

@@ -39,7 +39,7 @@ fi
 /usr/sbin/usermod --lock $user
 /usr/sbin/usermod --lock $user
 
 
 # Suspending ftp accounts
 # Suspending ftp accounts
-for ftp in $(grep ^$user_.* /etc/passwd| cut -f 1 -d : ); do
+for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
     /usr/sbin/usermod --lock $ftp 2>/dev/null
     /usr/sbin/usermod --lock $ftp 2>/dev/null
 done
 done
 
 

+ 1 - 1
bin/v-unsuspend-user

@@ -38,7 +38,7 @@ fi
 /usr/sbin/usermod --unlock $user
 /usr/sbin/usermod --unlock $user
 
 
 # Unsuspending ftp accounts
 # Unsuspending ftp accounts
-for ftp in $(grep ^$user_.* /etc/passwd| cut -f 1 -d : ); do
+for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
     /usr/sbin/usermod --unlock $ftp 2>/dev/null
     /usr/sbin/usermod --unlock $ftp 2>/dev/null
 done
 done