Score:-1

Winexe error NT_STATUS_LOGON_FAILURE executing script from Linux to Windows Server 2012

ae flag

I've installed winexe on my linux machine. I want to use it to execute some script on a Windows Servre 2012. It doesn't work, the error is NT_STATUS_LOGON_FAILURE.

I've followed this guide to install winexe: https://www.aldeid.com/wiki/Winexe

I've enabled SMBv1 and SMBv2 on Windows Server. The script I'm trying to execute is:

./bin/winexe -U administrator%pwd4administrator //serverip "cmd.exe" I've done nothing else. Am i missing something?

The workgroup on my linux machine (on /etc/samba/smb.conf.) is "MYGROUP", the workgroup on Windows server is "WORKGROUP". I tryed this way:

./bin/winexe -U administrator%pwd4administrator -W WORKGROUP //serverip "cmd.exe" But nothing changed.

hu flag
I’m voting to close this question because it has nothing to do with Ubuntu.
kanehekili avatar
zw flag
I'll second that
ec flag
**Welcome to the Ask Ubuntu community.** Your question as written does not appear to have anything to do with the operation of the Ubuntu OS. You might be better served reviewing similar issues over on the [Unix & Linux Stack Exchange](https://unix.stackexchange.com/) site. Best of luck.
Morbius1 avatar
es flag
I vote to keep the question open. Winexe is a Samba command: https://www.samba.org/samba/docs/current/man-html/winexe.1.html :`winexe allows remote command execution on native Windows operating systems.` He even references the /etc/samba/smb.conf file in his question.
Morbius1 avatar
es flag
You stated that you enabled SMB1 on the Windows server. Did you also enable SMB1 on the Ubuntu client? You need to add to the [global] section of smb.conf the following directive: `client min protocol = NT1` That's an N T one.
karel avatar
sa flag
This question is on topic and it shouldn't be closed.
Score:0
cn flag

Running OpenSSH for Windows on your Windows machine, might be a better option?

luuk@mint:~$ ssh luuk@windows "dir c:\windows\system32\cmd.exe"
luuk@windows's password: 
 Volume in drive C has no label.
 Volume Serial Number is 0A26-7955

 Directory of c:\windows\system32

03-05-2023  21:04           323.584 cmd.exe
               1 File(s)        323.584 bytes
               0 Dir(s)  91.448.864.768 bytes free
luuk@mint:~$ 

NOTE: I added a line in /etc/hosts like 192.168.0.11 windows to make Linux know where my Windows machine is. You can also use the ip-address in stead of the name.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.