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