Computing.Net > Forums > Unix > Switch User

Switch User

Reply to Message Icon

Original Message
Name: Deon
Date: June 23, 2008 at 03:57:22 Pacific
Subject: Switch User
OS: AIX 5.3
CPU/Ram: 2GHZ 2GB
Model/Manufacturer: DELL
Comment:

Hi

I want to run the follwing as root

su - root <<EOF
/usr/local/bin/startwms
EOF

It keeps on asking for password for root. How kan I include the password in the script.

Thanks


Report Offensive Message For Removal


Response Number 1
Name: nails
Date: June 23, 2008 at 08:29:12 Pacific
Subject: Switch User
Reply: (edit)

A common method is using "expect". Take a look at this link:

http://www.computing.net/answers/un...


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Switch User

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge