Computing.Net > Forums > Unix > Switch User

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Switch User

Reply to Message Icon

Name: Deon
Date: June 23, 2008 at 03:57:22 Pacific
OS: AIX 5.3
CPU/Ram: 2GHZ 2GB
Product: 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



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: June 23, 2008 at 08:29:12 Pacific
Reply:

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

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Switch User

Switching Users in a batch script www.computing.net/answers/unix/switching-users-in-a-batch-script/6519.html

router, HUB, bridge & switch www.computing.net/answers/unix/router-hub-bridge-amp-switch/1944.html

Solaris context switching www.computing.net/answers/unix/solaris-context-switching/2285.html