Help need for automation of su command

Hi All!
I need to automate the su command using expect script.Suppose I login as a user A , I need to change the user to oracle using the su oracle command and execute the command "sqlplus -ver".

I tried writing a expect script for the same , but can't figure out the reason it is not working.

Can someone please help. Below is the expect script that I wrote:

#!/usr/bin/expect -f
set timeout -1
spawn /bin/su oracle -c date 
expect "Password: " 
send "oracle\r"
expect "\r\n"
send "sqlplus -ver\n"

Thanks!
nua7

sudo would be much easier than expect for this job... is that available for you?

Failing that, please show us the output you get when you run your expect script. You might consider using autoexpect to generate your script...?