in reply to changing user mid-script

If you do not have access to root, I have used a script with a setuid permissions to do the trick. (man chmod will give you more information on that)

The idea is when you want stuff to be executed by a different account, you put those commands in a script file owned by the other account and then set the permissions using chmod so that when that script is executed it executes as the other account.

Now I should point out that this could be a security risk. But it really depends on what you are trying to do, what level of access the two accounts have, and what commands you need to run from the other account.