Expect might work for that.

Expect can even auto-generate the script for you (doesn't always work for
it)

#]autoexpect -c 
(-c forces it to use conservatice mode, because some programs will ignore
keystrokes if they come too fast...like passwd)

#]su - 
Password: ********
Password: ********
#]/some/place/urprogram.sh (execute your program)
#]exit (go back to original username)
#]exit (exit autoexpect)

Its not the safest way but it works.

http://expect.nist.gov/

Or rpmfind.net

You could write the whole script in expect if you want too.

Flo

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alvin Murphy
Sent: Monday, February 03, 2003 11:56 PM
To: luau
Subject: [luau] a little script question


I have written a small bash script which starts one of my programs 
(ViaVoice); in order for it to run properly, I have to be in supervisor 
mode, i.e. run "su" and "password" ; my question: is there any way to 
write that into the script itself? Thanks

_______________________________________________
LUAU mailing list
[EMAIL PROTECTED] http://videl.ics.hawaii.edu/mailman/listinfo/luau


Reply via email to