Bug 674184 - mkpasswd fails randomly
Summary: mkpasswd fails randomly
Alias: None
Product: Fedora
Classification: Fedora
Component: expect
Version: 14
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-01-31 21:49 UTC by bombshell
Modified: 2011-03-24 19:29 UTC (History)
1 user (show)

Fixed In Version: expect-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-03-24 19:29:18 UTC

Attachments (Terms of Use)
proposed patch (321 bytes, patch)
2011-03-16 13:39 UTC, Vitezslav Crhonek
no flags Details | Diff

Description bombshell 2011-01-31 21:49:00 UTC
Description of problem:
In certain circumstances, mkpasswd utility fails and exits with errors:
Very Unfortunate, I don't have the copy of the output as it got erase in my scrollback. From what I can recall, it appears passing switches to an external program was invalid... If it happenes again, I'll be sure to update this bug

Version-Release number of selected component (if applicable):

How reproducible:
run mkpasswd without command line arguments.

Steps to Reproduce:
1. mkpasswd
Actual results:
It prints out a traceback

Expected results:
Create a random password

Additional info:

Comment 1 Vitezslav Crhonek 2011-02-09 12:47:14 UTC
I tested mkpasswd utility - running it few days non-stop - without fail. I'm unable to reproduce it. Closing... please feel free to reopen the bug once you get reproducer or at least error message.

Comment 2 bombshell 2011-03-02 21:32:24 UTC
As promise, I reopen this bugs

": must be -i, -h, -s, -null, -0, -raw, -break, or --
    while executing
"send "$password\r""
    invoked from within
"expect {
		"assword*:" {
			# some systems say "Password (again):"
			send "$password\r"
    invoked from within
"if {[info exists user]} {
	if {!$verbose} {
		log_user 0

	spawn $prog $user
	expect {
		"assword*:" {
			# some systems say "Password (again):"
    (file "/usr/bin/mkpasswd" line 191)

This even well it fails at. I should mention, when I said randomly, I meant, it's random or rare but here it is =]

Comment 3 Vitezslav Crhonek 2011-03-16 11:41:28 UTC
Thanks, I'm able to reproduce the problem now. You didn't mentioned before, that you execute the command with user name argument...

Comment 4 Vitezslav Crhonek 2011-03-16 13:39:07 UTC
Created attachment 485733 [details]
proposed patch

Fail occurs when the new randomly generated password contains dash, respectively, when it begins with dash. Patch above resolves the issue.

New expect package will be available in testing soon, please test it and let me know, how does it work.

Comment 5 Fedora Update System 2011-03-16 14:41:23 UTC
expect- has been submitted as an update for Fedora 14.

Comment 6 Fedora Update System 2011-03-16 14:47:06 UTC
expect-5.45-3.fc15 has been submitted as an update for Fedora 15.

Comment 7 bombshell 2011-03-18 01:10:53 UTC
I would have mention it if you have had asked but I am glad that it is fixed. Thanks.

Comment 8 Fedora Update System 2011-03-22 03:48:25 UTC
expect-5.45-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-03-24 19:29:13 UTC
expect- has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.