Controlling windows system from a Linux box.

Set up winexe.

wget "ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/GRNET:/synnefo/CentOS_CentOS-6/x86_64/winexe-1.00-9.1.x86_64.rpm"
yum install winexe-1.00-9.1.x86_64.rpm

 

Test the connection

<pre>telnet 10.0.0.123 139</pre>

Now we can try the system out

winexe -U "User 1" --password=secretpassword //10.0.0.123 'cmd /C "whoami"'

If you get :

ERROR: Failed to open connection - ERRDOS:ERRnomem

then it’s probably a Windows 7 box

run

 reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v "LargeSystemCache" /t REG_DWORD /d 1 /f
 reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v "Size" /t REG_DWORD /d 3 /f

on the windows box and restart.

Now try again

winexe -U "User 1" --password=secretpassword //10.0.0.123 'cmd /C "whoami"'

you should get something like :

Win7Sstem\User 1

njoy 😉

 

 

ref: http://alan.lamielle.net/2009/09/03/windows-7-nonpaged-pool-srv-error-2017

ref: http://www.decuslib.com/decus/vmslt99a/nt/tips.txt

 

Leave a Reply

Your email address will not be published. Required fields are marked *