Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-11-2004, 04:58 PM
|
#1
|
|
Member
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100
Rep:
|
Linux box calling a batch script on a windows box to run? Is it possible?
A certain linux box runs a series of tests, if one of the tests fails I need a windows box to run a batch script. Is it possible, to have the linux box order the windows box to run that batch script as in:
if something doesn't happen
run file.bat (on windows box)
fi
I know you can use rpcclient to shut down windows boxes remotely so i'm thinking you could probably run a script or a program that runs that script any ideas?
- karl hungus
|
|
|
|
05-11-2004, 05:47 PM
|
#2
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
Your going to need somekind of program on the windows box waiting for instructions from the linux box to execute the batch script. I don't think theres a simpler way around this.
Something like ssh/telnet or similar waiting to carry out what the Linux box tells it.
|
|
|
|
05-11-2004, 07:36 PM
|
#3
|
|
Member
Registered: Mar 2003
Posts: 804
Rep:
|
just write a simple server that listens for a connection, and upon receiving a give string performs the command. doing this, and doing this securely are 2 different things however. on the linux side, all u would need to do is netcat to the port and write the command string, which would be done simply im script.
|
|
|
|
05-11-2004, 10:30 PM
|
#4
|
|
Member
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100
Original Poster
Rep:
|
Program to complete task
Yeah I was thinking a program could do it. Security is of the highest priority on the windows box it would need to be install on, this is my concern and why I was hesitant to allow possible access like that. Do you think it could be done completely securely with a program and are there no alternatives to installing a program? Thanks 
|
|
|
|
05-11-2004, 11:49 PM
|
#5
|
|
Member
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155
Rep:
|
If I am not mistaking you can execute Windows commands and scripts from *nix with Windows UNIX Services. I am pretty sure it's up to version 2 or greater and it's pretty good.
|
|
|
|
05-12-2004, 11:42 AM
|
#6
|
|
Member
Registered: Mar 2003
Posts: 804
Rep:
|
Re: Program to complete task
Quote:
Originally posted by joelhop
Yeah I was thinking a program could do it. Security is of the highest priority on the windows box it would need to be install on, this is my concern and why I was hesitant to allow possible access like that. Do you think it could be done completely securely with a program and are there no alternatives to installing a program? Thanks
|
i can't answer 2nd question, but i can try and answer the first. the obvious security hazard is that anyone else could just connect to your server and cause it to execute the command that you are. a possible solution couldl be requiring the user to enter a certain "password" string and then execute the command. so now you're talking about storing a password inside of the program's data area, or having it read in a password from a conf. file or the registry. this introduces your next security issue, how to store that password. if you store it in a file or registry, then its possible for anyone on the windows box to read it. i dont know windows that well, so im not sure how to prevent that other than encryption. so the first time the program runs, it would check for a conf file, and if one didn't exist(race condition) then prompt the user for a passowrd, encrypt it, and store it in the file/registry. those are just some tings off top of my head, there are probly other thigns to consider as well depending on mission critical this is.
|
|
|
|
05-13-2004, 03:54 PM
|
#7
|
|
Member
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100
Original Poster
Rep:
|
Windows UNIX Services, this is something I'm not at all familiar with, can anyone give me a little more information on how I might use this to execute windows programs/batch files remotely from a linux box?
|
|
|
|
05-17-2004, 12:49 PM
|
#8
|
|
Member
Registered: Jul 2003
Posts: 34
Rep:
|
Microsoft SFU 3.5 has been released and is the first version that is a free download (223 MB).
Try this link:
http://www.microsoft.com/downloads/d...DisplayLang=en
or search for ServicesForUnix3.5
SFU allows your Windows machine to act like a UNIX, even run UNIX shell scripts and programs.
|
|
|
|
05-17-2004, 04:49 PM
|
#9
|
|
Member
Registered: Mar 2004
Location: Pennsylvania::USA
Distribution: Fedora Core 6
Posts: 100
Original Poster
Rep:
|
Microsoft SFU 3.5
Thanks Bruce, i'm downloading that installation file now! It sounds really cool.
-Karl
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:05 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|