Blame SOURCES/scap-security-guide-0.1.20-rhel6-rhel7-PR#280-set-deny-prerequisite-#1.patch

2b7b16
diff --git a/RHEL/6/input/profiles/stig-rhel6-server-upstream.xml b/RHEL/6/input/profiles/stig-rhel6-server-upstream.xml
2b7b16
index a00fc16..dc1b249 100644
2b7b16
--- a/RHEL/6/input/profiles/stig-rhel6-server-upstream.xml
2b7b16
+++ b/RHEL/6/input/profiles/stig-rhel6-server-upstream.xml
2b7b16
@@ -99,7 +99,7 @@ upstream project homepage is https://fedorahosted.org/scap-security-guide/.
2b7b16
 <refine-value idref="var_accounts_passwords_pam_faillock_fail_interval" selector="900"/>
2b7b16
 
2b7b16
 
2b7b16
-<refine-value idref="var_password_pam_unix_remember" selector="24"/>
2b7b16
+<refine-value idref="var_password_pam_unix_remember" selector="5"/>
2b7b16
 
2b7b16
 <refine-value idref="var_accounts_maximum_age_login_defs" selector="60"/>
2b7b16
 <refine-value idref="var_accounts_minimum_age_login_defs" selector="1"/>
2b7b16
diff --git a/RHEL/6/input/system/accounts/pam.xml b/RHEL/6/input/system/accounts/pam.xml
2b7b16
index adf0aaf..b2da2a4 100644
2b7b16
--- a/RHEL/6/input/system/accounts/pam.xml
2b7b16
+++ b/RHEL/6/input/system/accounts/pam.xml
2b7b16
@@ -48,7 +48,7 @@ operator="equals" interactive="0">
2b7b16
 <tt>/etc/security/opasswd</tt> in order to force password change history and
2b7b16
 keep the user from alternating between the same password too
2b7b16
 frequently.</description>
2b7b16
-<value selector="">24</value>
2b7b16
+<value selector="">5</value>
2b7b16
 <value selector="0">0</value>
2b7b16
 <value selector="5">5</value>
2b7b16
 <value selector="10">10</value>
2b7b16
@@ -342,7 +342,7 @@ more difficult by ensuring a larger search space.
2b7b16
 usage of special (or ``other'') characters in a password. When set to a negative number, any password will be required to
2b7b16
 contain that many special characters. When set to a positive number, pam_cracklib will grant +1 additional
2b7b16
 length credit for each special character.
2b7b16
-Add <tt>ocredit=-1</tt> after pam_cracklib.so to require use of a special character in passwords.
2b7b16
+Add <tt>ocredit=<sub idref="var_password_pam_ocredit" /></tt> after pam_cracklib.so to require use of a special character in passwords.
2b7b16
 </description>
2b7b16
 <ocil clause="ocredit is not found or not set to the required value">
2b7b16
 To check how many special characters are required in a password, run the following command:
2b7b16
@@ -357,7 +357,7 @@ more difficult by ensuring a larger search space.
2b7b16
 </rationale>
2b7b16
 <ident cce="26409-3" />
2b7b16
 <oval id="accounts_password_pam_ocredit" value="var_password_pam_ocredit"/>
2b7b16
-<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="1619" />
2b7b16
+<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="1619" srg="266" />
2b7b16
 <tested by="DS" on="20121024"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
@@ -551,7 +551,7 @@ be accomplished by using the <tt>remember</tt> option for the <tt>pam_unix</tt>
2b7b16
 module.  In the file <tt>/etc/pam.d/system-auth</tt>, append <tt>remember=<sub idref="var_password_pam_unix_remember" /></tt> to the
2b7b16
 line which refers to the <tt>pam_unix.so</tt> module, as shown:
2b7b16
 
password sufficient pam_unix.so existing_options remember=<sub idref="var_password_pam_unix_remember" />
2b7b16
-The DoD and FISMA requirement is 24 passwords.</description>
2b7b16
+The DoD STIG requirement is 5 passwords.</description>
2b7b16
 <ocil clause="it does not">
2b7b16
 To verify the password reuse setting is compliant, run the following command:
2b7b16
 
