Hi,
AIX 5.3
Trying to implement script that change oracle password. Getting following errors:
send: spawn id exp3 not open
while executing
"send "xxx\r"
Any idea?
Hi,
AIX 5.3
Trying to implement script that change oracle password. Getting following errors:
send: spawn id exp3 not open
while executing
"send "xxx\r"
Any idea?
Looks like you're using "expect". I think we'll have to see the relevant part of your script if you want any useful feedback. (Also not sure if this is AIX-related.)
Yes it does uses expect. Here is script which gives error. Thanks for looking at this.
#!/bin/ksh
#Set Oracle Home Directory
OHD=/xxx
#Change Directory
cd /xx/yyy
#Define Script Return Code
integer RC=0
export oldpass=`cat ${OHD}/.oracle.pw`
export newpass=`cat ${OHD}/.oracle_new.pw`
/site/bin/expect <<EOF
spawn passwd oracle
expect "oracle's Old password:"
send "$oldpass\r"
expect "oracle's New password:"
send "$newpass\r"
expect "Enter the new password again:"
send "$newpass\r"
expect eof
EOF
#Set Return Code From passwd Script
RC=$?
exit ${RC}
Guess: Does this error mean that the "passwd" process has already exited, or didn't start, before the first send?
"send: spawn id exp3 not open"
I figured this out. Send that use old password had wrong password which was reading from one of the files. Once I corrected value in file for old password all worked fine.
Thanks for looking at this for me.