debian: insecure root password is only if plugin is empty

This commit is contained in:
Daniel Black 2017-12-29 11:25:42 +11:00 committed by Sergey Vojtovich
parent 88a9b23396
commit 1879b2b8df

View File

@ -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='';" | $MYSQL --skip-column-names )
ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and plugin='';" | $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