[Pkg-shadow-devel] Bug#337904: passwd: Should allow using only one debconf variable for root-password and user-password

Christian Perrier bubulle at debian.org
Mon Nov 7 07:09:57 UTC 2005


Package: passwd
Version: 1:4.0.13-5
Severity: wishlist

As discussed with Joey Hess in -boot, it would be nice if preseeding the
root password doesn't need to preseed two debconf variables.

Below is a chunk of code suggested by Joey in this discussion:

===============================================================================
You have to use a different template, but that does not actually imply a
different question. For example:

db_register passwd/root-password-first passwd/root-password
if db_input critical passwd/root-password; then
	db_go || # backup
	db_get passwd/root-password
	first="$RET"
	
	db_register passwd/root-password-again passwd/root-password
	db_input critical passwd/root-password || true
	db_go || # backup
	db_get passwd/root-password
	second="$RET"

	if [ "$first" != "$second" ]; then
		# go back to top
	fi
fi

db_get passwd/root-password
# fill out shadow file here


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages passwd depends on:
ii  debianutils                   2.15.1     Miscellaneous utilities specific t
ii  libc6                         2.3.5-7    GNU C Library: Shared libraries an
ii  libpam-modules                0.79-3     Pluggable Authentication Modules f
ii  libpam0g                      0.79-3     Pluggable Authentication Modules l
ii  login                         1:4.0.13-5 system login tools

passwd recommends no packages.

-- debconf information excluded




More information about the Pkg-shadow-devel mailing list