cracklib_password_check

You are viewing an old version of this article. View the current version here.
MariaDB starting with 10.1.2

The cracklib_password_check plugin was introduced in MariaDB 10.1.2

The plugin is not available on Debian/Ubuntu builds before Jessie, as it requires cracklib 2.9.0 (see MDEV-7305).

CrackLib is a password strength checking library. It is installed by default in many Linux distributions and is invoked automatically (by pam_cracklib.so) whenever the user login password is modified. Now, with the cracklib_password_check password validation plugin, one can also use it to check MariaDB account passwords.

The plugin is not enabled by default. To enable it, run:

INSTALL SONAME 'cracklib_password_check';

Versions

VersionStatusIntroduced
1.0GammaMariaDB 10.1.13
1.0AlphaMariaDB 10.1.2

Variables

There is one configuration option for this plugin:

cracklib_password_check_dictionary

  • Description: Sets the path to the CrackLib dictionary. If not set, the default CrackLib dictionary path is used (often /usr/lib/cracklib_dict).
  • Commandline: --cracklib-password-check-dictionary=value
  • Scope: Global
  • Dynamic: No
  • Data Type: string
  • Default Value: Depends on the system. Often /usr/lib/cracklib_dict
  • Introduced: MariaDB 10.1.2

If the password validation fails, the original CrackLib error message can be visible in a warning (use SHOW WARNINGS).

Note that passwords can be directly set as a hash, bypassing the password validation, if the strict_password_validation variable is OFF (it is ON by default).

Example

When creating a new password, if the criteria are not met, the following error is returned:

SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('abc');
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

Known issues

The cracklib plugin is incompatible with the PAM authentication plugin. As PAM user passwords are not stored into the database, it will be impossible to create new users with PAM authentication.

See also

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.