Comment 4 for bug 682662

Revision history for this message
Filip Pytloun (fpytloun) wrote :

Also facing this issue, it's weird that newer pam-auth-update also ignores default option in pam configs. So now it's not possible to non-interactively enable new profile (but it was working in trusty).
Here's updated script to add one profile (mkhomedir) to current set of profiles:

#!/bin/sh

PROFILES=$(debconf-get-selections | grep libpam-runtime/profiles | cut -d ' ' -f 2- | sed s/\,\ mkhomedir//g)
PROFILES="${PROFILES}, mkhomedir"

for profile in /usr/share/pam-configs/*; do
 profile_name=$(grep Name: $profile | cut -d ' ' -f 2-)
 PROFILES=$(echo $PROFILES | sed s,$(basename $profile),"${profile_name}",g)
done

cat > $1 <<EOF
libpam-runtime/profiles="${PROFILES}"
EOF