Bug 674184 - mkpasswd fails randomly
mkpasswd fails randomly
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: expect (Show other bugs)
14
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Vitezslav Crhonek
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-31 16:49 EST by bombshell
Modified: 2011-03-24 15:29 EDT (History)
1 user (show)

See Also:
Fixed In Version: expect-5.44.1.15-2.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-24 15:29:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description bombshell 2011-01-31 16:49:00 EST
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):
expect-5.44.1.15-1.fc14.x86_64

How reproducible:
run mkpasswd without command line arguments.

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

Expected results:
Create a random password

Additional info:
none
Comment 1 Vitezslav Crhonek 2011-02-09 07:47:14 EST
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 16:32:24 EST
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"
			exp_continue
		}
	}"
    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 07:41:28 EDT
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 09:39:07 EDT
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 10:41:23 EDT
expect-5.44.1.15-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/expect-5.44.1.15-2.fc14
Comment 6 Fedora Update System 2011-03-16 10:47:06 EDT
expect-5.45-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/expect-5.45-3.fc15
Comment 7 bombshell 2011-03-17 21:10:53 EDT
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-21 23:48:25 EDT
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 15:29:13 EDT
expect-5.44.1.15-2.fc14 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.