Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f175f962b9c26d903ee032fd58811352 > files > 7

expect-examples-5.43.0-23.mga4.x86_64.rpm

#!../expect -f
# wrapper to make passwd(1) be non-interactive
# username is passed as 1st arg, passwd as 2nd

set password [lindex $argv 1]
spawn passwd [lindex $argv 0]
expect "assword:"
send -- "$password\r"
expect "assword:"
send -- "$password\r"
expect eof