Skip to content

Commit

Permalink
Allow to update password policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Hao Wang committed Mar 7, 2023
1 parent 10050ea commit 66f2bd1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions hooks/001-extra-packages.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ apt install --no-install-recommends -y \
libnss-extrausers \
libpam-systemd \
libpam-modules \
libpam-pwquality \
distro-info-data \
tzdata \
openssh-server \
Expand Down
8 changes: 8 additions & 0 deletions hooks/200-enable-pwquality.chroot
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh -x

set -e

# Enable pam configuration for pwquality
pam-auth-update --enable pwquality
# and verify it is available
grep pam_pwquality.so /etc/pam.d/common-password
2 changes: 2 additions & 0 deletions static/etc/system-image/writable-paths
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@
/etc/machine-id auto persistent transition none
# make update-motd writable for branding purposes
/etc/update-motd.d auto persistent transition none
# allow to update password policy
/etc/security/pwquality.conf auto persistent transition none

0 comments on commit 66f2bd1

Please sign in to comment.