Fix #43: Debian 11 uses pwquality, not cracklib. Update 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.2.9 9.2.10 for Debian11/Debian12

This commit is contained in:
Samson-W 2023-06-12 01:59:10 +08:00
parent 13f75e093e
commit 03f583ad94
7 changed files with 35 additions and 22 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9/10 or CentOS Hardening
# harbian-audit for Debian GNU/Linux 7/8/9/10/11/12 or CentOS Hardening
#
#
@ -68,7 +68,8 @@ audit_centos () {
audit () {
if [ $OS_RELEASE -eq 1 ]; then
audit_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
audit_centos
else
crit "Current OS is not support!"
@ -114,7 +115,8 @@ apply_centos () {
apply () {
if [ $OS_RELEASE -eq 1 ]; then
apply_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
apply_centos
else
crit "Current OS is not support!"

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 9/10 or CentOS Hardening
# harbian-audit for Debian GNU/Linux 9/10/11/12 or CentOS Hardening
#
#
@ -68,7 +68,8 @@ audit_centos () {
audit () {
if [ $OS_RELEASE -eq 1 ]; then
audit_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
audit_centos
else
crit "Current OS is not support!"
@ -76,7 +77,6 @@ audit () {
fi
}
apply_debian () {
if [ $FNRET = 0 ]; then
ok "$PACKAGE is installed"
@ -115,7 +115,8 @@ apply_centos () {
apply () {
if [ $OS_RELEASE -eq 1 ]; then
apply_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
apply_centos
else
crit "Current OS is not support!"

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 9/10 or CentOS Hardening
# harbian-audit for Debian GNU/Linux 9/10/11/12 or CentOS Hardening
#
#
@ -68,7 +68,8 @@ audit_centos () {
audit () {
if [ $OS_RELEASE -eq 1 ]; then
audit_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
audit_centos
else
crit "Current OS is not support!"
@ -114,7 +115,8 @@ apply_centos () {
apply () {
if [ $OS_RELEASE -eq 1 ]; then
apply_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
apply_centos
else
crit "Current OS is not support!"

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 9/10 or CentOS Hardening
# harbian-audit for Debian GNU/Linux 9/10/11/12 or CentOS Hardening
#
#
@ -68,7 +68,8 @@ audit_centos () {
audit () {
if [ $OS_RELEASE -eq 1 ]; then
audit_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
audit_centos
else
crit "Current OS is not support!"
@ -114,7 +115,8 @@ apply_centos () {
apply () {
if [ $OS_RELEASE -eq 1 ]; then
apply_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
apply_centos
else
crit "Current OS is not support!"

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9/10 or CentOS Hardening
# harbian-audit for Debian GNU/Linux 7/8/9/10/11/12 or CentOS Hardening
#
#
@ -68,7 +68,8 @@ audit_centos () {
audit () {
if [ $OS_RELEASE -eq 1 ]; then
audit_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
audit_centos
else
crit "Current OS is not support!"
@ -114,7 +115,8 @@ apply_centos () {
apply () {
if [ $OS_RELEASE -eq 1 ]; then
apply_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
apply_centos
else
crit "Current OS is not support!"

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9/10 or CentOS Hardening
# harbian-audit for Debian GNU/Linux 7/8/9/10/11/12 or CentOS Hardening
#
#
@ -68,7 +68,8 @@ audit_centos () {
audit () {
if [ $OS_RELEASE -eq 1 ]; then
audit_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
audit_centos
else
crit "Current OS is not support!"
@ -114,7 +115,8 @@ apply_centos () {
apply () {
if [ $OS_RELEASE -eq 1 ]; then
apply_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
apply_centos
else
crit "Current OS is not support!"

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# harbian-audit for Debian GNU/Linux 7/8/9/10 or CentOS Hardening
# harbian-audit for Debian GNU/Linux 7/8/9/10/11/12 or CentOS Hardening
#
#
@ -68,7 +68,8 @@ audit_centos () {
audit () {
if [ $OS_RELEASE -eq 1 ]; then
audit_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
audit_centos
else
crit "Current OS is not support!"
@ -114,7 +115,8 @@ apply_centos () {
apply () {
if [ $OS_RELEASE -eq 1 ]; then
apply_debian
elif [ $OS_RELEASE -eq 2 ]; then
# debian11/debian12 default use pam_pwquality, same as centos
elif [ $OS_RELEASE -eq 2 -o $OS_RELEASE -eq 11 -o $OS_RELEASE -eq 12 ]; then
apply_centos
else
crit "Current OS is not support!"