How would I do a shell scrip with a specific password?

I would like to do a shell scrip with a specific password. In this case I have set the contents of the password field to “thePass” and I want to do a shell script with that password. Here’s what I’ve read works, but it dosen’t work for me!

tell application "Terminal" 
do shell script "sudo update_prebinding -force -root /" with password thePass 
end tell

Any help would be greatly appreciated!

Where did you read that that works? For a “do shell script”, you don’t target the Terminal. If you want the command to be executed in the terminal, try:

tell application "Terminal"
	do script "sudo update_prebinding -force -root /"
end tell

but this will require you to enter the password in the Terminal window. To run a command as an admin from AS alone, you don’t use “sudo”, you use “with administrator privileges” and you don’t put in a tell block for an application (well, you don’t have to at least):

do shell script "update_prebinding -force -root /" password thePass with administrator privileges

Jon