Run part of a bash script as a different user
  
 
     
     
             
                 
 
 
         
         31 
         
 
         
             9 
         
 
 
 
 
             
 
             
 
     
     
 
 Is there a way to make part of a script run as a different (non-root) user? If it helps , the part to be run as a different user occurs at the end of the script   Edit :   OS -> Ubuntu 9.04      
 
         
             
                 linux bash user 
             
         
 
     
         
             
  share | improve this question  
             
 
                 
 
     
         edited Jan 9 '10 at 9:41 
     
     
         
     
     
         Manish Mathai 
         
             
         
     
                 
             
 
     
         asked Jan 9 '10 at 4:46 
     
     
         
     
     
         Manish Mathai Manish Mathai 
         
             361 2 5 11 
         
     
 
 
             
         
     
     
 
                 
     
 	    
              
    ...