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.

Tomàs

Tomàs

I'll make something up