Skip to content

Commit 8194ee8

Browse files
committed
fixed suspend/unsuspend issues
1 parent 930290f commit 8194ee8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/v-suspend-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fi
3939
/usr/sbin/usermod --lock $user
4040

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

bin/v-unsuspend-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fi
3838
/usr/sbin/usermod --unlock $user
3939

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

0 commit comments

Comments
 (0)