Skip to content

Commit 3876c99

Browse files
Adjust ubuntu fix for stig
1 parent da3848d commit 3876c99

File tree

1 file changed

+11
-0
lines changed
  • linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/bash

1 file changed

+11
-0
lines changed

linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/bash/ubuntu.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,15 @@
33
{{{ bash_instantiate_variables("var_password_pam_retry") }}}
44

55
{{{ bash_pam_pwquality_enable() }}}
6+
{{% if product == 'ubuntu2404' %}}
7+
sed -i -E '/^Password:/,/^[^[:space:]]/ {
8+
/pam_pwquality\.so/ {
9+
s/\s*\bretry=\d+\b//g
10+
s/$/ retry='"$var_password_pam_retry"'/g
11+
}
12+
}' /usr/share/pam-configs/cac_pwquality
13+
14+
DEBIAN_FRONTEND=noninteractive pam-auth-update --enable cac_pwquality
15+
{{% else %}}
616
{{{ bash_pam_pwquality_parameter_value('retry', "$var_password_pam_retry") }}}
17+
{{% endif %}}

0 commit comments

Comments
 (0)