Bug 1318515

Summary: [Azure][RHEL 6.7][Need review for implementing password policy for on-demand images]
Product: Red Hat Enterprise Linux 6 Reporter: lizzha
Component: pamAssignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: jboutaud, pkis, stephen.zarkos
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-17 09:14:36 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 lizzha 2016-03-17 06:43:42 UTC
We're going to implement password policy in the on-demand Azure RHEL images, to align with the password policy from Azure portal.

Here're the rules
- The password must be between 6-72 characters long.
- The password must contain 3 of the following:
  a lowercase character
  an uppercase character
  a number
  a special character 

We come out the below solution, could you please help review?

Modify following line in /etc/pam.d/system-auth:
password    requisite     pam_cracklib.so minlen=6 dcredit=1 ucredit=1 lcredit=1 ocredit=1 minclass=3 try_first_pass retry=3 type=

Comment 2 Tomas Mraz 2016-03-17 09:14:36 UTC
The proper line for what you want to achieve (of course without the maximum of 72 characters for which we do not have a checker) is:

password    requisite     pam_cracklib.so minlen=6 dcredit=0 ucredit=0 lcredit=0 ocredit=0 minclass=3 try_first_pass retry=3 type=

The credit values should be 0 because otherwise theoretically a password shorter than 6 characters could pass given the credit rules. However there is an additional unconditional check in cracklib that prevents passwords shorter than 6 characters anyway.

As I understand this bug was opened just for this review so I am closing it. If I misunderstood, please reopen.