SUMMARY: start-up scripts for non-root programs

From: Andrew Lamb (
Date: Mon Apr 22 1996 - 10:08:49 CDT

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
Ric Anderson
Sahir Siddiqui
J. Patrick Narkinsky
Salvador Ramirez sram@inf.UDEC.CL
Rob Allan
Gary Merinstein

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