|
|
@@ -41,13 +41,16 @@ check_hestia_demo_mode
|
|
|
# Action #
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
-# Deleting '!' in front of the password
|
|
|
-/usr/sbin/usermod --unlock $user
|
|
|
-
|
|
|
-# Unsuspending ftp accounts
|
|
|
-for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
|
|
|
- /usr/sbin/usermod --unlock $ftp 2>/dev/null
|
|
|
-done
|
|
|
+# Do not restrict access to SFTP/FTP/SSH if POLICY_USER_VIEW_SUSPENDED is set to yes
|
|
|
+if [ -z "$POLICY_USER_VIEW_SUSPENDED" ] || [ "$POLICY_USER_VIEW_SUSPENDED" = 'no' ]; then
|
|
|
+ # Deleting '!' in front of the password
|
|
|
+ /usr/sbin/usermod --unlock $user
|
|
|
+
|
|
|
+ # Unsuspending ftp accounts
|
|
|
+ for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
|
|
|
+ /usr/sbin/usermod --unlock $ftp 2>/dev/null
|
|
|
+ done
|
|
|
+fi
|
|
|
|
|
|
# Changing suspend value
|
|
|
update_user_value "$user" '$SUSPENDED' 'no'
|