Skip to content

Commit a20bb6d

Browse files
Merge pull request #14095 from teacup-on-rockingchair/pwquality_pwhistory_file_use_var
pwquality and pwhistory fixes
2 parents 5a103d1 + e1ba415 commit a20bb6d

File tree

132 files changed

+382
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+382
-236
lines changed

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/oval/shared.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
comment="Check the pam_pwhistory.so remember parameter is absent in password-auth file"/>
3636
<criterion
3737
test_ref="test_accounts_password_pam_pwhistory_remember_password_auth_pwhistory_conf"
38-
comment="Check the remember parameter in /etc/security/pwhistory.conf"/>
38+
comment="Check the remember parameter in {{{ pwhistory_path }}}"/>
3939
</criteria>
4040
</criteria>
4141
</criteria>
@@ -82,15 +82,15 @@
8282

8383
<ind:textfilecontent54_test check="all" check_existence="none_exist" version="1"
8484
id="test_accounts_password_pam_pwhistory_remember_password_auth_no_pwhistory_conf"
85-
comment="Check the absence of remember parameter in /etc/security/pwhistory.conf">
85+
comment="Check the absence of remember parameter in {{{ pwhistory_path }}}">
8686
<ind:object
8787
object_ref="object_accounts_password_pam_pwhistory_remember_password_auth_param_conf"/>
8888
</ind:textfilecontent54_test>
8989

9090
<ind:textfilecontent54_object
9191
id="object_accounts_password_pam_pwhistory_remember_password_auth_param_conf" version="1"
92-
comment="Collect the pam_pwhistory.so remember parameter from /etc/security/pwhistory.conf">
93-
<ind:filepath operation="pattern match">^/etc/security/pwhistory.conf$</ind:filepath>
92+
comment="Collect the pam_pwhistory.so remember parameter from {{{ pwhistory_path }}}">
93+
<ind:filepath operation="pattern match">^{{{ pwhistory_path }}}$</ind:filepath>
9494
<ind:pattern operation="pattern match"
9595
var_ref="var_accounts_password_pam_pwhistory_remember_password_auth_conf_param_regex"/>
9696
<ind:instance datatype="int" operation="equals">1</ind:instance>
@@ -107,7 +107,7 @@
107107
<ind:textfilecontent54_test
108108
id="test_accounts_password_pam_pwhistory_remember_password_auth_pwhistory_conf" version="1"
109109
check="all" check_existence="all_exist"
110-
comment="Check remember parameter is present and correct in /etc/security/pwhistory.conf">
110+
comment="Check remember parameter is present and correct in {{{ pwhistory_path }}}">
111111
<ind:object object_ref="object_accounts_password_pam_pwhistory_remember_password_auth_param_conf"/>
112112
<ind:state state_ref="state_accounts_password_pam_pwhistory_remember_password_auth"/>
113113
</ind:textfilecontent54_test>

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/rule.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description: |-
2121
2222
Otherwise, it should be enabled using an authselect custom profile.
2323
<br/><br/>
24-
Newer systems also have the <tt>/etc/security/pwhistory.conf</tt> file for setting
24+
Newer systems also have the <tt>{{{ pwhistory_path }}}</tt> file for setting
2525
<tt>pam_pwhistory</tt> module options. This file should be used whenever available.
2626
Otherwise, the <tt>pam_pwhistory</tt> module options can be set in PAM files.
2727
<br/><br/>
@@ -56,7 +56,7 @@ references:
5656

