Bug 1007893

Summary: Add an option to pwquality to specify minimum number of character in each class.
Product: [Fedora] Fedora Reporter: Najmuddin Chirammal <nc>
Component: libpwqualityAssignee: Tomas Mraz <tmraz>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: tmraz, yjog
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 14:14:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Najmuddin Chirammal 2013-09-13 14:05:49 UTC
Description of problem: 

Currently pam_cracklib/pam_pwquality does not have an option to specify the "minimum number of character in each class". We can specify the number of characters required for each class (by using -weight) however this is not sufficient in some situations, for example:

Requirement: 

Minimum length: 12
Minimum number of classes: 3
Minimum number of character in each class: 2

Cracklib/pwquality attempt is below:

password required pam_cracklib.so try_first_pass minclass=3 difok=4 retry=3 minlen=12 lcredit=-2 ucredit=-2 dcredit=-2 ocredit=-2

However, since -2 is specified for each class, pam is enforcing 4 classes. We cannot specify, the password only require 3 classes, but at least 2 characters for each class.

Comment 2 Tomas Mraz 2018-02-21 14:14:17 UTC
I do not think further complicating the possible options is a way to go. However if there is a real interest for this feature, feel free to submit a pull request with such implementation to the upstream on GitHub.