in reply to Program changing users

You don't say what operating system this is to run on - the ways that you might achieve this are different on , say, windows than Unix

/J\