Displaying 2 results from an estimated 2 matches for "expect_us".
Did you mean:
expect_eq
2013 Jul 18
1
if /else in expect script
...mmand
($?) before it'll move the new sudoers file in place. I'm verifying it with
visudo before attempting to make the move. I'd like to make the final move
based on the success/failure of that.
Anyway, here's the script:
stty -echo
send_user -- "Please enter the host: "
expect_user -re "(.*)\n"
send_user "\n"
set host $expect_out(1,string)
stty -echo
send_user -- "Please enter your username: "
expect_user -re "(.*)\n"
send_user "\n"
set username $expect_out(1,string)
stty -echo
send_user -- "Please enter your passwd:...
2003 Jan 02
0
Samba PDC passwd update to NIS server
...script wasn't run conservatively originally
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}
set timeout -1
set username [lindex $argv 0]
send_user "new"
system stty echo
expect_user -re "(.*)\n"
set password $expect_out(1,string)
send_user "OK\n"
log_user 0
spawn $ssh $ypserver
expect "<change to fit your system> :"
send -- "passwd $username\r"
expect -exact "passwd $username\r
New password: "
send -- "$password\r&...