diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-03-18 17:21:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-18 17:21:08 +0200 |
commit | 0af5728700b0b5da30e7713a4596aeadaf537b49 (patch) | |
tree | b5422af7268dac20dda715b5b13fb1b7488b0502 /debian | |
parent | 95af91597c94856a38722daa5ea388646f9b735f (diff) | |
parent | 93f02429533fdaa0b520779a82c992f6e3d43466 (diff) | |
download | vyos-1x-0af5728700b0b5da30e7713a4596aeadaf537b49.tar.gz vyos-1x-0af5728700b0b5da30e7713a4596aeadaf537b49.zip |
Merge pull request #4390 from oniko94/feature/T6353-add-password-complexity-validation
T6353: Add password complexity validation for system login user
Diffstat (limited to 'debian')
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/vyos-1x.postinst | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/debian/control b/debian/control index efc008af2..4f1207078 100644 --- a/debian/control +++ b/debian/control @@ -123,6 +123,8 @@ Depends: # Live filesystem tools squashfs-tools, fuse-overlayfs, +# Tools for checking password strength + python3-cracklib, ## End installer auditd, iputils-arping, diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst index fde58651a..ba97f37f6 100644 --- a/debian/vyos-1x.postinst +++ b/debian/vyos-1x.postinst @@ -195,6 +195,10 @@ if [ ! -x $PRECONFIG_SCRIPT ]; then EOF fi +# cracklib-runtime default database location +CRACKLIB_DIR=/var/cache/cracklib +CRACKLIB_DB=cracklib_dict + # create /opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script POSTCONFIG_SCRIPT=/opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script if [ ! -x $POSTCONFIG_SCRIPT ]; then @@ -206,7 +210,15 @@ if [ ! -x $POSTCONFIG_SCRIPT ]; then # This script is executed at boot time after VyOS configuration is fully applied. # Any modifications required to work around unfixed bugs # or use services not available through the VyOS CLI system can be placed here. - +# +# T6353 - Just in case, check if cracklib was installed properly +# If the database file is missing, re-install the runtime package +# +if [ ! -f "${CRACKLIB_DIR}/${CRACKLIB_DB}.pwd" ]; then + mkdir -p $CRACKLIB_DIR + /usr/sbin/create-cracklib-dict -o $CRACKLIB_DIR/$CRACKLIB_DB \ + /usr/share/dict/cracklib-small +fi EOF fi |