Change settings for default quota. Add Password settings.
This commit is contained in:
parent
e02fdeffe3
commit
a7374f2cd4
@ -2410,8 +2410,8 @@ _array_index="timeout"
|
||||
_value=0
|
||||
_type="integer"
|
||||
echo "" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echo "# - Adjust configuration parameter '$_parameter' '$_array_index'" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echononl "Adjust configuration parameter '$_parameter' '$_array_index'.."
|
||||
|
||||
cat <<EOF >> $log_file
|
||||
@ -2441,6 +2441,39 @@ fi
|
||||
blank_line
|
||||
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "# - Set a default quota of 5 GB" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echononl "Set a default quota of 5 GB"
|
||||
|
||||
|
||||
cat <<EOF >> $log_file
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set files \\
|
||||
default_quota --value="1 GB"
|
||||
EOF
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set files \
|
||||
default_quota --value="1 GB" >> $log_file 2>&1
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error "For more informations see log output at '$log_file'."
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/no]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Interrupted ny user."
|
||||
fi
|
||||
|
||||
|
||||
blank_line
|
||||
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "# - Set background jobs to 'Cron'" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
@ -2487,6 +2520,137 @@ fi
|
||||
|
||||
|
||||
|
||||
# -----
|
||||
# - Password Policies
|
||||
# -----
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo -e "\033[37m\033[1mPassword Policies:\033[m"
|
||||
echo ""
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "" >> $log_file
|
||||
echo "# -----" >> $log_file
|
||||
echo "# - Password Policies:" >> $log_file
|
||||
echo "# -----" >> $log_file
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "# - Enforce passwords with at least one numeric character" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echononl "Enforce passwords with at least one numeric character.."
|
||||
|
||||
cat <<EOF >> $log_file
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \\
|
||||
enforceNumericCharacters --value="1"
|
||||
EOF
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \
|
||||
enforceNumericCharacters --value="1" >> $log_file 2>&1
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error "For more informations see log output at '$log_file'."
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/no]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Interrupted ny user."
|
||||
fi
|
||||
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "# - Enforce passwords with at least one special character" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echononl "Enforce passwords with at least one special character.."
|
||||
|
||||
cat <<EOF >> $log_file
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \\
|
||||
enforceSpecialCharacters --value="1"
|
||||
EOF
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \
|
||||
enforceSpecialCharacters --value="1" >> $log_file 2>&1
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error "For more informations see log output at '$log_file'."
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/no]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Interrupted ny user."
|
||||
fi
|
||||
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "# - Enforce passwords with at least one upper and lower case character" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echononl "Enforce passwords with at least one upper and lower case character.."
|
||||
|
||||
cat <<EOF >> $log_file
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \\
|
||||
enforceUpperLowerCase --value="1"
|
||||
EOF
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \
|
||||
enforceUpperLowerCase --value="1" >> $log_file 2>&1
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error "For more informations see log output at '$log_file'."
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/no]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Interrupted ny user."
|
||||
fi
|
||||
|
||||
|
||||
echo "" >> $log_file
|
||||
echo "# - Enforce passwords with a minimum length of 12 character" >> $log_file
|
||||
echo "# -" >> $log_file
|
||||
echononl "Enforce passwords with a minimum length of 12 character.."
|
||||
|
||||
cat <<EOF >> $log_file
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \\
|
||||
minLength --value="12"
|
||||
EOF
|
||||
sudo -u "$HTTP_USER" "$php_binary" "${INSTALL_DIR}/occ" config:app:set password_policy \
|
||||
minLength --value="12" >> $log_file 2>&1
|
||||
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
error "For more informations see log output at '$log_file'."
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/no]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Interrupted ny user."
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# -----
|
||||
# - Install/Enable some more nextcloud apps
|
||||
|
Loading…
Reference in New Issue
Block a user