On Mon, Jun 04, 2007 at 07:58:33AM +0200, Christian Perrier wrote: > In #350926, Ken Neighbors reported that, whatever the user chooses to > answer to the samba/generate_smbpasswd question, that file is created > anyway.
> Finally, Peter Eisentraut found that smbd created it anyway and the > *real* question is knowing whether one wants to *copy* the content of > /etc/passwd for passdb.tdb > So, the bug could be turned into a better wording of that template: The original bug report is correct, the debconf answer is *not* being respected. That is separate from any template wording concerns, and should be fixed. I think the attached patch is better for this than the one proposed by the submitter; this ensures that we are only overriding the default value the first time through, which seems correct to me. (I'm also not sure that calling db_set *after* db_input is guaranteed to have the desired effect, does anyone know for sure?) As for the wording, > Template: samba/generate_smbpasswd > Type: boolean > Default: false > _Description: Create samba password database, /var/lib/samba/passdb.tdb? > To be compatible with the defaults in most versions of Windows, Samba must > be configured to use encrypted passwords. This requires user passwords to > be stored in a file separate from /etc/passwd. This file can be created > automatically, but the passwords must be added manually by running > smbpasswd and be kept up-to-date in the future. > . > If you do not create it, you will have to reconfigure Samba (and probably > your client machines) to use plaintext passwords. > . > See /usr/share/doc/samba-doc/htmldocs/ENCRYPTION.html from the > samba-doc package for more details. > > To: > > Template: samba/generate_smbpasswd > Type: boolean > Default: false > _Description: Create the samba password database from /etc/passwd? > To be compatible with the defaults in most versions of Windows, Samba must > be configured to use encrypted passwords. This requires user passwords to > be stored in a file separate from /etc/passwd. This file can be created > automatically, but the passwords must be added manually by running > smbpasswd and be kept up-to-date in the future. > . > If you do not create it, you will have to reconfigure Samba (and probably > your client machines) to use plaintext passwords. > . > See /usr/share/doc/samba-doc/htmldocs/ENCRYPTION.html from the > samba-doc package for more details. Um, diff format would have been nice. :) If the short description is the only thing changed here (and that's all I see), then yes, that seems perfectly fine to me. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/
Index: debian/samba.config =================================================================== --- debian/samba.config (revision 1436) +++ debian/samba.config (working copy) @@ -62,7 +62,8 @@ # If 'encrypt passwords' is true in smb.conf, and smbpasswd # does not exist, default to yes here. FILE=/etc/samba/smb.conf - if [ -f "$FILE" ]; then + db_fget samba/generate_smbpasswd seen + if [ "$RET" = "false" ] && [ -f "$FILE" ]; then ENCRYPT=`smbconf_retr "encrypt passwords"` if [ "$ENCRYPT" ]; then ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'`