$ grep remember /etc/pam.d/system-auth
2b7b16
diff --git a/RHEL/6/input/system/accounts/restrictions/password_expiration.xml b/RHEL/6/input/system/accounts/restrictions/password_expiration.xml
2b7b16
index e4af5aa..a8e90c2 100644
2b7b16
--- a/RHEL/6/input/system/accounts/restrictions/password_expiration.xml
2b7b16
+++ b/RHEL/6/input/system/accounts/restrictions/password_expiration.xml
2b7b16
@@ -159,7 +159,7 @@ increases the risk of users writing down the password in a convenient
2b7b16
 location subject to physical compromise.</rationale>
2b7b16
 <ident cce="26985-2" />
2b7b16
 <oval id="accounts_maximum_age_login_defs" value="var_accounts_maximum_age_login_defs"/>
2b7b16
-<ref nist="IA-5(f),IA-5(g),IA-5(1)(d)" disa="180,199" />
2b7b16
+<ref nist="IA-5(f),IA-5(g),IA-5(1)(d)" disa="180,199" srg="76" />
2b7b16
 <tested by="DS" on="20121026"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
diff --git a/RHEL/7/input/checks/accounts_password_pam_minlen.xml b/RHEL/7/input/checks/accounts_password_pam_minlen.xml
2b7b16
new file mode 100644
2b7b16
index 0000000..77f89af
2b7b16
--- /dev/null
2b7b16
+++ b/RHEL/7/input/checks/accounts_password_pam_minlen.xml
2b7b16
@@ -0,0 +1,40 @@
2b7b16
+<def-group>
2b7b16
+  <definition class="compliance" id="accounts_password_pam_minlen" version="1">
2b7b16
+    <metadata>
2b7b16
+      <title>Set Password minlen Requirements</title>
2b7b16
+      <affected family="unix">
2b7b16
+        <platform>Red Hat Enterprise Linux 7</platform>
2b7b16
+      </affected>
2b7b16
+      <description>The password minlen should meet minimum requirements</description>
2b7b16
+      <reference source="swells" ref_id="20140926" ref_url="test_attestation" />
2b7b16
+    </metadata>
2b7b16
+    <criteria operator="AND" comment="system is RHEL7 with pam_pwquality configured">
2b7b16
+      <extend_definition comment="RHEL7 installed" definition_ref="installed_OS_is_rhel7" />
2b7b16
+      <criterion comment="rhel7 pam_pwquality" test_ref="test_password_pam_pwquality_minlen" />
2b7b16
+    </criteria>
2b7b16
+  </definition>
2b7b16
+
2b7b16
+  
2b7b16
+  
2b7b16
+  comment="check the configuration of /etc/pam.d/system-auth pwquality"
2b7b16
+  id="test_password_pam_pwquality_minlen" version="1">
2b7b16
+    <ind:object object_ref="obj_password_pam_pwquality_minlen" />
2b7b16
+    <ind:state state_ref="state_password_pam_minlen" />
2b7b16
+  </ind:textfilecontent54_test>
2b7b16
+
2b7b16
+  
2b7b16
+  version="1">
2b7b16
+    <ind:filepath>/etc/pam.d/system-auth</ind:filepath>
2b7b16
+    <ind:pattern operation="pattern match">^\s*password\s+(?:(?:required)|(?:requisite))\s+pam_pwquality\.so.*minlen=(-?\d+)(?:[\s]|$)</ind:pattern>
2b7b16
+    <ind:instance datatype="int" operation="greater than or equal">1</ind:instance>
2b7b16
+  </ind:textfilecontent54_object>
2b7b16
+
2b7b16
+  
2b7b16
+  <ind:textfilecontent54_state id="state_password_pam_minlen" version="1">
2b7b16
+    <ind:instance datatype="int">1</ind:instance>
2b7b16
+    <ind:subexpression datatype="int" operation="greater than or equal" var_ref="var_password_pam_minlen" />
2b7b16
+  </ind:textfilecontent54_state>
2b7b16
+
2b7b16
+  <external_variable comment="External variable for pam_cracklib minlen" datatype="int" id="var_password_pam_minlen" version="1" />
2b7b16
+
2b7b16
+</def-group>
2b7b16
diff --git a/RHEL/7/input/fixes/bash/accounts_password_pam_minlen.sh b/RHEL/7/input/fixes/bash/accounts_password_pam_minlen.sh
2b7b16
new file mode 100644
2b7b16
index 0000000..5bc5b0f
2b7b16
--- /dev/null
2b7b16
+++ b/RHEL/7/input/fixes/bash/accounts_password_pam_minlen.sh
2b7b16
@@ -0,0 +1,8 @@
2b7b16
+source ./templates/support.sh
2b7b16
+populate var_password_pam_minlen
2b7b16
+
2b7b16
+if grep -q "minlen=" /etc/pam.d/system-auth; then   
2b7b16
+	sed -i --follow-symlink "s/\(minlen *= *\).*/\1$var_password_pam_minlen/" /etc/pam.d/system-auth
2b7b16
+else
2b7b16
+	sed -i --follow-symlink "/pam_pwquality.so/ s/$/ minlen=$var_password_pam_minlen/" /etc/pam.d/system-auth
2b7b16
+fi
2b7b16
diff --git a/RHEL/7/input/profiles/stig-rhel7-server-upstream.xml b/RHEL/7/input/profiles/stig-rhel7-server-upstream.xml
2b7b16
index ef079b4..19a06b3 100644
2b7b16
--- a/RHEL/7/input/profiles/stig-rhel7-server-upstream.xml
2b7b16
+++ b/RHEL/7/input/profiles/stig-rhel7-server-upstream.xml
2b7b16
@@ -2,6 +2,36 @@
2b7b16
 <title>Pre-release Draft STIG for RHEL 7 Server</title>
