• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

Shell SCripts from Windows

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
pramodhcp
Asked:
pramodhcp
  • 2
  • 2
1 Solution
 
ahoffmannCommented:
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
 
pramodhcpAuthor Commented:
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
 
ahoffmannCommented:
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
 
superschlonzCommented:
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
 
pramodhcpAuthor Commented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now