The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
login into root from user and execute command through script
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
login into root from user and execute command through script
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
08-29-2008
palsevlohit_123
Registered User
Join Date: Aug 2008
Location: India-Chennai
Posts: 120
$ cat myscript.ksh
ssh -l root HOSTNAME
echo "WELCOME to ROOT"
<do your stuff>
exit
$ sh myscript.ksh >> myscript.log
Will prompt for the password of root and you have to give manually.
palsevlohit_123
View Public Profile
Find all posts by palsevlohit_123
Find palsevlohit_123's past nominations received
Find palsevlohit_123's present nominations given