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.
# wrapper to make passwd(1) be non-interactive
# Usage: chpassword user newpassword
spawn passwd [lindex $argv 0]
set password [lindex $argv 1]
*** This bug has been marked as a duplicate of 1195 ***