[Bug 682662] Re: pam-auth-update ignores debconf settings

Trent Lloyd lathiat at bur.st
Wed Dec 28 15:47:46 UTC 2011


Here is the workaround I came up with.  Rather than try preseed, we can
simply answer the questions at the time they are asked using debconf.

The EDITOR frontend essentially dumps the debconf array into a file, reads it back and uses the results to modify the debconf array.
So rather than even bother with the output it created for us, I just pass in the values I know/want to set - the rest will use defaults.
/root/test.sh would obviously be replaced by something a little more robust but it's good to illustrate the point.
Saves me writing a new Frontend, can re use an existing one.


root at gaz4:~# grep ldap /etc/pam.d/common-auth
root at gaz4:~# cat test.sh
#!/bin/sh
cat > $1 <<EOF
libpam-runtime/profiles="Unix authentication, LDAP Authentication"
EOF
root at gaz4:~# EDITOR=/root/test.sh DEBIAN_FRONTEND=editor pam-auth-update
root at gaz4:~# grep ldap /etc/pam.d/common-auth
auth	[success=1 default=ignore]	pam_ldap.so use_first_pass
root at gaz4:~#

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pam in Ubuntu.
https://bugs.launchpad.net/bugs/682662

Title:
  pam-auth-update ignores debconf settings

Status in “pam” package in Ubuntu:
  Triaged
Status in “pam” package in Debian:
  Won't Fix

Bug description:
  pam-auth-update ignores the current debconf-settings. This makes it
  impossible to do automatically configure pam in noninteractive
  installations.

  Demonstration:

  ~ # debconf-get-selections | grep libpam-runtime
  libpam-runtime	libpam-runtime/override	boolean	true
  libpam-runtime	libpam-runtime/conflicts	error	
  libpam-runtime	libpam-runtime/no_profiles_chosen	error	
  libpam-runtime	libpam-runtime/profiles	multiselect	krb5, unix, ldap, tmpdir, gnome-keyring, consolekit
  libpam-runtime	libpam-runtime/you-had-no-auth	error	

  ~ # DEBIAN_FRONTEND=noninteractive pam-auth-update

  ~ # debconf-get-selections | grep libpam-runtime
  libpam-runtime	libpam-runtime/override	boolean	false
  libpam-runtime	libpam-runtime/conflicts	error	
  libpam-runtime	libpam-runtime/no_profiles_chosen	error	
  libpam-runtime	libpam-runtime/profiles	multiselect	krb5, unix, winbind, ldap
  libpam-runtime	libpam-runtime/you-had-no-auth	error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pam/+bug/682662/+subscriptions




More information about the foundations-bugs mailing list