Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

how to run a net start from unix

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> how to run a net start from unix Page: [1]
Login
Message << Older Topic   Newer Topic >>
how to run a net start from unix - Jan. 10, '05, 4:44:25 PM   
fatherosam

 

Posts: 5
Joined: Jan. 10, '05,
Status: offline
Hello all,

This is my virgin post to these formums so hello to you all.

I am intrested in restarting windows services from a unix server which will detec t that the service is alive or not via snmp.

Does anyone have any ideas?
Post #: 1
RE: how to run a net start from unix - Jan. 10, '05, 7:56:31 PM   
Rodney

 

Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
You can set services to automatically restart if they fail/error.

Otherwise you could have a script (a la expect) that could login
from a remote box via telnet, rsh or ssh. Then you
have a shell on the box. Then run either the service command that
comes with Interix/SFU or use the "net" command to restart a service.

The auto restart is the easier way though.

(in reply to fatherosam)
Post #: 2
RE: how to run a net start from unix - Jan. 10, '05, 9:17:53 PM   
fatherosam

 

Posts: 5
Joined: Jan. 10, '05,
Status: offline
quote:

ORIGINAL: Rodney

You can set services to automatically restart if they fail/error.

yeah we tried this and it fails to restart, however a remote session and we can restart it.

quote:

ORIGINAL: Rodney

Otherwise you could have a script (a la expect) that could login
from a remote box via telnet, rsh or ssh. Then you
have a shell on the box. Then run either the service command that
comes with Interix/SFU or use the "net" command to restart a service.

The auto restart is the easier way though.



The auto restart is an eaiser way.

The bigger picture is

We have Nagios running on Redhat. It can detect that the service is down. The service is the NDS service running on a regional server, so the local users can't login until it is running.

What I want to do is have a script run from the nagios box to start the failed service on the windows box. If only they had let me make them linux boxes this wouldnot have been problem.

(in reply to Rodney)
Post #: 3
RE: how to run a net start from unix - Jan. 11, '05, 10:47:43 AM   
Rodney

 

Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
So you can have a non-local user login to start it via telnet or ssh?
Or do we need another idea :-)

(in reply to fatherosam)
Post #: 4
RE: how to run a net start from unix - Jan. 12, '05, 8:01:55 PM   
fatherosam

 

Posts: 5
Joined: Jan. 10, '05,
Status: offline
OK I tried that and everyone went mental about the Idea of turning on telnet or secure shell ( the 1st I can understand, but the second). Also seeing how I can do so much with SMNP that they don't appear to aware of.

Anyway the telnet/ssh idea is out, any other Ideas?

(in reply to Rodney)
Post #: 5
RE: how to run a net start from unix - Jan. 12, '05, 11:45:50 PM   
Rodney

 

Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
> OK I tried that and everyone went mental about the Idea of turning on telnet or secure shell ( the 1st I can understand, but the
> second). Also seeing how I can do so much with SMNP that they don't appear to aware of.

You probably want to skip telling them

> Anyway the telnet/ssh idea is out, any other Ideas?

Everyone going mental made me think of telepathy

What is their specific problem with SSH ?
Perhaps it can be addressed. And I am serious about that.

After that I can only think of writing a specific program that would
monitor a port for a correct "handshake" from the script NDS runs to restart the application.
If you don't want to write it as a C program then one of the scripting languages can likely
handle it (I'm thinking ruby likely does).

(in reply to fatherosam)
Post #: 6
RE: how to run a net start from unix - Jan. 16, '05, 4:12:17 PM   
fatherosam

 

Posts: 5
Joined: Jan. 10, '05,
Status: offline
Like I said they went mental, meaning that they had no real issues that they could Identify for me.

We exist in a sheltered environment as part of the tasmanian state govenrment ( in Australia). If any crackers would have to get through 3 external firewalls befor they could listen to telnet traffic, let alone ssh traffic ands it's own encryption.

And knowing that the RPC ports are open, I just haven't mentioned this to the others, however to make a change I have to inform others.

What I was wondering is can we make a simle RPC request to restart a service on a windows server, from a linux server?

(in reply to Rodney)
Post #: 7
RE: how to run a net start from unix - Jan. 17, '05, 1:14:20 AM   
Rodney

 

Posts: 3696
Joined: Jul. 9, '02,
From: /Tools lab
Status: online
I'm not aware of anything tha would automatically be on your system already.
You can use the RPC library to build your own program to do it.
I did a search and found at least one commercial product that does this
as a central monitor/restart-remote. But as a package, not just the "client
side".

(in reply to fatherosam)
Post #: 8
RE: how to run a net start from unix - Jan. 17, '05, 11:05:24 PM   
fatherosam

 

Posts: 5
Joined: Jan. 10, '05,
Status: offline
Thanks to everyone who tried. I would of thought someone would have already built it.

I think I will go off and try to build something

Thanks All

(in reply to Rodney)
Post #: 9
Page:   [1]
All Forums >> [Windows - UNIX Interop] >> System & Network Admin Forum >> how to run a net start from unix Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047