Browse Source

Rework empty password mariadb users check.

Raphael Schneeberger 7 years ago
parent
commit
b8459a6422
2 changed files with 4 additions and 2 deletions
  1. 2 1
      install/hst-install-debian.sh
  2. 2 1
      install/hst-install-ubuntu.sh

+ 2 - 1
install/hst-install-debian.sh

@@ -1090,7 +1090,8 @@ if [ "$mysql" = 'yes' ]; then
     mysql -e "DELETE FROM mysql.user WHERE User=''"
     mysql -e "DROP DATABASE test" > /dev/null 2>&1
     mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
-    mysql -e "DELETE FROM mysql.user WHERE user='' OR authentication_string='';"
+    mysql -e "DELETE FROM mysql.user WHERE user='';"
+    mysql -e "DELETE FROM mysql.user WHERE password='' AND authentication_string='';"
 
     # Configuring phpMyAdmin
     if [ "$apache" = 'yes' ]; then

+ 2 - 1
install/hst-install-ubuntu.sh

@@ -1070,7 +1070,8 @@ if [ "$mysql" = 'yes' ]; then
     mysql -e "DELETE FROM mysql.user WHERE User=''"
     mysql -e "DROP DATABASE test" > /dev/null 2>&1
     mysql -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"
-    mysql -e "DELETE FROM mysql.user WHERE user='' OR authentication_string='';"
+    mysql -e "DELETE FROM mysql.user WHERE user='';"
+    mysql -e "DELETE FROM mysql.user WHERE password='' AND authentication_string='';"
 
     # Configuring phpMyAdmin
     if [ "$apache" = 'yes' ]; then