Bug#212872: [Adduser-devel] Bug#212872: passwd: adduser should ask
for password again if there is a mismatch
Stephen Gran
sgran at debian.org
Sat Nov 25 03:18:35 CET 2006
This one time, at band camp, Thorsten Gunkel said:
> I just tried to add a test user in a fresh sid debootstrap and had a typo in
> the re-typed password:
>
> | Enter new UNIX password:
> | Retype new UNIX password:
> | Sorry, passwords do not match
> | passwd: Authentication information cannot be recovered
> | passwd: password unchanged
> | Undefined subroutine &main::NOEXPR called at /usr/sbin/adduser line 509, <FIND> line 4.
> `----
>
> I would also prefer it if adduser would ask me again. Additionally please
> notice the last line in the output about the missing subroutine.
I think I've got the problem fixed. I have applied the patch below in
svn - can you test to make sure it fixes it for you?
--- adduser (revision 675)
+++ adduser (working copy)
@@ -54,8 +54,9 @@
import I18N::Langinfo qw(langinfo YESEXPR NOEXPR);
};
if ($@) {
- *langinfo = sub { "^[yY]" };
- *YESEXPR = sub { 1 };
+ *langinfo = sub { return shift; };
+ *YESEXPR = sub { "^[yY]" };
+ *NOEXPR = sub { "^[nN]" };
}
}
Thanks,
--
-----------------------------------------------------------------
| ,''`. Stephen Gran |
| : :' : sgran at debian.org |
| `. `' Debian user, admin, and developer |
| `- http://www.debian.org |
-----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20061125/28b18e54/attachment.pgp
More information about the Adduser-devel
mailing list