From 642d386baf2a31bc97b662e74ca20f13674468b8 Mon Sep 17 00:00:00 2001 From: mengyuan Date: Mon, 22 Aug 2022 16:15:06 +0800 Subject: [PATCH] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. libpwquality (1.4.2-1kylin15) v101; urgency=medium * TASK #42814 修改系统默认密码密码复杂度: 8位,2类字符,开启用户名,回文,相似性,字典检测 Gbp-Pq: Name KYLIN-default-pwq-settings.patch --- po/zh_CN.po | 2 +- src/pwqprivate.h | 8 ++++---- src/pwquality.conf | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/po/zh_CN.po b/po/zh_CN.po index 2b5d236..e158e26 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -76,7 +76,7 @@ msgstr "内存分配错误" #: src/error.c:37 msgid "The password is the same as the old one" -msgstr "和旧密码相同" +msgstr "与旧密码相同" #: src/error.c:39 msgid "The password is a palindrome" diff --git a/src/pwqprivate.h b/src/pwqprivate.h index 600dd3b..66a2c92 100644 --- a/src/pwqprivate.h +++ b/src/pwqprivate.h @@ -43,14 +43,14 @@ struct setting_mapping { }; #define PWQ_DEFAULT_DIFF_OK 0 -#define PWQ_DEFAULT_MIN_LENGTH 6 +#define PWQ_DEFAULT_MIN_LENGTH 8 #define PWQ_DEFAULT_DIG_CREDIT 0 #define PWQ_DEFAULT_UP_CREDIT 0 #define PWQ_DEFAULT_LOW_CREDIT 0 #define PWQ_DEFAULT_OTH_CREDIT 0 #define PWQ_DEFAULT_MIN_CLASS 2 -#define PWQ_DEFAULT_DICT_CHECK 0 -#define PWQ_DEFAULT_USER_CHECK 0 +#define PWQ_DEFAULT_DICT_CHECK 1 +#define PWQ_DEFAULT_USER_CHECK 1 #define PWQ_DEFAULT_ENFORCING 1 #define PWQ_DEFAULT_RETRY_TIMES 1 #define PWQ_DEFAULT_ENFORCE_ROOT 1 @@ -62,7 +62,7 @@ struct setting_mapping { #define PWQ_TYPE_STR 2 #define PWQ_TYPE_SET 3 -#define PWQ_BASE_MIN_LENGTH 6 /* used when lower than this value of min len is set */ +#define PWQ_BASE_MIN_LENGTH 1 /* used when lower than this value of min len is set */ #define PWQ_NUM_CLASSES 4 #define PWQ_NUM_GENERATION_TRIES 3 /* how many times to try to generate the random password if it fails the check */ #define PWQ_MIN_WORD_LENGTH 4 diff --git a/src/pwquality.conf b/src/pwquality.conf index c7de8b9..e538040 100644 --- a/src/pwquality.conf +++ b/src/pwquality.conf @@ -7,8 +7,7 @@ # # Minimum acceptable size for the new password (plus one if # credits are not disabled which is the default). (See pam_cracklib manual.) -# Cannot be set to lower value than 6. -# minlen = 6 +# minlen = 8 # # The maximum credit for having digits in the new password. If less than 0 # it is the minimum number of digits in the new password. @@ -76,9 +75,9 @@ # # Whether to check the new password is a palindrome or not # Enabled if the option is present -# palindrome +palindrome # # Whether to check the new password is simliar with old one # Check include only case changes and rotated # Disabled if the option is present -# no_similar_check \ No newline at end of file +# no_similar_check