I got lots of reply. All of them have the same solution.
This is the original question.
> I need to start a script in /etc/rc.local file in which the script will call several
> executable binary file to be run in background. The requirement is to have the binary
> executable file run by some other user instead of root, which is what happen now.
> The reason I didn't change the sticky bit and the owner of the executable file because
> there will be more than one user need to run these executable program thro another script
The reply fron Linda Cygan is as follow.
> This is they way we do it. We have the following in our rc.local.
> Replace SCRIPTYOUWANTORUN with the complete pathname of the script and
> USERNAME with the user you want to run the executable. The script
> we use has some environment variables and also the command we want
> if [ -f SCRIPTYOUWANTOTRUN ]; then
> su USERNAME -c "SCRIPTYOUWANTORUN"
> echo -n "SCRIPTYOUWANTORUN started"
> It works for us.
> Linda Cygan
> Manager - Information Systems
Thanx for following person for their help.
1) Gary W. Parker, email@example.com
2) Dave Fetrow <firstname.lastname@example.org>
3) Jan Barte <email@example.com>
4) "Boon Hing Khoo" <Boon_Hing_Khoo@maxtor.com>
5) Tim Pointing <firstname.lastname@example.org>
6) "David J. Nelson" <email@example.com>
7) firstname.lastname@example.org (Linda Cygan)
System Administrator/System Engineer
National Semiconductor, Melaka, Malaysia
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:26 CDT