Unix has a concept called suid-bit (it is patented, or at least they search
a patent for it at Bell Labs). This means, that when a program that has
suid bit set is run, owner's privileges are used instead of those of the runner.
This is how sudo works. When you check its attributes, you see something
like
$ ls -ls `which sudo`
120 -rwsr-xr-x 1 root root 120696 2006-11-25 19:40 /usr/bin/sudo
(that is from Linux) Check the third letter. Instead of 'x', it is 's'.
You add the suid-bit with chmod like other attributes, like
chmod 755 the-program
chmod u+s the-program
BUT, normally Unix does not allow suid-scripts, that is scripts that have
suid-bit set. So you need a program, that has suid-bit set and let the
program run the script. There is a generic program that does that, and
it is called sudo...
If you do not like to give password all the time, read sudo's manual
pages, the sudoers file part. Or, make a wrapper program that runs only
the script you are intersted in.