You could do as iburrell suggest. Secure Shell with public key authenication ( or some form of authenication that does not require the user to type in a password). Or you could look into using expect.
Plankton: 1% Evil, 99% Hot Gas.
Comment on Re: starting a process as a different user