Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 11395 - Expect password change fails
Expect password change fails
Product: Red Hat Linux
Classification: Retired
Component: tcltk (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Jens Petersen
Depends On:
  Show dependency treegraph
Reported: 2000-05-12 17:54 EDT by Tim Jung
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-05-12 17:54:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim Jung 2000-05-12 17:54:56 EDT
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-06-03 10:11:08 EDT
Look at /usr/bin/autopasswd, there's some timing races that need to be dealt
with more carefully than the O'Reilley example would suggest.

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