mysql_secure_installation correction 7

This commit is contained in:
Valentin 2024-02-23 16:39:00 +01:00
parent 9d38ac2f29
commit d0b507ae6a
1 changed files with 3 additions and 2 deletions

View File

@ -98,6 +98,7 @@ if [[ "$answer" == "y" ]]; then
echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}"
read -s db_root_password
echo
echo -e "${PURPLE}${BOLD}${db_root_password}${RESET}"
apt -y install expect
SECURE_MYSQL=$(expect -c "
set timeout 3
@ -109,9 +110,9 @@ if [[ "$answer" == "y" ]]; then
expect \"Change the root password? \\[Y/n\\]\"
send \"y\r\"
expect \"New password:\"
send \"$db_root_password\r\"
send \"${$db_root_password}\r\"
expect \"Re-enter new password:\"
send \"$db_root_password\r\"
send \"${$db_root_password}\r\"
expect \"Remove anonymous users?\"
send \"y\r\"
expect \"Disallow root login remotely?\"