Solved

Shell SCripts from Windows

Posted on 2001-07-05
5
206 Views
Last Modified: 2010-04-21
Hi,

Is there a tool or a way to run shell scripts on linux from a winnt/win2k machine. Many users may call the script at the same time as it will be moving and updating of application files from the development environment (Winnt/win2k) to the test and production environment (linux rh 7.0, apache).

I need a utility/way to have a single-click job to run this shell script from the start menu of windows.

Thanks
pramodhcp
0
Comment
Question by:pramodhcp
  • 2
  • 2
5 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6255453
write a batch file which calls your update-script on linux using rsh, like:

rsh linuxbox -l youruser /path/to/update-script

Make a link to the batch file in the start folder
0
 
LVL 1

Author Comment

by:pramodhcp
ID: 6258790
Hi,

I am unable to start rsh on windows. Does this mean that I need to do some setup on my linux server or on my windows workstation?

Is there any document which explains the requirements from both sides (linux and windows).

when I use rsh linuxbox -l myuser I always get an error that gives me a list of options for the rsh command. I am not sure if this is from the linux rsh or the windows rsh.

I see that my rsh service is up and running on my linux server. So what am I doing wrong or am I doing nothing at all.

Will add another 50 points by posting a dummy question and awarding the points to the expert who gives me an answer for this.

Cheers
pramodhcp
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 6259157
if you post the output of rsh, we can tell you if it is from the rsh.exe (on Windows) itself or from the rsh service on the linuxbox. I assume that it is from rsh.exe, then you usually misstyped something.

On Linux you have to enable the shell service in /etc/inetd.conf (port 514). A simple test is:
   rsh localhost pwd
If it returns something like "permission denied" the service is running and accepting connections.
Then you have to allow specific hosts to use this service by specifying hostname (or IP-adress) and username in the users .rhosts file (see man rhosts). For example if you wndows box is named crazy, and the user on the linuxbox is horse, the ~/.rhosts file for user horse should contain the line:
   crazy horse
the command on the Windows host then is:
   rsh linuxbox -l horse pwd

If it doesn't work, please post command an output.
0
 
LVL 3

Expert Comment

by:superschlonz
ID: 6278785
You could also start the script via the webserver (CGI, PHP, ...). You should protect it with a .htaccess file so it can only be started from some ip addresses.
0
 
LVL 1

Author Comment

by:pramodhcp
ID: 6279662
rsh and then ssh seem to be the best bet as the people using this will be on a 100MB LAN Link and the web would mean the opening of a browser and related maintainance issues.

As ahoffmann was the first person to suggest this and has followed this question from the beginning, I will grant the answer to him.

Thank you superschlonz for your comments, but unfortunately it does not meet my requirement at the moment.

Thanks everybody and here are the points ahoffmann.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question