51 lines
2.5 KiB
Diff
51 lines
2.5 KiB
Diff
From 8c6d618070476bd81edd0524c895a3497fc902a6 Mon Sep 17 00:00:00 2001
|
|
From: Watson Sato <wsato@redhat.com>
|
|
Date: Thu, 10 Nov 2022 17:48:55 +0100
|
|
Subject: [PATCH] accounts_password_pam_retry: Add test for dupes and conflicts
|
|
|
|
Add test scenarios to ensure that conflicting values are failing
|
|
and that duplicated rule are passing.
|
|
---
|
|
.../tests/pwquality_conf_conflicting_values.fail.sh | 12 ++++++++++++
|
|
.../tests/pwquality_conf_duplicate_values.pass.sh | 12 ++++++++++++
|
|
2 files changed, 24 insertions(+)
|
|
create mode 100644 linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_conflicting_values.fail.sh
|
|
create mode 100644 linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_duplicate_values.pass.sh
|
|
|
|
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_conflicting_values.fail.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_conflicting_values.fail.sh
|
|
new file mode 100644
|
|
index 00000000000..16bd1171a46
|
|
--- /dev/null
|
|
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_conflicting_values.fail.sh
|
|
@@ -0,0 +1,12 @@
|
|
+#!/bin/bash
|
|
+# variables = var_password_pam_retry=3
|
|
+
|
|
+source common.sh
|
|
+
|
|
+CONF_FILE="/etc/security/pwquality.conf"
|
|
+retry_cnt=3
|
|
+
|
|
+truncate -s 0 $CONF_FILE
|
|
+
|
|
+echo "retry = 3" >> $CONF_FILE
|
|
+echo "retry = 4" >> $CONF_FILE
|
|
diff --git a/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_duplicate_values.pass.sh b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_duplicate_values.pass.sh
|
|
new file mode 100644
|
|
index 00000000000..da37627dbb3
|
|
--- /dev/null
|
|
+++ b/linux_os/guide/system/accounts/accounts-pam/password_quality/password_quality_pwquality/accounts_password_pam_retry/tests/pwquality_conf_duplicate_values.pass.sh
|
|
@@ -0,0 +1,12 @@
|
|
+#!/bin/bash
|
|
+# variables = var_password_pam_retry=3
|
|
+
|
|
+source common.sh
|
|
+
|
|
+CONF_FILE="/etc/security/pwquality.conf"
|
|
+retry_cnt=3
|
|
+
|
|
+truncate -s 0 $CONF_FILE
|
|
+
|
|
+echo "retry = 3" >> $CONF_FILE
|
|
+echo "retry = 3" >> $CONF_FILE
|