2b7b16
 <description>This profile is being developed under the DoD consensus model to become a STIG in coordination with DISA FSO.</description>
2b7b16
 
2b7b16
+
2b7b16
+     and should not be manipulated -->
2b7b16
+<refine-value idref="var_password_pam_unix_remember" selector="5" />
2b7b16
+<refine-value idref="var_accounts_maximum_age_login_defs" selector="60" />
2b7b16
+<refine-value idref="var_password_pam_ocredit" selector="1" />
2b7b16
+<refine-value idref="var_password_pam_ucredit" selector="1" />
2b7b16
+<refine-value idref="var_password_pam_lcredit" selector="1" />
2b7b16
+<refine-value idref="var_password_pam_dcredit" selector="1" />
2b7b16
+<refine-value idref="var_password_pam_minlen" selector="15" />
2b7b16
+<refine-value idref="var_password_pam_difok" selector="15" />
2b7b16
+<refine-value idref="var_accounts_minimum_age_login_defs" selector="1" />
2b7b16
+<refine-value idref="var_accounts_passwords_pam_faillock_fail_interval" selector="900" />
2b7b16
+<refine-value idref="var_accounts_passwords_pam_faillock_deny" selector="3" />
2b7b16
+
2b7b16
+
2b7b16
+
2b7b16
+
2b7b16
 <select idref="encrypt_partitions" selected="true"/>
2b7b16
 
2b7b16
+
2b7b16
+<select idref="accounts_maximum_age_login_defs" selected="true" />
2b7b16
+<select idref="accounts_password_pam_unix_remember" selected="true" />
2b7b16
+<select idref="accounts_password_pam_ocredit" selected="true" />
2b7b16
+<select idref="accounts_password_pam_ucredit" selected="true" />
2b7b16
+<select idref="accounts_password_pam_lcredit" selected="true" />
2b7b16
+<select idref="accounts_password_pam_dcredit" selected="true" />
2b7b16
+<select idref="accounts_password_pam_minlen" selected="true" />
2b7b16
+<select idref="accounts_password_pam_difok" selected="true" />
2b7b16
+<select idref="accounts_minimum_age_login_defs" selected="true" />
2b7b16
+<select idref="accounts_passwords_pam_fail_interval" selected="true" />
2b7b16
+<select idref="accounts_passwords_pam_faillock_deny" selected="true" />
2b7b16
+
2b7b16
 </Profile>
