Commit 7e3c1e02 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-14796 - debian: insecure root password is only if plugin is empty

Enumerate plugins that use password field.
parent 1879b2b8
......@@ -65,7 +65,7 @@ function check_root_accounts() {
logger -p daemon.info -i -t$0 "Checking for insecure root accounts."
ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and plugin='';" | $MYSQL --skip-column-names )
ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and plugin in ('', 'mysql_native_password', 'mysql_old_password');" | $MYSQL --skip-column-names )
if [ "$ret" -ne "0" ]; then
logger -p daemon.warn -i -t$0 "WARNING: mysql.user contains $ret root accounts without password!"
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment