Skip to content

Instantly share code, notes, and snippets.

@nirbhayc
Created June 20, 2017 21:10
Show Gist options
  • Save nirbhayc/0193be4dc8c3aa2bae6684512bb4a222 to your computer and use it in GitHub Desktop.
Save nirbhayc/0193be4dc8c3aa2bae6684512bb4a222 to your computer and use it in GitHub Desktop.
(Blog) simple_password_check plugin
MariaDB [test]> INSTALL SONAME 'simple_password_check';
Query OK, 0 rows affected (0.04 sec)
MariaDB [test]> SELECT VARIABLE_NAME, DEFAULT_VALUE, VARIABLE_COMMENT FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME LIKE 'SIMPLE_PASSWORD%'\G
*************************** 1. row ***************************
VARIABLE_NAME: SIMPLE_PASSWORD_CHECK_DIGITS
DEFAULT_VALUE: 1
VARIABLE_COMMENT: Minimal required number of digits
*************************** 2. row ***************************
VARIABLE_NAME: SIMPLE_PASSWORD_CHECK_LETTERS_SAME_CASE
DEFAULT_VALUE: 1
VARIABLE_COMMENT: Minimal required number of letters of the same letter case.This limit is applied separately to upper-case and lower-case letters
*************************** 3. row ***************************
VARIABLE_NAME: SIMPLE_PASSWORD_CHECK_OTHER_CHARACTERS
DEFAULT_VALUE: 1
VARIABLE_COMMENT: Minimal required number of other (not letters or digits) characters
*************************** 4. row ***************************
VARIABLE_NAME: SIMPLE_PASSWORD_CHECK_MINIMAL_LENGTH
DEFAULT_VALUE: 8
VARIABLE_COMMENT: Minimal required password length
4 rows in set (0.00 sec)
MariaDB [test]> SET PASSWORD = PASSWORD('abc');
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment