Before I found out about adtool I was managing users using Windows own command line AD tools via the very cool winexe (Thanks to TMM for pointing me to it in the first place). Winexe is a very nice way to either avoid using pstools from another Windows machine or having to install cygwin SSH server, which to be honest is a bit of a pain unless you package it into your system imaging solution and have it on every machine by default. Winexe allows you full access to a terminal on a Windows or allows you to run commands remotely. It’s fairly easy to install (although it’s be nice if someone with better packaging skills than me got it into Ubuntu), the usual configure make dance. I had a bit of trouble with the tarball so I downloaded the latest SVN snapshot which worked perfectly.
Next on my todo list is a small project that I had already built in my last job where we were *stuck* on NT4. And as Samba 4 isn’t out yet it’s relevant to Samba 3 networks to, whereby certain machines can have different registry files applied against them to do things like switch of USB mass storage and all sorts of things you can do with GPOs if you have AD (and make sure OCS Inventory is on there too !). I already built fairly stable system whereby all these things were applied via domain logon scripts, but the horribleness that is scripting on Windows has spurred me on to write something properly in Python that can be run from a Samba PDC/Linux box on an NT4 network to apply all this stuff….
A simple example is:
winexe -U HOME/Administrator%Pass123 //192.168.0.10 “ipconfig /all”
There’s more on the site but you can just as simply log into the server entirly with:
winexe -U HOME/Administrator%Pass123 //192.168.0.10 “cmd”
With Samba 4 coming out *soon* it’s almost redundant but what are weekends for ! So hopefully I’ll get this written in a few hours and it’ll spur me on to get into Django and put an interface on it. It’s certinly getting very easy to manage Windows from Linux, fair play to the Samba team and the EU for badgering MS till they got the documents they needed. What OS you use is becoming less and less relevant.






6 comments
Comments feed for this article
Tuesday, September 9, 2008 at 13:42
beeman
“What OS you use is becoming less and less relevant.”
This is a great foresight!
Monday, February 23, 2009 at 8:06
Arun
when anitivirus is running in the client machine winexe will be killed..did you notice that…or do you have any way to overcome that..
Monday, February 23, 2009 at 15:54
Félim
It didn’t happen on the machines I’ve used it to be honest. It has to install the winexe service on the Windows machine, this is probably what’s effecting it. Are you sure it’s your AV and not a firewall blocking it ? Does your AV actually popup a warning. I guess other question would be what AV. It’s not a Virus so it’s a false positive in theory (Unless someone is using it who shouldn’t!).
Wednesday, July 29, 2009 at 19:46
Conor
Felim do you happen to have the svn url for winexe?
Wednesday, July 29, 2009 at 21:05
Félim
Hey Conor,
You can grab it at:
http://dev.zenoss.org/trac/browser/trunk/wmi/Samba/source/winexe
I imagine just sticking svn instead of http should work, but not tried it to be honest ! At least this is browseable anyway.
Wednesday, November 11, 2009 at 23:58
angelblade
Hi! If need password on this form
winexe -U HOME/user%’pass’ //host “command”
The password is written between ”