When I run my script that auto-authorizes the user:
expect -c ' log_user 0 spawn /usr/bin/sudo su - <username> expect "password: " sleep 5 send "password\n" interact'
it results in:
send: spawn id exp4 not open while executing
When I run my script that auto-authorizes the user:
expect -c ' log_user 0 spawn /usr/bin/sudo su - <username> expect "password: " sleep 5 send "password\n" interact'
it results in:
send: spawn id exp4 not open while executing