Solution: Use the su command at the beginning of the script e.g.
su - username -c 'command args'
su - sybase -c startserver
su - the_user -c 'the_command'
su <userid> -c command
su <username> -c <script>
su - username -c "program_name args"
su - <user> -C <program> &
The quotes around the command is required if there are any
arguments as su expects only one argument for the command,
(which could also be a script name).
Root isn't prompted for the user's password when su runs.
-c : command
For more info, do "man su".
Before actually putting the script into rc3.d, make sure
you test it separately.
Glenn Satchell Glenn.Satchell@Uniq.com.au
Ric Anderson email@example.com
Sahir Siddiqui firstname.lastname@example.org
J. Patrick Narkinsky email@example.com
Salvador Ramirez sram@inf.UDEC.CL
Rob Allan firstname.lastname@example.org
Gary Merinstein email@example.com
Thanks Sun Managers! Your help is greatly appreciated.
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:58 CDT