***Updated instructions for Jaunty here http://boreditguy.com/blog/?p=274 ***
I’ve always been a big advocate for psexec and running commands remotely on Windows servers. The problem is that I outright refuse to run Windows as my workstation and half the time I’m too lazy to start a VM to do a lot of things. The other downfall with psexec is that getting it to run against Server 2008 boxes can be a pain and it doesn’t work out of the box.
So, I’ve been trying to get the tools in pstools to work with wine on Ubuntu 8.10, but I haven’t had much luck getting it to work. So I finally got around to figuring out why.
Well I came across something even better. Winexe. It’s already in the Ubuntu repositories in a package called wmi-client. To install on Ubuntu:
sudo apt-get install wmi-client
More information including source code and other installation instructions can be found here. http://eol.ovh.org/winexe/
boredITguy@Serenity:~$ winexe -U “domain\boredITguy” //WindowsServer ‘cmd.exe’
Password for [domain\boredITguy]:
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
This thing is pretty awesome, and the best part is that it works with Server 2008 machines without any additional configuration. Ah the possibilities….