diff --git a/back_pwquality.sh b/back_pwquality.sh index d802238..af2bdd3 100644 --- a/back_pwquality.sh +++ b/back_pwquality.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -source "${SHARE_DIR_ROOT}/common.sh" +source "${DESTDIR}/usr/share/linux-infosec-setupper/common.sh" _mk_pwquality_conf() { local failed=0 @@ -149,3 +149,4 @@ EOF if [ "$enforce_for_root" == 1 ]; then echo "enforce_for_root"; fi if [ "$local_users_only" == 1 ]; then echo "local_users_only"; fi } +_mk_pwquality_conf --gecoscheck 3 diff --git a/common.sh b/common.sh index fbec678..d94dacd 100644 --- a/common.sh +++ b/common.sh @@ -21,6 +21,10 @@ error() { echo '' 1>&2 } +# Translations +TEXTDOMAIN=linux-infosec-setupper +TEXTDOMAINDIR=/usr/share/locale + # $1 - value # $2 - param name # (optional) $3 - anything, trigger check for non-negative diff --git a/front_pwquality.sh b/front_pwquality.sh index f30a929..f760f83 100644 --- a/front_pwquality.sh +++ b/front_pwquality.sh @@ -21,7 +21,15 @@ for i in gecoscheck enforce_for_root local_users_only dictcheck usercheck enforc # The variables have the same name as the lines in the config eval 'if [[ $'$i' == 1 ]]; then declare $i=TRUE; else declare $i=FALSE; fi' done -var="$(yad --title=$"linux-infosec-setupper" --form --text=$"Password policies setup" --image=/usr/share/icons/hicolor/48x48/apps/gcr-key.png --scroll --width=800 --height=800 --button=$"Load defaults!view-refresh:3" --button=$"yad-save:0" --button=$"yad-close:1" \ +var="$(yad --title=$"linux-infosec-setupper" --form \ + --text-align=center \ + --bool-fmt=T \ + --text=$"Password policies setup" \ + --image=/usr/share/icons/hicolor/48x48/apps/gcr-key.png \ + --scroll \ + --width=800 \ + --height=800 \ + --button=$"Load defaults!view-refresh:3" --button=$"yad-save:0" --button=$"yad-close:1" \ --field=$"Number of characters in the new password that must not be present in the old password::LBL" "!" \ --field=$"Value (difok)::NUM" "$difok!1..9999!1" \ --field=$"Minimum acceptable size for the new password:LBL" "!" \ diff --git a/mikhailnov.sh b/mikhailnov.sh index c6e79cd..97b3c9c 100755 --- a/mikhailnov.sh +++ b/mikhailnov.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e -. common.sh + +source "${DESTDIR}/usr/share/linux-infosec-setupper/common.sh" # || . ./common.sh # $1 - action # $2 - param name