Created
February 24, 2011 22:45
-
-
Save seven1m/843062 to your computer and use it in GitHub Desktop.
Install winexe on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This works as of Feb 2011 on Ubuntu Maverick | |
sudo apt-get install build-essential autoconf checkinstall | |
svn co http://dev.zenoss.org/svn/trunk/wmi/Samba/source | |
cd source | |
wget https://gist.github.com/raw/843062/5bb87c4fa13688f65ca8b1e54fc42676aee42e5a/fix_winexe_service.diff | |
patch -p0 -i fix_winexe_service.diff | |
./autogen.sh | |
./configure | |
make proto bin/winexe | |
sudo cp bin/winexe /usr/local/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: winexe/service.c | |
=================================================================== | |
--- winexe/service.c (revision 25787) | |
+++ winexe/service.c (working copy) | |
@@ -15,7 +15,7 @@ | |
#define SERVICE_DEMAND_START (0x00000003) | |
#define SERVICE_ERROR_NORMAL (0x00000001) | |
#define SERVICE_CONTROL_STOP (0x00000001) | |
-#define NT_STATUS_SERVICE_DOES_NOT_EXIST NT_STATUS(0xc0000424) | |
+#define NT_STATUS_SERVICE_DOES_NOT_EXIST NT_STATUS(0x00000424) | |
#include "system/filesys.h" | |
#include "libcli/libcli.h" | |
#include "libcli/smb_composite/smb_composite.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
winexe -U DOMAIN/Administrator //server-name 'cmd /C net stop "Service Name" && net start "Service Name"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment