Hi,
I'm trying to solve error with latest winexe1.1 build (from today 22.1.2015 ). I have git cloned samba and made git reset --hard a6bda1f2b as it was suggested in previous tickets.
Builded static winexe works fine against:
But it fails with Windows XP 32bit. It ends up with this error:
ERROR: OpenSCManager failed. NT code 0xc00006e4
When I use debug I see errors with smb protocol:
..
ERROR: smb_raw_open_recv - NT_STATUS_OBJECT_NAME_NOT_FOUND
ERROR: on_ctrl_pipe_error - NT_STATUS_OBJECT_NAME_NOT_FOUND
ERROR: Cannot open control pipe - NT_STATUS_OBJECT_NAME_NOT_FOUND, installing service
..
And this is whole debuglog:
./winexe-static --uninstall -U machine/Administrator%password //machine "cmd /c hostname" --ostype=0 -d 9
INFO: Current debug levels:
all: 9
tdb: 9
printdrivers: 9
lanman: 9
smb: 9
rpc_parse: 9
rpc_srv: 9
rpc_cli: 9
passdb: 9
sam: 9
auth: 9
winbind: 9
vfs: 9
idmap: 9
quota: 9
acls: 9
locking: 9
msdfs: 9
dmapi: 9
registry: 9
scavenger: 9
dns: 9
ldb: 9
winexe version 1.1
This program may be freely redistributed under the terms of the GNU GPLv3
added interface br0 ip=192.168.0.111 bcast=192.168.0.255 netmask=255.255.255.0
added interface br0 ip=192.168.0.111 bcast=192.168.0.255 netmask=255.255.255.0
resolve_lmhosts: Attempting lmhosts lookup for name machine<0x20>
startlmhosts: Can't open lmhosts file /usr/local/samba/etc/lmhosts. Error was No such file or directory
Socket options:
SO_KEEPALIVE = 0
SO_REUSEADDR = 0
SO_BROADCAST = 0
TCP_NODELAY = 1
TCP_KEEPCNT = 9
TCP_KEEPIDLE = 7200
TCP_KEEPINTVL = 75
IPTOS_LOWDELAY = 0
IPTOS_THROUGHPUT = 0
SO_SNDBUF = 24040
SO_RCVBUF = 87380
SO_SNDLOWAT = 1
SO_RCVLOWAT = 1
SO_SNDTIMEO = 0
SO_RCVTIMEO = 0
TCP_QUICKACK = 1
TCP_DEFER_ACCEPT = 0
Starting GENSEC mechanism ntlmssp
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_NTLM2
NTLMSSP_NEGOTIATE_TARGET_INFO
NTLMSSP_NEGOTIATE_VERSION
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_NTLM2
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
IN: async_open(\ahexec, 2)
IN: async_open_recv
ERROR: smb_raw_open_recv - NT_STATUS_OBJECT_NAME_NOT_FOUND
ERROR: on_ctrl_pipe_error - NT_STATUS_OBJECT_NAME_NOT_FOUND
ERROR: Cannot open control pipe - NT_STATUS_OBJECT_NAME_NOT_FOUND, installing service
Installing service
Using binding ncacn_np:machine[,print]
Mapped to DCERPC endpoint \pipe\svcctl
added interface br0 ip=192.168.0.11 bcast=192.168.0.255 netmask=255.255.255.0
added interface br0 ip=192.168.0.11 bcast=192.168.0.255 netmask=255.255.255.0
resolve_lmhosts: Attempting lmhosts lookup for name machine<0x20>
startlmhosts: Can't open lmhosts file /usr/local/samba/etc/lmhosts. Error was No such file or directory
Socket options:
SO_KEEPALIVE = 0
SO_REUSEADDR = 0
SO_BROADCAST = 0
TCP_NODELAY = 1
TCP_KEEPCNT = 9
TCP_KEEPIDLE = 7200
TCP_KEEPINTVL = 75
IPTOS_LOWDELAY = 0
IPTOS_THROUGHPUT = 0
SO_SNDBUF = 24040
SO_RCVBUF = 87380
SO_SNDLOWAT = 1
SO_RCVLOWAT = 1
SO_SNDTIMEO = 0
SO_RCVTIMEO = 0
TCP_QUICKACK = 1
TCP_DEFER_ACCEPT = 0
Starting GENSEC mechanism ntlmssp
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_NTLM2
NTLMSSP_NEGOTIATE_TARGET_INFO
NTLMSSP_NEGOTIATE_VERSION
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_NTLM2
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
svcctl_OpenSCManagerW: struct svcctl_OpenSCManagerW
in: struct svcctl_OpenSCManagerW
MachineName : *
MachineName : 'machine'
DatabaseName : NULL
access_mask : 0x02000000 (33554432)
0: SC_RIGHT_MGR_CONNECT
0: SC_RIGHT_MGR_CREATE_SERVICE
0: SC_RIGHT_MGR_ENUMERATE_SERVICE
0: SC_RIGHT_MGR_LOCK
0: SC_RIGHT_MGR_QUERY_LOCK_STATUS
0: SC_RIGHT_MGR_MODIFY_BOOT_CONFIG
svcctl_OpenSCManagerW: struct svcctl_OpenSCManagerW
out: struct svcctl_OpenSCManagerW
handle : *
handle: struct policy_handle
handle_type : 0x00000000 (0)
uuid : 00000000-0000-0000-0000-000000000000
result : WERR_RPC_S_CANNOT_SUPPORT
ERROR: OpenSCManager failed. NT code 0xc00006e4.
Using binding ncacn_np:machine[,print]
Mapped to DCERPC endpoint \pipe\svcctl
added interface br0 ip=192.168.0.11 bcast=192.168.0.255 netmask=255.255.255.0
added interface br0 ip=192.168.0.11 bcast=192.168.0.255 netmask=255.255.255.0
resolve_lmhosts: Attempting lmhosts lookup for name machine<0x20>
startlmhosts: Can't open lmhosts file /usr/local/samba/etc/lmhosts. Error was No such file or directory
Socket options:
SO_KEEPALIVE = 0
SO_REUSEADDR = 0
SO_BROADCAST = 0
TCP_NODELAY = 1
TCP_KEEPCNT = 9
TCP_KEEPIDLE = 7200
TCP_KEEPINTVL = 75
IPTOS_LOWDELAY = 0
IPTOS_THROUGHPUT = 0
SO_SNDBUF = 24040
SO_RCVBUF = 87380
SO_SNDLOWAT = 1
SO_RCVLOWAT = 1
SO_SNDTIMEO = 0
SO_RCVTIMEO = 0
TCP_QUICKACK = 1
TCP_DEFER_ACCEPT = 0
Starting GENSEC mechanism ntlmssp
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_NTLM2
NTLMSSP_NEGOTIATE_TARGET_INFO
NTLMSSP_NEGOTIATE_VERSION
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP_NEGOTIATE_UNICODE
NTLMSSP_REQUEST_TARGET
NTLMSSP_NEGOTIATE_SIGN
NTLMSSP_NEGOTIATE_NTLM
NTLMSSP_NEGOTIATE_ALWAYS_SIGN
NTLMSSP_NEGOTIATE_NTLM2
NTLMSSP_NEGOTIATE_128
NTLMSSP_NEGOTIATE_KEY_EXCH
svcctl_OpenSCManagerW: struct svcctl_OpenSCManagerW
in: struct svcctl_OpenSCManagerW
MachineName : *
MachineName : 'machine'
DatabaseName : NULL
access_mask : 0x02000000 (33554432)
0: SC_RIGHT_MGR_CONNECT
0: SC_RIGHT_MGR_CREATE_SERVICE
0: SC_RIGHT_MGR_ENUMERATE_SERVICE
0: SC_RIGHT_MGR_LOCK
0: SC_RIGHT_MGR_QUERY_LOCK_STATUS
0: SC_RIGHT_MGR_MODIFY_BOOT_CONFIG
svcctl_OpenSCManagerW: struct svcctl_OpenSCManagerW
out: struct svcctl_OpenSCManagerW
handle : *
handle: struct policy_handle
handle_type : 0x00000000 (0)
uuid : 00000000-0000-0000-0000-000000000000
result : WERR_RPC_S_CANNOT_SUPPORT
ERROR: OpenSCManager failed. NT code 0xc00006e4.
Hi,
I can confirm the problem here too. My actual workaround is:
First doing a "dry-run" with winexe 1.0 (--version String is 4.0.0alpha11), calling ping or something similar which will nothing do on windows machine. This will fail on Windows Server 2012r2 but installs the winexe service in winxp.
After that I call winexe 1.11 which can communicate with the previously installed winexe service (1.00) on the windows xp host; and can install the newer winexe service (1.11) on Windows Server 2012r2.
I noticed, that an --uninstall option for the winxp hosts will only work with the winexe1.00 and not with the winexe1.11. Also a --reinstall option fails for winxp with winexe1.11. If you want --uninstall I guess you have to do the workaround otherwise by calling both winexe-versions once more again with a dummy command on windows-side.