summaryrefslogtreecommitdiffstats
path: root/debian/systemd-homed.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/systemd-homed.postinst')
-rw-r--r--debian/systemd-homed.postinst21
1 files changed, 20 insertions, 1 deletions
diff --git a/debian/systemd-homed.postinst b/debian/systemd-homed.postinst
index 7e37590..0be578f 100644
--- a/debian/systemd-homed.postinst
+++ b/debian/systemd-homed.postinst
@@ -2,6 +2,25 @@
set -e
-pam-auth-update --package
+# pam-auth-update makes wrong assumptions and doesn't allow no-op modules, so
+# we need to remove 'use_authtok try_first_pass' after it runs
+_fixup_common_password() {
+ sed -i "s/pam_unix.so obscure use_authtok try_first_pass/pam_unix.so obscure/g" /etc/pam.d/common-password || true
+}
+
+if [ "$1" = "triggered" ]; then
+ shift
+ for trigger in $@; do
+ case $trigger in
+ /usr/share/pam-configs)
+ _fixup_common_password
+ ;;
+ esac
+ done
+ exit 0
+fi
+
+pam-auth-update --package --enable systemd-homed
+_fixup_common_password
#DEBHELPER#