!/usr/bin/expect
set timeout 1
set username [lindex $argv 0] set userpass [lindex $argv 1]
spawn htpasswd /webadmin/User.password $username
expect "New password:"
send "$userpass\n"
expect "Re-type new password:"
send "$userpass\n"
interact
set timeout 1
set username [lindex $argv 0] set userpass [lindex $argv 1]
spawn htpasswd /webadmin/User.password $username
expect "New password:"
send "$userpass\n"
expect "Re-type new password:"
send "$userpass\n"
interact