Package: base-passwd Version: 3.5.9 Severity: wishlist When the package installs, it looks for the package-provided /usr/share/base-passwd/{passwd,group}.master. If a site has local changes, it is necessary to override the package files. If the site wants to do this during noninteractive Debian installation (ks), they have no choice but to modify the package before installation.
I've attached a first-pass fix which looks for /etc/base-passwd/{passwd,group}.local first. -- System Information: Debian Release: 3.1 Architecture: amd64 (x86_64) Kernel: Linux 2.6.9-9-amd64-k8-smp Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages base-passwd depends on: ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an -- no debconf information
--- base-passwd.postinst.orig 2003-10-28 17:52:38.000000000 -0800 +++ base-passwd.postinst 2005-06-13 12:47:25.462530000 -0700 @@ -49,12 +49,30 @@ exit 0 fi +PASSWD_MASTER=/usr/share/base-passwd/passwd.master +GROUP_MASTER=/usr/share/base-passwd/group.master + +PASSWD_LOCAL=/etc/base-passwd/passwd.local +GROUP_LOCAL=/etc/base-passwd/group.local + +if [ -e ${PASSWD_LOCAL} ] ; then + PASSWD_FILE=${PASSWD_LOCAL} +else + PASSWD_FILE=${PASSWD_MASTER} +fi + +if [ -e ${GROUP_LOCAL} ] ; then + GROUP_FILE=${GROUP_LOCAL} +else + GROUP_FILE=${GROUP_MASTER} +fi + if [ ! -e /etc/passwd ] ; then - cp /usr/share/base-passwd/passwd.master /etc/passwd + cp $PASSWD_FILE /etc/passwd fi if [ ! -e /etc/group ] ; then - cp /usr/share/base-passwd/group.master /etc/group + cp $GROUP_FILE /etc/group fi if [ "$2" = "3.2.2" ] && [ -f /etc/passwd.org ] ; then @@ -76,7 +94,7 @@ fi tmp=`tempfile` -if ! update-passwd --dry-run > $tmp ; then +if ! update-passwd -p ${PASSWD_FILE} -g ${GROUP_FILE} --dry-run > $tmp ; then cat <<EOF update-passwd has found some differences between your system accounts @@ -104,7 +122,7 @@ if [ "$a" = "y" ] ; then echo "Okay, I am going to make the necessary updates now" - update-passwd --verbose + update-passwd -p ${PASSWD_FILE} -g ${GROUP_FILE} --verbose changes=1 elif [ "$a" = "n" ] ; then cat <<EOF