Jaap Marcus 2 лет назад
Родитель
Сommit
84f3eb6a58
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      bin/v-add-user-ssh-jail
  2. 1 0
      func/rebuild.sh

+ 1 - 0
bin/v-add-user-ssh-jail

@@ -51,6 +51,7 @@ if [ -d "/home/$user" ]; then
 	chown root:root /home/$user
 fi
 
+# Prevent from enabling for users hen rssh or nologin is enabled
 user_str=$(grep "^$user:" /etc/passwd | egrep "rssh|nologin")
 if [ -n "$user_str" ]; then
 	exit

+ 1 - 0
func/rebuild.sh

@@ -126,6 +126,7 @@ rebuild_user_conf() {
 	chown root:root $HOMEDIR/$user/conf
 
 	$BIN/v-add-user-sftp-jail "$user"
+	# Check if SHELL_JAIL_ENABLED
 	if [ "$SHELL_JAIL_ENABLED" == "yes" ]; then
 		$BIN/v-add-user-ssh-jail "$user"
 	fi