List users without passwords as user@host, sorted.
This commit is contained in:
parent
b2dfc8789a
commit
e8495cea28
1 changed files with 2 additions and 2 deletions
|
@ -358,9 +358,9 @@ sub get_all_vars {
|
||||||
|
|
||||||
sub security_recommendations {
|
sub security_recommendations {
|
||||||
print "\n-------- Security Recommendations -------------------------------------------\n";
|
print "\n-------- Security Recommendations -------------------------------------------\n";
|
||||||
my @mysqlstatlist = `mysql $mysqllogin -Bse "SELECT user FROM mysql.user WHERE password = '' OR password IS NULL;"`;
|
my @mysqlstatlist = `mysql $mysqllogin -Bse "SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE password = '' OR password IS NULL;"`;
|
||||||
if (@mysqlstatlist) {
|
if (@mysqlstatlist) {
|
||||||
foreach my $line (@mysqlstatlist) {
|
foreach my $line (sort @mysqlstatlist) {
|
||||||
chomp($line);
|
chomp($line);
|
||||||
badprint "User '".$line."' has no password set.\n";
|
badprint "User '".$line."' has no password set.\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue