|
@@ -42,14 +42,16 @@ check_hestia_demo_mode
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
# Action #
|
|
# Action #
|
|
|
#----------------------------------------------------------#
|
|
#----------------------------------------------------------#
|
|
|
-
|
|
|
|
|
-# Adding '!' in front of the password
|
|
|
|
|
-/usr/sbin/usermod --lock $user
|
|
|
|
|
-
|
|
|
|
|
-# Suspending ftp accounts
|
|
|
|
|
-for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
|
|
|
|
|
- /usr/sbin/usermod --lock $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
|
|
|
|
|
+ # Adding '!' in front of the password
|
|
|
|
|
+ /usr/sbin/usermod --lock $user
|
|
|
|
|
+
|
|
|
|
|
+ # Suspending ftp accounts
|
|
|
|
|
+ for ftp in $(grep "^${user}_" /etc/passwd |cut -f 1 -d : ); do
|
|
|
|
|
+ /usr/sbin/usermod --lock $ftp 2>/dev/null
|
|
|
|
|
+ done
|
|
|
|
|
+fi
|
|
|
|
|
|
|
|
# Suspending web domains
|
|
# Suspending web domains
|
|
|
if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
|
|
if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
|