Scripting sudo password

Hello,

I am new to SUDO and would like to know if there is a command line option to include the password. I am trying to run a series of commands, which need to be run as SUDO, but I am prompted for the password when ever the script starts. I can not change the sudoers file to have NOPASSWORD. I can not run the script with the ROOT id either. Any ideas or work arounds? Thank you in advance.

[413 byte] By [tsapp@optonline.net] at [2007-11-25 23:24:25]
# 1
echo password | sudo script_namesudo script_name <<EOFpasswordEOF>
krankyd at 2007-7-5 18:11:27 > top of Java-index,General,Talk to the Sysop...
# 2
You can also use expect, try running autoexpect and it'll give you a sample output file that you can then tweak to your liking.If you don't have expect, download it from sunfreeware.com - also get TK because you'll need it.
jeffreys at 2007-7-5 18:11:27 > top of Java-index,General,Talk to the Sysop...