[SunHELP] init.d scripts as user

Suchitra N Chilmakuru csuchitr at in.ibm.com
Mon Feb 25 07:19:12 CST 2002


     A command can be executed as su - user -c "< cmd > " . the output of
the same can be redirected.



                                                                                                                        
                    "Markham, Richard"                                                                                  
                    <RMarkham at hafeleame       To:     "Sunhelp (E-mail)" <sunhelp at sunhelp.org>                          
                    ricas.com>                cc:                                                                       
                    Sent by:                  Subject:     [SunHELP] init.d scripts as user                             
                    sunhelp-admin at sunhe                                                                                 
                    lp.org                                                                                              
                                                                                                                        
                                                                                                                        
                    02/25/02 06:41 PM                                                                                   
                    Please respond to                                                                                   
                    sunhelp                                                                                             
                                                                                                                        
                                                                                                                        



How can I execute a init.d script as user instead of root.
The main reason is that the profile is custom and the services
executed need to run as that user.  At first I thought just add
'su - user' to a script but thats going to call another shell
and never execute the remainder of the script until an 'exit'
is called...
_______________________________________________
SunHELP maillist  -  SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list