diff --git a/bin/v-suspend-user b/bin/v-suspend-user index bd9ad7f92..1f15dedc5 100755 --- a/bin/v-suspend-user +++ b/bin/v-suspend-user @@ -39,7 +39,7 @@ fi /usr/sbin/usermod --lock $user # 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 done diff --git a/bin/v-unsuspend-user b/bin/v-unsuspend-user index df574808c..6173092a5 100755 --- a/bin/v-unsuspend-user +++ b/bin/v-unsuspend-user @@ -38,7 +38,7 @@ fi /usr/sbin/usermod --unlock $user # 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 done