Author: zugschlus Date: 2005-04-16 13:36:51 +0000 (Sat, 16 Apr 2005) New Revision: 223 Modified: trunk/adduser trunk/debian/changelog Log: * Fix broken --disabled-login --disabled-password handling. Thanks to Tokka Hastrup. (mh) Closes: #302837 Modified: trunk/adduser ==================================================================--- trunk/adduser 2005-04-16 12:36:56 UTC (rev 222) +++ trunk/adduser 2005-04-16 13:36:51 UTC (rev 223) @@ -56,6 +56,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; @@ -118,8 +119,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") { @@ -512,6 +512,8 @@ } } + # useradd without -p has left the account disabled (password string is ''!'') + if ($ask_passwd) { &systemcall(''/usr/bin/passwd'', $new_name); } else { Modified: trunk/debian/changelog ==================================================================--- trunk/debian/changelog 2005-04-16 12:36:56 UTC (rev 222) +++ trunk/debian/changelog 2005-04-16 13:36:51 UTC (rev 223) @@ -12,8 +12,10 @@ (mh) Closes: #300641 * Add Finnish debconf templates. Thanks to Matti Pöllä. (mh) Closes: #303854 + * Fix broken --disabled-login --disabled-password handling. Thanks + to Tokka Hastrup. (mh) Closes: #302837 - -- Marc Haber <mh+debian-packages@zugschlus.de> Sat, 16 Apr 2005 14:35:54 +0200 + -- Marc Haber <mh+debian-packages@zugschlus.de> Sat, 16 Apr 2005 15:36:07 +0200 adduser (3.63) unstable; urgency=low