Improve password rules for local accounts
This commit is contained in:
1
debian/control
vendored
1
debian/control
vendored
@@ -18,6 +18,7 @@ Depends: ${misc:Depends},
|
|||||||
libpam-sss,
|
libpam-sss,
|
||||||
libpam-pkcs11,
|
libpam-pkcs11,
|
||||||
libpam-ccreds,
|
libpam-ccreds,
|
||||||
|
libpam-pwquality,
|
||||||
orange-certs,
|
orange-certs,
|
||||||
orange-krb5
|
orange-krb5
|
||||||
Recommends:
|
Recommends:
|
||||||
|
|||||||
23
debian/postinst
vendored
23
debian/postinst
vendored
@@ -3,6 +3,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
CONF_FILE="/etc/security/pwquality.conf"
|
||||||
|
|
||||||
|
yd_update_keyval() { # file key value...
|
||||||
|
local file="$1" key="$2" ; shift 2
|
||||||
|
# delete line starting with key then append to the end
|
||||||
|
sed -e "/^[ \t]*$key[ \t]\=/d" -e "\$a$key = $*" -i "$file"
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
# Enable GDM customization
|
# Enable GDM customization
|
||||||
@@ -57,6 +65,21 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Min size of password
|
||||||
|
yd_update_keyval "$CONF_FILE" "minlen" "12"
|
||||||
|
|
||||||
|
# Lowercase char (-1 => min 1 char)
|
||||||
|
yd_update_keyval "$CONF_FILE" "lcredit" "-1"
|
||||||
|
|
||||||
|
# Uppercase char (-1 => min 1 char)
|
||||||
|
yd_update_keyval "$CONF_FILE" "ucredit" "-1"
|
||||||
|
|
||||||
|
# Decimal char (-1 => min 1 char)
|
||||||
|
yd_update_keyval "$CONF_FILE" "dcredit" "-1"
|
||||||
|
|
||||||
|
# Other char (-1 => min 1 char)
|
||||||
|
yd_update_keyval "$CONF_FILE" "ocredit" "-1"
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
# dh_installdeb will replace this with shell code automatically
|
||||||
# generated by other debhelper scripts.
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user