2b7b16
diff --git a/RHEL/7/input/system/accounts/pam.xml b/RHEL/7/input/system/accounts/pam.xml
2b7b16
index 3cdd433..f5d9cdf 100644
2b7b16
--- a/RHEL/7/input/system/accounts/pam.xml
2b7b16
+++ b/RHEL/7/input/system/accounts/pam.xml
2b7b16
@@ -48,7 +48,7 @@ operator="equals" interactive="0">
2b7b16
 <tt>/etc/security/opasswd</tt> in order to force password change history and
2b7b16
 keep the user from alternating between the same password too
2b7b16
 frequently.</description>
2b7b16
-<value selector="">24</value>
2b7b16
+<value selector="">5</value>
2b7b16
 <value selector="0">0</value>
2b7b16
 <value selector="5">5</value>
2b7b16
 <value selector="10">10</value>
2b7b16
@@ -137,13 +137,14 @@ reason.</warning>
2b7b16
 <Value id="var_password_pam_minlen" type="number" operator="equals" interactive="0">
2b7b16
 <title>minlen</title>
2b7b16
 <description>Minimum number of characters in password</description>
2b7b16
-<value selector="">14</value>
2b7b16
+<value selector="">15</value>
2b7b16
 <value selector="6">6</value>
2b7b16
 
2b7b16
 <value selector="8">8</value>
2b7b16
 <value selector="10">10</value>
2b7b16
 <value selector="12">12</value>
2b7b16
 <value selector="14">14</value>
2b7b16
+
2b7b16
 <value selector="15">15</value>
2b7b16
 </Value>
2b7b16
 
2b7b16
@@ -190,11 +191,12 @@ password</description>
2b7b16
 password</description>
2b7b16
 <warning category="general">Keep this high for short
2b7b16
 passwords</warning>
2b7b16
-<value selector="">4</value>
2b7b16
+<value selector="">15</value>
2b7b16
 <value selector="2">2</value>
2b7b16
 <value selector="3">3</value>
2b7b16
 <value selector="4">4</value>
2b7b16
 <value selector="5">5</value>
2b7b16
+<value selector="15">15</value>
2b7b16
 </Value>
2b7b16
 
2b7b16
 <Value id="var_password_pam_minclass" type="number" operator="equals" interactive="0">
2b7b16
@@ -306,10 +308,34 @@ search space.
2b7b16
 </rationale>
2b7b16
 <ident cce="27163-5" />
2b7b16
 <oval id="accounts_password_pam_dcredit" value="var_password_pam_dcredit"/>
2b7b16
-<ref nist="IA-5(b),IA-5(c),194" disa=""/>
2b7b16
+<ref nist="IA-5(b),IA-5(c),194" disa="194" srg="71"/>
2b7b16
 <tested by="DS" on="20121024"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
+<Rule id="accounts_password_pam_minlen">
2b7b16
+<title>Set Password Minimum Length</title>
2b7b16
+<description>The pam_pwquality module's <tt>minlen</tt> parameter controls requirements for
2b7b16
+minimum characters required in a password. Add <tt>minlen=<sub idref="var_password_pam_minlen" /></tt>
2b7b16
+after pam_pwquality to set minimum password length requirements.
2b7b16
+</description>
2b7b16
+<ocil clause="minlen is not found or not set to the required value (or higher)">
2b7b16
+To check how many characters are required in a password, run the following command:
2b7b16
+
$ grep pam_pwquality /etc/pam.d/system-auth
2b7b16
+Your output should contain <tt>minlen=<sub idref="var_password_pam_minlen" /></tt>
2b7b16
+</ocil>
2b7b16
+<rationale>
2b7b16
+Password length is one factor of several that helps to determine
2b7b16
+strength and how long it takes to crack a password. Use of more characters in
2b7b16
+a password helps to exponentially increase the time and/or resources
2b7b16
+required to compromise the password.
2b7b16
+</rationale>
2b7b16
+<ident cce="26615-5" />
2b7b16
+<oval id="accounts_password_pam_minlen" value="var_password_pam_minlen" />
2b7b16
+<ref nist="IA-5(1)(a)" disa="205" srg="78" />
2b7b16
+<tested by="swells" on="20140928" />
2b7b16
+</Rule>
2b7b16
+
2b7b16
+
2b7b16
 <Rule id="accounts_password_pam_ucredit">
2b7b16
 <title>Set Password Strength Minimum Uppercase Characters</title>
2b7b16
 <description>The pam_pwquality module's <tt>ucredit=</tt> parameter controls requirements for
2b7b16
@@ -331,18 +357,18 @@ more difficult by ensuring a larger search space.
2b7b16
 </rationale>
2b7b16
 <ident cce="26988-6" />
2b7b16
 <oval id="accounts_password_pam_ucredit" value="var_password_pam_ucredit"/>
2b7b16
-<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="" />
2b7b16
+<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="192" srg="69" />
2b7b16
 <tested by="DS" on="20121024"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
 <Rule id="accounts_password_pam_ocredit">
2b7b16
 <title>Set Password Strength Minimum Special Characters</title>
2b7b16
 <description>The pam_pwquality module's <tt>ocredit=</tt> parameter controls requirements for
2b7b16
-usage of special (or ``other'') characters in a password. When set to a negative number, any password will be required to
2b7b16
+usage of special (or "other") characters in a password. When set to a negative number, any password will be required to
2b7b16
 contain that many special characters. When set to a positive number, pam_pwquality will grant +1 additional
2b7b16
 length credit for each special character.
2b7b16
-Add <tt>ocredit=-1</tt> after pam_pwquality.so to require use of a special character in passwords.
2b7b16
-</description>
2b7b16
+Add <tt>ocredit=<sub idref="var_password_pam_ocredit" /></tt> after pam_pwquality.so to 
2b7b16
+require use of a special character in passwords.</description>
2b7b16
 <ocil clause="ocredit is not found or not set to the required value">
2b7b16
 To check how many special characters are required in a password, run the following command:
2b7b16
 
$ grep pam_pwquality /etc/pam.d/system-auth
2b7b16
@@ -356,7 +382,7 @@ more difficult by ensuring a larger search space.
2b7b16
 </rationale>
2b7b16
 <ident cce="27151-0" />
2b7b16
 <oval id="accounts_password_pam_ocredit" value="var_password_pam_ocredit"/>
2b7b16
-<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="" />
2b7b16
+<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="1619" srg="266" />
2b7b16
 <tested by="DS" on="20121024"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
@@ -381,7 +407,7 @@ more difficult by ensuring a larger search space.
2b7b16
 </rationale>
2b7b16
 <ident cce="27111-4" />
2b7b16
 <oval id="accounts_password_pam_lcredit" value="var_password_pam_lcredit"/>
2b7b16
-<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="" />
2b7b16
+<ref nist="IA-5(b),IA-5(c),IA-5(1)(a)" disa="193" srg="70" />
2b7b16
 <tested by="DS" on="20121024"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
@@ -391,14 +417,14 @@ more difficult by ensuring a larger search space.
2b7b16
 usage of different characters during a password change.
2b7b16
 Add <tt>difok=NUM</tt> after pam_pwquality.so to require differing
2b7b16
 characters when changing passwords, substituting NUM appropriately.
2b7b16
-The DoD requirement is <tt>4</tt>.
2b7b16
+The DoD requirement is <tt>15</tt>.
2b7b16
 </description>
2b7b16
 <ocil clause="difok is not found or not set to the required value">
2b7b16
 To check how many characters must differ during a password change, run the following command:
2b7b16
 
$ grep pam_pwquality /etc/pam.d/system-auth
2b7b16
 The <tt>difok</tt> parameter will indicate how many characters must differ.
2b7b16
-The DoD requires four characters differ during a password change.
2b7b16
-This would appear as <tt>difok=4</tt>.
2b7b16
+The DoD requires 15 characters differ during a password change.
2b7b16
+This would appear as <tt>difok=15</tt>.
2b7b16
 </ocil>
2b7b16
 <rationale>
2b7b16
 Requiring a minimum number of different characters during password changes ensures that
2b7b16
@@ -407,7 +433,7 @@ Note that passwords which are changed on compromised systems will still be compr
2b7b16
 </rationale>
2b7b16
 <ident cce="26631-2" />
2b7b16
 <oval id="accounts_password_pam_difok" value="var_password_pam_difok"/>
2b7b16
-<ref nist="IA-5(b),IA-5(c),IA-5(1)(b)" disa=""/>
2b7b16
+<ref nist="IA-5(b),IA-5(c),IA-5(1)(b)" disa="195" srg="72" />
2b7b16
 <tested by="DS" on="20121024"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
@@ -476,13 +502,13 @@ attempts using <tt>pam_faillock.so</tt>:
2b7b16
 

2b7b16
 Add the following lines immediately below the <tt>pam_unix.so</tt> statement in <tt>AUTH</tt> section of
2b7b16
 both <tt>/etc/pam.d/system-auth</tt> and /etc/pam.d/password-auth:
2b7b16
-
auth [default=die] pam_faillock.so authfail deny=3 unlock_time=604800 fail_interval=900
2b7b16
-
auth required pam_faillock.so authsucc deny=3 unlock_time=604800 fail_interval=900
2b7b16
+
auth [default=die] pam_faillock.so authfail deny=<id subref="var_accounts_passwords_pam_faillock_deny" /> unlock_time=604800 fail_interval=<id subref="var_accounts_passwords_pam_faillock_fail_interval" />
2b7b16
+
auth required pam_faillock.so authsucc deny=<id subref="var_accounts_passwords_pam_faillock_deny" />  unlock_time=604800 fail_interval=<id subref="var_accounts_passwords_pam_faillock_fail_interval" />
2b7b16
 </description>
2b7b16
 <ocil clause="that is not the case">
2b7b16
 To ensure the failed password attempt policy is configured correctly, run the following command:
2b7b16
 
$ grep pam_faillock /etc/pam.d/system-auth
2b7b16
-The output should show <tt>deny=3</tt>.
2b7b16
+The output should show <tt>deny=<id subref="var_accounts_passwords_pam_faillock_deny" /></tt>.
2b7b16
 </ocil>
2b7b16
 <rationale>
2b7b16
 Locking out user accounts after a number of incorrect attempts
2b7b16
@@ -490,7 +516,7 @@ prevents direct password guessing attacks.
2b7b16
 </rationale>
2b7b16
 <ident cce="26891-2" />
2b7b16
 <oval id="accounts_passwords_pam_faillock_deny" value="var_accounts_passwords_pam_faillock_deny"/>
2b7b16
-<ref nist="AC-7(a)" disa="" />
2b7b16
+<ref nist="AC-7(a)" disa="44" srg="21" />
2b7b16
 </Rule>
2b7b16
 
2b7b16
 <Rule id="accounts_passwords_pam_faillock_unlock_time" severity="medium">
2b7b16
@@ -500,8 +526,8 @@ To configure the system to lock out accounts after a number of incorrect login
2b7b16
 attempts and require an administrator to unlock the account using <tt>pam_faillock.so</tt>:
2b7b16
 

2b7b16
 Add the following lines immediately below the <tt>pam_env.so</tt> statement in <tt>/etc/pam.d/system-auth</tt>:
2b7b16
-
auth [default=die] pam_faillock.so authfail deny=3 unlock_time=604800 fail_interval=900
2b7b16
-
auth required pam_faillock.so authsucc deny=3 unlock_time=604800 fail_interval=900
2b7b16
+
auth [default=die] pam_faillock.so authfail deny=<id subref="var_accounts_passwords_pam_faillock_deny" /> unlock_time=604800 fail_interval=<id subref="var_accounts_passwords_pam_faillock_fail_interval" />
2b7b16
+
auth required pam_faillock.so authsucc deny=<id subref="var_accounts_passwords_pam_faillock_deny" />  unlock_time=604800 fail_interval=<id subref="var_accounts_passwords_pam_faillock_fail_interval" />
2b7b16
 </description>
2b7b16
 <ocil clause="that is not the case">
2b7b16
 To ensure the failed password attempt policy is configured correctly, run the following command:
2b7b16
@@ -527,43 +553,46 @@ attempts.
2b7b16
 

2b7b16
 Add the following <tt>fail_interval</tt> directives to <tt>pam_faillock.so</tt> immediately below the <tt>pam_env.so</tt> statement in
2b7b16
 <tt>/etc/pam.d/system-auth</tt> and <tt>/etc/pam.d/password-auth</tt>:
2b7b16
-
auth [default=die] pam_faillock.so authfail deny=3 unlock_time=604800 fail_interval=900
2b7b16
-
auth required pam_faillock.so authsucc deny=3 unlock_time=604800 fail_interval=900
2b7b16
+
auth [default=die] pam_faillock.so authfail deny=<id subref="var_accounts_passwords_pam_faillock_deny" /> unlock_time=604800 fail_interval=<id subref="var_accounts_passwords_pam_faillock_fail_interval" />
2b7b16
+
auth required pam_faillock.so authsucc deny=<id subref="var_accounts_passwords_pam_faillock_deny" />  unlock_time=604800 fail_interval=<id subref="var_accounts_passwords_pam_faillock_fail_interval" />
2b7b16
 </description>
2b7b16
 <ocil clause="that is not the case">
2b7b16
 To ensure the failed password attempt policy is configured correctly, run the following command:
2b7b16
 
$ grep pam_faillock /etc/pam.d/system-auth /etc/pam.d/password-auth
2b7b16
-For each file, the output should show <tt>fail_interval=<interval-in-seconds></tt> where <tt>interval-in-seconds</tt> is 900 (15 minutes) or greater.  If the <tt>fail_interval</tt> parameter is not set, the default setting of 900 seconds is acceptable.
2b7b16
+For each file, the output should show <tt>fail_interval=<interval-in-seconds></tt> where <tt>interval-in-seconds</tt> is 
2b7b16
+<tt><id subref="var_accounts_passwords_pam_faillock_fail_interval" /></tt>  or greater. 
2b7b16
+If the <tt>fail_interval</tt> parameter is not set, the default setting of 900 seconds is acceptable.
2b7b16
 </ocil>
2b7b16
 <rationale>
2b7b16
 Locking out user accounts after a number of incorrect attempts within a
2b7b16
 specific period of time prevents direct password guessing attacks.
2b7b16
 </rationale>
2b7b16
-<ident cce="RHEL7-CCE-TBD" />
2b7b16
+<ident cce="26763-3" />
2b7b16
 <oval id="accounts_passwords_pam_fail_interval" value="var_accounts_passwords_pam_faillock_fail_interval"/>
2b7b16
-<ref nist="AC-7(a)" disa="1452" />
2b7b16
+<ref nist="AC-7(a)" disa="44" srg="21" />
2b7b16
 </Rule>
2b7b16
 
2b7b16
 <Rule id="accounts_password_pam_unix_remember" severity="medium">
2b7b16
 <title>Limit Password Reuse</title>
2b7b16
 <description>Do not allow users to reuse recent passwords. This can
2b7b16
 be accomplished by using the <tt>remember</tt> option for the <tt>pam_unix</tt> PAM
2b7b16
-module.  In the file <tt>/etc/pam.d/system-auth</tt>, append <tt>remember=24</tt> to the 
2b7b16
+module.  In the file <tt>/etc/pam.d/system-auth</tt>, append
2b7b16
+<tt>remember=<sub idref="var_password_pam_unix_remember" /></tt> to the 
2b7b16
 line which refers to the <tt>pam_unix.so</tt> module, as shown:
2b7b16
-
password sufficient pam_unix.so existing_options remember=24
2b7b16
-The DoD and FISMA requirement is 24 passwords.</description>
2b7b16
+
password sufficient pam_unix.so existing_options remember=<sub idref="var_password_pam_unix_remember" />
2b7b16
+The DoD STIG requirement is 5 passwords.</description>
2b7b16
 <ocil clause="it does not">
2b7b16
 To verify the password reuse setting is compliant, run the following command:
2b7b16
 
$ grep remember /etc/pam.d/system-auth
2b7b16
 The output should show the following at the end of the line:
2b7b16
-
remember=24
2b7b16
+
remember=<sub idref="var_password_pam_unix_rememer" />
2b7b16
 </ocil>
2b7b16
 <rationale>
2b7b16
 Preventing re-use of previous passwords helps ensure that a compromised password is not re-used by a user.
2b7b16
 </rationale>
2b7b16
 <ident cce="26923-3" />
2b7b16
 <oval id="accounts_password_pam_unix_remember" value="var_password_pam_unix_remember" />