5757
ocil_clause: |-
5858
the pam_pwhistory.so module is not used, the "remember" module option is not set in
59-
/etc/pam.d/password-auth or in /etc/security/pwhistory.conf, or is set in both files, or is set
59+
/etc/pam.d/password-auth or in {{{ pwhistory_path }}}, or is set in both files, or is set
6060
with a value less than "{{{ xccdf_value("var_password_pam_remember") }}}"
6161
6262
ocil: |-
@@ -70,9 +70,9 @@ ocil: |-
7070
password {{{ xccdf_value("var_password_pam_remember_control_flag") }}} pam_pwhistory.so use_authtok remember={{{ xccdf_value("var_password_pam_remember") }}}</pre>
7171
7272
{{% if product not in ["ol7"] %}}
73-
Verify the "/etc/security/pwhistory.conf" file using the following command:
73+
Verify the "{{{ pwhistory_path }}}" file using the following command:
7474
75-
<pre>$ grep remember /etc/security/pwhistory.conf
75+
<pre>$ grep remember {{{ pwhistory_path }}}
7676
remember = {{{ xccdf_value("var_password_pam_remember") }}}</pre>
7777
7878
The pam_pwhistory.so "remember" option must be configured only in one file.
@@ -89,7 +89,7 @@ fixtext: |-
8989
First ensure the pam_pwhistory.so module is enabled in the password section of "/etc/pam.d/password-auth":
9090
<pre>password {{{ xccdf_value("var_password_pam_remember_control_flag") }}} pam_pwhistory.so use_authtok</pre>
9191
92-
If the "/etc/security/pwhistory.conf" is present in the system, use it to set the "remember" option:
92+
If the "{{{ pwhistory_path }}}" is present in the system, use it to set the "remember" option:
9393
<pre>remember = {{{ xccdf_value("var_password_pam_remember") }}}</pre>
9494
9595
Otherwise, include the "remember" option in "/etc/pam.d/password-auth" file:

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_conflict_settings.fail.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ else
1515
fi
1616
authselect apply-changes -b
1717

18-
> /etc/security/pwhistory.conf
19-
echo "remember = $remember_cnt" >> /etc/security/pwhistory.conf
18+
> {{{ pwhistory_path }}}
19+
echo "remember = $remember_cnt" >> {{{ pwhistory_path }}}

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_correct_value_conf.pass.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ else
1616
fi
1717
authselect apply-changes -b
1818

19-
> /etc/security/pwhistory.conf
20-
echo "remember = $remember_cnt" >> /etc/security/pwhistory.conf
19+
> {{{ pwhistory_path }}}
20+
echo "remember = $remember_cnt" >> {{{ pwhistory_path }}}

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_correct_value_pam.pass.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ else
1515
fi
1616
authselect apply-changes -b
1717

18-
> /etc/security/pwhistory.conf
18+
> {{{ pwhistory_path }}}

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_missing_argument.fail.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ else
1818
fi
1919
fi
2020
authselect apply-changes -b
21-
> /etc/security/pwhistory.conf
21+
> {{{ pwhistory_path }}}

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_missing_line.fail.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ else
1414
sed -i --follow-symlinks '/.*pam_pwhistory\.so/d' $CUSTOM_PASSWORD_AUTH
1515
fi
1616
authselect apply-changes -b
17-
> /etc/security/pwhistory.conf
17+
> {{{ pwhistory_path }}}

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_modified_pam.fail.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if ! $(grep -q "^[^#].*pam_pwhistory\.so.*remember=" $SYSTEM_AUTH_FILE); then
1111
else
1212
sed -i --follow-symlinks "s/\(.*pam_pwhistory\.so.*remember=\)[[:digit:]]\+\s\(.*\)/\1/g" $SYSTEM_AUTH_FILE
1313
fi
14-
> /etc/security/pwhistory.conf
14+
> {{{ pwhistory_path }}}

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_wrong_value_conf.fail.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ else
1616
fi
1717
authselect apply-changes -b
1818

19-
> /etc/security/pwhistory.conf
20-
echo "remember = $remember_cnt" >> /etc/security/pwhistory.conf
19+
> {{{ pwhistory_path }}}
20+
echo "remember = $remember_cnt" >> {{{ pwhistory_path }}}

linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_password_pam_pwhistory_remember_password_auth/tests/authselect_wrong_value_pam.fail.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ else
1515
fi
1616
authselect apply-changes -b
1717

18-
> /etc/security/pwhistory.conf
18+
> {{{ pwhistory_path }}}

0 commit comments

Comments
 (0)