audit-labs/audit-tools

A collection of scripts, queries, and other goodies you can use in an audit.

clone: git clone https://gitbay.org/audit-labs/audit-tools.git

v1.0.0: databases/mysql/passwords.sql · raw

 1-- NOTE: Please review the server's "my.cnf" file for default values;
 2--   OR: run the "SHOW [GLOBAL | SESSION] VARIABLES" command(s) on the database.
 3
 4-- Authentication methods only
 5SELECT user, host, plugin FROM mysql.user;
 6
 7-- Default password configuration only
 8SHOW GLOBAL VARIABLES LIKE 'validate_password%';
 9SHOW VARIABLES LIKE 'validate_password%';
10
11-- Authentication methods and MySQL password configurations
12-- Reference: https://mariadb.com/kb/en/mysql-user-table/
13SELECT * FROM mysql.user