PASSWDQC.CONF(5)
π PASSWDQC.CONF(5) β the libpasswdqc configuration file, bestie edition π
okay so. you're here for passwdqc.conf, the configuration file for libpasswdqc. manual section 5, file formats, the whole thing. let's get into it π«Ά
β¨ NAME β¨
passwdqc.conf β the libpasswdqc configuration file. that's her. that's the girl. π
πΈ DESCRIPTION πΈ
so libpasswdqc is a simple password strength checking library. she's not doing too much, she's just doing her job. but bestie she does more than check regular passwords β she also supports passphrases, and she can even provide randomly generated ones. iconic behaviour honestly.
and if you wanna override the default libpasswdqc settings? that's what a passwdqc.conf configuration file is for. literally its whole purpose. main character energy. π
π FORMAT π
a passwdqc.conf file is made of 0 or more lines, and every line looks like this:
option=value
and that's it, that's the format.
- Empty lines? ignored. don't even worry about them.
- lines beginning with
#? also ignored, those are your little comment moments π¬ - Whitespace characters between the option, the
=, and the value are NOT allowed. like. none. zero. not even one. the format is giving strict.
π¦ DIRECTIVE OPTIONS π¦
config=FILEβ load the specified configurationFILE, and it's gotta be in thepasswdqc.confformat. this file may define any options described in this manual β including loading yet another configuration file. it's giving configuration files all the way down π but listen: loops are not allowed. we do not do that here.
π PASSWORD QUALITY CONTROL OPTIONS π
min=N0,N1,N2,N3,N4β (default:min=disabled,24,11,8,8) the minimum allowed password lengths for different kinds of passwords/passphrases. the keyworddisabledcan be used to disallow passwords of a given kind regardless of their length. and every subsequent number is required to be no larger than the preceding one β so it's a descending situation, keep that energy.N0is used for passwords consisting of characters from one character class only. the character classes are:digits,lower-case letters,upper-case letters, andother characters. there's also a special class for non-ASCII characters, which couldn't be classified, but are assumed to be non-digits. she tried her best, ok πN1is used for passwords consisting of characters from two character classes that don't meet the requirements for a passphrase.N2is used for passphrases. note that besides meeting this length requirement, a passphrase must also consist of a sufficient number of words β see thepassphraseoption below, iykyk.N3andN4are used for passwords consisting of characters from three and four character classes, respectively.- when calculating the number of character classes, upper-case letters used as the first character and digits used as the last character of a password are not counted. sneaky little exceptions, but we respect them.
- and in addition to being sufficiently long, passwords are required to contain enough different characters for the character classes and the minimum length they've been checked against. two boxes, both must be ticked. β β
max=Nβ (default:max=72) the maximum allowed password length. this can be used to prevent users from setting passwords that may be too long for some system services. and the value8is treated specially: ifmaxis set to8, passwords longer than 8 characters will not be rejected, but will be truncated to 8 characters for the strength checks, and the user will be warned. this is to be used with the traditional DES-based password hashes, which truncate the password at 8 characters.
β οΈ bestie it is important that you do set max=8 if you're using the traditional hashes, or some weak passwords will pass the checks. not a vibe. do the thing.
passphrase=Nβ (default:passphrase=3) the number of words required for a passphrase, or0to disable the support for user-chosen passphrases. zero means no thank u πmatch=Nβ (default:match=4) the length of common substring required to conclude that a password is at least partially based on information found in a character string, or0to disable the substring search. note that the password will not be rejected once a weak substring is found; it will instead be subjected to the usual strength requirements with the weak substring partially discounted. so it's a soft judgement, not an instant no π- the substring search is case-insensitive and is able to detect and remove a common substring spelled backwards. backwards?? yeah. she sees it. she always sees it. π
similar=permit|denyβ (default:similar=deny) whether a new password is allowed to be similar to the old one. the passwords are considered to be similar when there is a sufficiently long common substring and the new password with the substring partially discounted would be weak. two conditions, both gotta hit.wordlist=FILEβ deny passwords that are based on lines of the tiny external textFILE, which can reasonably include common passwords, dictionary words in a local language other than English, and longer English words.passwdqcincludes built-in lists of a few thousand common English words mostly of lengths from3to6, a handful of common character sequences such as keyboard walks, and many common passwords of length7and above. ποΈ- any word list possibly specified with this option is used in addition to the lists of English words and character sequences, but replaces the list of common passwords. swap, not stack, for that one piece.
- substring matching and discounting will be used if the
matchsetting above is non-zero. and please note that this isn't to be used with large wordlists for performance reasons. keep her tiny, she likes being tiny π
denylist=FILEβ deny passwords or passphrases directly appearing in the tiny external textFILE. that file can reasonably be e.g. a list of common passwords if only a relaxed policy is desired and stricter checks are thus disabled (using their separate options).
π¬ such policy would only be somewhat effective against online/remote attacks, but not against offline attacks on hashed passwords. know the limits, bestie.
filter=FILEβ deny passwords or passphrases directly appearing in a maybe huge binary filterFILEcreated withpwqfilter. this is very efficient, needing at most two random disk reads per query. a filter created from millions of leaked passwords can reasonably be used on top ofpasswdqc's other checks to further reduce the number of passing yet weak passwords without causing unreasonable inconvenience (as e.g. higher minimum lengths and character set requirements could). she's fast and thorough, we stan πrandom=N[,only]β (default:random=47) the size of randomly-generated passphrases in bits (24to136), or0to disable this feature. any passphrase that contains the offered randomly-generated string will be allowed regardless of other possible restrictions. she said free pass β¨- the
onlymodifier can be used to disallow user-chosen passwords. just the generated ones, nothing else, thank u.
- the
π PAM MODULE OPTIONS π
enforce=none|users|everyoneβ (default:enforce=everyone) the PAM module can be configured to warn of weak passwords only, but not actually enforce strong passwords. theuserssetting is likeeveryonefor all PAM services exceptchpasswdandpasswd. for these two PAM services,userswill enforce strong passwords for invocations by non-root users only. specifics matter, ok πnon-unixβ normally, the PAM module usesgetpwnam(3)to obtain the user's personal login information and use that during the password strength checks. this behavior can be disabled with thenon-unixoption.retry=Nβ (default:retry=3) the number of times the PAM module will ask for a new password if the user fails to provide a sufficiently strong password and enter it twice the first time. you get tries, bestie, but not infinite tries πask_oldauthtok[=update]β ask for the old password as well. normally, the PAM module leaves this task for subsequent modules. with no argument, theask_oldauthtokoption will cause the PAM module to ask for the old password during the preliminary check phase. if theask_oldauthtokoption is specified with theupdateargument, the PAM module will do that during the update phase instead. phase girlie πcheck_oldauthtokβ this tells the PAM module to validate the old password before giving a new password prompt. normally, this task is left for subsequent modules.- the primary use for this option is when
ask_oldauthtok=updateis also specified, in which case no other module gets a chance to ask for and validate the password. of course, this will only work with Unix passwords.
- the primary use for this option is when
use_first_pass,use_authtokβ use the new password obtained by other modules stacked before the PAM module. this disables user interaction within the PAM module. the only difference betweenuse_first_passanduse_authtokis that the former is incompatible withask_oldauthtok. they're siblings, not twins π―noauditβ if audit is enabled at build time, the PAM module logs audit events once user tries to change their credentials. this option disables that audit logging. quiet mode activated π€«
π FILES π
/etc/passwdqc.conf β (not read unless this suggested file location is specified with the config=/etc/passwdqc.conf option). read that twice bestie, she does not find herself. you have to point at her. ππ
π SEE ALSO π
getpwnam(3), libpasswdqc(3), pam_passwdqc(8).
https://www.openwall.com/passwdqc/
π§ AUTHORS π§
the pam_passwdqc module was written for Openwall GNU/*/Linux by Solar Designer <solar at openwall.com>. this manual page was derived from pam_passwdqc(8). the latter, derived from the author's documentation, was written for the FreeBSD Project by ThinkSec AS and NAI Labs, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (βCBOSSβ), as part of the DARPA CHATS research program. a whole lineage, a whole family tree, we love a documented origin story π³π
and that's the page, bestie!! brought to you by the Openwall Project, dated November 23, 2025 β go forth and configure responsibly π β¨π«Ά
π¦ where this page comes from
- ubuntu resolute: passwdqc 2.1.0-1 Β· cut-down-BSD
- ubuntu stonking: passwdqc 2.1.0-2 Β· cut-down-BSD
- Copyright (c) 2000-2003,2005,2008,2019,2020,2025 Solar Designer
- Copyright (c) 2001 Networks Associates Technology, Inc
- Copyright (c) 2009 Dmitry V. Levin
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms