The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-05-2008
bonekrusher bonekrusher is offline
Registered User
 

Join Date: Sep 2007
Posts: 7
Scripts and changing users

Hi,

I am writing somescripts to shut down some services in Korn Shell. Some of the services are under different owners. For example when I want to shutdown NXserver I need to be "root", but when I shut down the webserver I need to be under a different user.

Manual I would use "su root" and then type the password to log in as a super user.

How do I write a script to login as 'root' and pass the password as an argument?

Thanks
Reply With Quote
Forum Sponsor