Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 11394 - Expect password change fails
Summary: Expect password change fails
Status: CLOSED DUPLICATE of bug 1195
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tcltk
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-05-12 21:54 UTC by Tim Jung
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-05-15 13:52:35 UTC

Attachments (Terms of Use)

Description Tim Jung 2000-05-12 21:54:44 UTC
I can not get Expect to do the example script from the O'Reilly "Exploring
Expect" book, where it changes the password. The example is on page #5.

It won't run reliable, and about 95% of the time it just hangs when you
run the script as root.

#!/usr/bin/expect -f
# wrapper to make passwd(1) be non-interactive
# Usage: chpassword user newpassword
spawn passwd [lindex $argv 0]
set password [lindex $argv 1]
expect "password:"
send "$password\r"
expect "password:"
send "$password\r"
expect eof

Comment 1 Jeff Johnson 2000-05-15 13:52:59 UTC
*** This bug has been marked as a duplicate of 1195 ***

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