[Adduser-devel] Bug#433639: adduser --system does not obey --disabled-password

Ray Miller ray at sysdev.oucs.ox.ac.uk
Wed Jul 18 12:30:51 UTC 2007


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


When adduser is invoked with both --system and --disabled-password options, the --disabled-password
option has no effect (i.e. the account is created as if --disabled-login was specified).  This can be
a problem, for example, if the system administrator wants to create a system user that can log in using
SSH pubkey authentication.

Patch against unstable attached.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages adduser depends on:
ii  debconf [debconf-2.0]       1.5.11       Debian configuration management sy
ii  passwd                      1:4.0.18.1-7 change and administer password and
ii  perl-base                   5.8.8-7      The Pathologically Eclectic Rubbis

adduser recommends no packages.

-- debconf information excluded
-------------- next part --------------
diff -uNr adduser-3.104.ORI/adduser adduser-3.104/adduser
--- adduser-3.104.ORI/adduser	2007-07-09 23:51:49.000000000 +0100
+++ adduser-3.104/adduser	2007-07-18 13:21:41.000000000 +0100
@@ -415,6 +415,10 @@
     my $useradd = &which('useradd');
     &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s',
 		$shell, '-u', $new_uid, $new_name);
+    if(!$disabled_login) {
+        my $usermod = &which('usermod');
+        &systemcall($usermod, '-p', '*', $new_name);
+    }
     my $chage = &which('chage');
     print "$chage -M 99999 $new_name\n" if ($verbose > 1);
     # do _not_ use systemcall() here, since systemcall() dies on


More information about the Adduser-devel mailing list