2b7b16
-<ref nist="IA-5(f),IA-5(1)(e)" disa="" />
2b7b16
+<ref nist="IA-5(f),IA-5(1)(e)" disa="200" srg="77" />
2b7b16
 <tested by="DS" on="20121024"/>
2b7b16
 </Rule>
2b7b16
 </Group>
2b7b16
diff --git a/RHEL/7/input/system/accounts/restrictions/password_expiration.xml b/RHEL/7/input/system/accounts/restrictions/password_expiration.xml
2b7b16
index d79c4a8..9e56b9d 100644
2b7b16
--- a/RHEL/7/input/system/accounts/restrictions/password_expiration.xml
2b7b16
+++ b/RHEL/7/input/system/accounts/restrictions/password_expiration.xml
2b7b16
@@ -60,8 +60,8 @@ age, and 7 day warning period with the following command:
2b7b16
 <value selector="">7</value>
2b7b16
 <value selector="7">7</value>
2b7b16
 <value selector="5">5</value>
2b7b16
-<value selector="1">1</value>
2b7b16
 <value selector="2">2</value>
2b7b16
+<value selector="1">1</value>
2b7b16
 <value selector="0">0</value>
2b7b16
 </Value>
2b7b16
 
2b7b16
@@ -131,7 +131,7 @@ after satisfying the password reuse requirement.
2b7b16
 </rationale>
2b7b16
 <ident cce="27002-5" />
2b7b16
 <oval id="accounts_minimum_age_login_defs" value="var_accounts_minimum_age_login_defs"/>
2b7b16
-<ref nist="IA-5(f),IA-5(1)(d)" disa=""/>
2b7b16
+<ref nist="IA-5(f),IA-5(1)(d)" disa="198" srg="75" />
2b7b16
 <tested by="DS" on="20121026"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
@@ -145,7 +145,7 @@ and add or correct the following line, replacing DAYS appropriately:
2b7b16
 A value of 180 days is sufficient for many environments. 
2b7b16
 The DoD requirement is 60.
2b7b16
 </description>
2b7b16
-<ocil clause="it is not set to the required value">
2b7b16
+<ocil clause="PASS_MAX_DAYS is not set to the required value">
2b7b16
 To check the maximum password age, run the command:
2b7b16
 
$ grep PASS_MAX_DAYS /etc/login.defs
2b7b16
 The DoD and FISMA requirement is 60.
2b7b16
@@ -157,9 +157,9 @@ periodically change their passwords. This could possibly decrease
2b7b16
 the utility of a stolen password. Requiring shorter password lifetimes
2b7b16
 increases the risk of users writing down the password in a convenient
2b7b16
 location subject to physical compromise.</rationale>
2b7b16
-<ident cce="RHEL7-CCE-TBD" />
2b7b16
+<ident cce="27051-2" />
2b7b16
 <oval id="accounts_maximum_age_login_defs" value="var_accounts_maximum_age_login_defs"/>
2b7b16
-<ref nist="IA-5(f),IA-5(g),IA-5(1)(d)" disa="180,199" />
2b7b16
+<ref nist="IA-5(f),IA-5(g),IA-5(1)(d)" disa="180,199" srg="76" />
2b7b16
 <tested by="DS" on="20121026"/>
2b7b16
 </Rule>
2b7b16
 
2b7b16
diff --git a/shared/.gitignore b/shared/.gitignore
2b7b16
index d7b3ccb..39328cf 100644
2b7b16
--- a/shared/.gitignore
2b7b16
+++ b/shared/.gitignore
2b7b16
@@ -1,3 +1,4 @@
2b7b16
 # files not to track in git
2b7b16
 *.pyc
2b7b16
 *.ini
2b7b16
+*.swp
2b7b16
diff --git a/shared/references/cce-rhel-avail.txt b/shared/references/cce-rhel-avail.txt
2b7b16
index 381d3da..41dc47e 100644
2b7b16
--- a/shared/references/cce-rhel-avail.txt
2b7b16
+++ b/shared/references/cce-rhel-avail.txt
2b7b16
@@ -1,6 +1,3 @@
2b7b16
-CCE-27051-2
2b7b16
-CCE-26615-5
2b7b16
-CCE-26763-3
2b7b16
 CCE-26436-6
2b7b16
 CCE-26989-4
2b7b16
 CCE-26992-8