In the init script that is used to start whatever you're wanting to start. When the actual application is being run, put an su - user_id -c command
Example, say you want to run the service foo, normally it might just appear on the line like this
foo
You'll want to run it as joe, so it would now look like:
su - joe -c foo
***
The other option of course is to look at the program itself and see if it has some way to execute itself as a different user - some apps do this.
|