| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# pam-auth-update makes wrong assumptions and doesn't allow no-op modules, so |
| 6 |
# we need to remove 'use_authtok try_first_pass' after it runs |
| 7 |
_fixup_common_password() { |
| 8 |
sed -i "s/pam_unix.so obscure use_authtok try_first_pass/pam_unix.so obscure/g" /etc/pam.d/common-password || true |
| 9 |
} |
| 10 |
|
| 11 |
if [ "$1" = "triggered" ]; then |
| 12 |
shift |
| 13 |
for trigger in $@; do |
| 14 |
case $trigger in |
| 15 |
/usr/share/pam-configs) |
| 16 |
_fixup_common_password |
| 17 |
;; |
| 18 |
esac |
| 19 |
done |
| 20 |
exit 0 |
| 21 |
fi |
| 22 |
|
| 23 |
pam-auth-update --package --enable systemd-homed |
| 24 |
_fixup_common_password |
| 25 |
|
| 26 |
#DEBHELPER# |