Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Shell SCripts from Windows

Posted on 2001-07-05
5
Medium Priority
?
243 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 300 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

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 fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Loops Section Overview
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

876 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