then run the script stored on remote server under root account.
But now the question here is how to run a that sciprt thro a batch file stored on local system. I want the batch file to perform the manual process as above.
idea im thinkin:
I have a shell script and batch file stored under a dir on a windows machine. I would like to execute that script thro that batch file.
C:\abcd\batch1.bat
C:\abcd\script.sh
i would like torun the script using the batch file. the script contains commands which are executable thro root or admin account.
Can some one throw some light on how to get this done.
DOS CMD is not UNIX sh. $ doesn't give you a variable.
It only took MS 20 years, but they did finally add a method to read from keyboard:
@ECHO OFF
SET /p userin=Please enter your full name:
SET /p pasw=Please enter your password:
plink.exe -pw %pasw% %username%@host sudo su - < script.sh
CMD being what it is, its treatment of spaces and quotes can be ambiguous. Spaces in passwords may not work and quoting may not be able to fix it.
Hi, I have a problem with this...plink is running fantastic on Linux, but on Tru64 (and old Alpha server!!) I try to run a script but without success...
I try with -s -bash -ssh -2 (because don't connect with default..) and nothing works...
sometimes the commands appear running locally on DOS...
Is a very strange case...any help will be appreciatte...tnx
Please do not ask new questions in existing threads. Unless you have new information to a particular problem, please create a new thread in the appropriate forum.
Also, please search the forums first, as it might be that someone has already posted an answer for a similar problem.