hi,
I got lots of reply. All of them have the same solution.
Thanx guys.
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
> file.
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
> executed.
>
> if [ -f SCRIPTYOUWANTOTRUN ]; then
> su USERNAME -c "SCRIPTYOUWANTORUN"
> echo -n "SCRIPTYOUWANTORUN started"
> fi
>
>
> It works for us.
>
> Linda Cygan
> Manager - Information Systems
Thanx for following person for their help.
1) Gary W. Parker, parker@cldx.com
2) Dave Fetrow <fetrow@orac.biostat.washington.edu>
3) Jan Barte <yann@uni-paderborn.de>
4) "Boon Hing Khoo" <Boon_Hing_Khoo@maxtor.com>
5) Tim Pointing <tim@ben.dciem.dnd.ca>
6) "David J. Nelson" <djnelson@rocky.muhlberg.edu>
7) cygan@wpm.com (Linda Cygan)
Swee-Chuan Khoo
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