[Adduser-devel] Bug#302837: marked as done (adduser: option disabled-login is suprising)

Debian Bug Tracking System owner@bugs.debian.org
Sat, 18 Jun 2005 11:48:26 -0700

Your message dated Sat, 18 Jun 2005 14:32:08 -0400
with message-id <E1Dji6y-00049o-00@newraff.debian.org>
and subject line Bug#302837: fixed in adduser 3.64
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 3 Apr 2005 08:48:18 +0000
>From Tuukka.Hastrup@iki.fi Sun Apr 03 00:48:18 2005
Return-path: <Tuukka.Hastrup@iki.fi>
Received: from posti5.jyu.fi [] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DI0mH-0007jw-00; Sun, 03 Apr 2005 00:48:17 -0800
Received: from frownie.kortex.jyu.fi (frownie.kortex.jyu.fi [])
	by posti5.jyu.fi (8.12.8/8.12.8/antispam) with ESMTP id j338mFRF003077;
	Sun, 3 Apr 2005 11:48:15 +0300
Message-Id: <200504030848.j338mFRF003077@posti5.jyu.fi>
Content-Type: multipart/mixed; boundary="===============1425468938=="
MIME-Version: 1.0
From: Tuukka Hastrup <Tuukka.Hastrup@iki.fi>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: adduser: option disabled-login is suprising
X-Mailer: reportbug 3.8
Date: Sun, 03 Apr 2005 11:47:36 +0300
X-Virus-Scanned: by amavisd-milter (http://www.amavis.org/)
	at posti5.jyu.fi; Sun, 03 Apr 2005 11:48:15 +0300
X-Spam-Checked: by miltrassassin
	at posti5.jyu.fi; Sun, 03 Apr 2005 11:48:16 +0300
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

This is a multi-part MIME message sent by reportbug.

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: adduser
Version: 3.63
Severity: normal
Tags: patch

The interaction between the two options that control the content of 
password field, --disabled-login and --disabled-password, is 
currently suprising for the user. From user's point of view, one would 
expect that these two options aren't mutually exclusive. We don't even 
print a warning if we get both, so there are instructions in the net 
that use "--disabled-password --disabled-login" or even 
"--disabled-login --disabled-password", which does not disable logins in 
the current implementation.

Please consider applying the attached patch which makes these two 
options add to each other instead of only the last option taking effect.
In addition, the patch makes the default value of $disabled_login 
explicit so we don't depend on the boolean value of an undefined 
variable, and adds a comment to make it clearer that we depend on 
useradd having set the password string to '!' initially.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.10-1-386
Locale: LANG=fi_FI, LC_CTYPE=fi_FI (charmap=ISO-8859-1)

Versions of packages adduser depends on:
ii  debconf               Debian configuration management sy
ii  passwd                     1:4.0.3-30.10 change and administer password and
ii  perl-base                  5.8.4-8       The Pathologically Eclectic Rubbis

-- debconf information:
* adduser/homedir-permission: true

Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="adduser-bothdisabled.patch"

diff -ur adduser-3.63/adduser adduser-3.63-bothdisabled/adduser
--- adduser-3.63/adduser	2005-03-04 08:36:05.000000000 +0200
+++ adduser-3.63-bothdisabled/adduser	2005-04-03 11:03:56.492547870 +0300
@@ -95,6 +95,7 @@
 $verbose = 1;			# should we be verbose?
 $allow_badname = 0;		# should we allow bad names?
 $ask_passwd = 1;		# ask for a passwd?
+$disabled_login = 0;		# leave the new account disabled?
 $defaults = "/etc/adduser.conf";
 $nogroup_id = getgrnam("nogroup") || 65534;
@@ -157,8 +158,7 @@
 		if (!defined($special_shell = shift(@ARGV)));
     } elsif ($arg eq "--disabled-password") {
 	$ask_passwd = 0;
-	$disabled_login = 0;
-	} elsif ($arg eq "--disabled-login") {
+    } elsif ($arg eq "--disabled-login") {
 	$ask_passwd = 0;
 	$disabled_login = 1;
     } elsif ($arg eq "--uid") {
@@ -551,6 +551,8 @@
+    # useradd without -p has left the account disabled (password string is '!')
     if ($ask_passwd) {
 	&systemcall('/usr/bin/passwd', $new_name);
     } else {


Received: (at 302837-close) by bugs.debian.org; 18 Jun 2005 18:38:18 +0000
>From katie@ftp-master.debian.org Sat Jun 18 11:38:18 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DjiCw-0000bB-00; Sat, 18 Jun 2005 11:38:18 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1Dji6y-00049o-00; Sat, 18 Jun 2005 14:32:08 -0400
From: Marc Haber <mh+debian-packages@zugschlus.de>
To: 302837-close@bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#302837: fixed in adduser 3.64
Message-Id: <E1Dji6y-00049o-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Sat, 18 Jun 2005 14:32:08 -0400
Delivered-To: 302837-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 5

Source: adduser
Source-Version: 3.64

We believe that the bug you reported is fixed in the latest version of
adduser, which is due to be installed in the Debian FTP archive:

  to pool/main/a/adduser/adduser_3.64.dsc
  to pool/main/a/adduser/adduser_3.64.tar.gz
  to pool/main/a/adduser/adduser_3.64_all.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 302837@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Marc Haber <mh+debian-packages@zugschlus.de> (supplier of updated adduser package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.7
Date: Sat, 18 Jun 2005 17:09:56 +0000
Source: adduser
Binary: adduser
Architecture: source all
Version: 3.64
Distribution: unstable
Urgency: low
Maintainer: Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>
Changed-By: Marc Haber <mh+debian-packages@zugschlus.de>
 adduser    - Add and remove users and groups
Closes: 298834 298883 299489 300641 302837 303854 307599 308881 313517
 adduser (3.64) unstable; urgency=low
   * The "bring the svn changes to unstable while not having time to
     address the other valid bug reports" release.
   * try Priority: - to avoid override disparities
   * Updated Norwegian Bokmal debconf templates and program translations.
     Thanks to Hans Fredrik Nordhaug. (mh) Closes: #298834
   * Re-generate adduser.pot, fix gettext bugs in deluser. Thanks to
     Hans Fredrik Nordhaug. (mh)
   * Now handles /etc/skel correctly even if it is not readable for a
     normal user. Thanks to Chapko Dimitrij. (mh) Closes: #299489
   * Zap program synopsis comments from the beginning.
   * Fix $ error in adduser.conf.5. Thanks to Kevin Ryde.
     (mh) Closes: #300641
   * Add Finnish debconf templates. Thanks to Matti Pöllä.
     (mh) Closes: #303854
   * Add Vietnamese debconf templates. Thanks to Clytie Siddall.
     (mh) Closes: #307599
   * Fix broken --disabled-login --disabled-password handling. Thanks
     to Tokka Hastrup. (mh) Closes: #302837
   * Use chage to override login.defs PASS_MAX_DAYS for system accounts.
     Thanks to Gerhard Schrenk. (mh) Closes: #298883
   * fix misdocumentation of system user password status.
     Thanks to Shaul Karl. (mh) Closes: #308881
   * add ubuntu patch to generate pot file during package build, and
     fix two s_print/s_printf invocations in deluser.
     Thanks to Martin Pitt. (mh) Closes: #313517
 711979e2159409f4519768571b611c78 637 base important adduser_3.64.dsc
 1c4c53c95b37ba4c243ed6f8590e1c0b 108282 base important adduser_3.64.tar.gz
 ed92dd4399e93b53faabde61b84f081a 99822 base important adduser_3.64_all.deb

Version: GnuPG v1.4.1 (GNU/Linux)