Languages

Reply to comment

Executing windows commands from your linux box: winexe

When you see a windows stopped server in your nagios console, sometimes you would like to add an event_handler who tries to start the service automatically.

With samba , it´s been a long term feature, some way to control services ( net stop or net start ), but I haven't found that this ever worked.

There's a useful tool: winexe . With this tool, you can, not only stop and start windows services, but execute any shell comand, even having a windows shell inside your linux box, as simply as:

winexe -U HOME/Administrator%Pass123 //host cmd

It's a open source project (software libre), having the source code is published in the same web, and having no modification since 26/10/07. It surely haven't needed any modification, because it is fully functional, and I haven't had any problem so far, beyond that bloody craze, using backslashes (\) everywhere, forcing us to escape characters every now and then...

Winexe turned out a useful complement as a event_handler nagios tool.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options