Linux – run winexe on linux in order to exe CLI commands on WIN server ( workgroup server )

command-line-interfacelinuxremote-accesswindows

winexe is tool that can execute commands on WIN machines from Linux servers

winexe syntax should be as the following:

      winexe -U [Domain/]User%Password //host command

Because I have windows 7 that work as workgroup, I can defined in winexe syntax the domain name

question: is it possible to use the winexe without the domain name ? , or maybe there are some magic ideas that can help me with this case ?

Usage

winexe started without arguments shows list of options,
using "–help" will show their descriptions. Most of the tasks can be done using syntax:

   winexe -U [Domain/]User%Password //host command

Where 'host' can be given as ip number or DNS hostname and 'command' is a command which will be run on remote system.

Examples:

 # winexe -U HOME/Administrator%Pass123 //192.168.0.10 "ipconfig /all"

 # winexe -U HOME/Administrator%Pass123 //host 'cmd /C dir C:\'

domain name – HOME

Best Answer

The "Domain/" between [ and ] means it is optional, so this should work:

winexe -U User%Password //host command

If that does not work use the target hostname as Domain:

winexe -U host/User%Password //host command

This works because windows uses its local user database when domain = hostname. Maybe ./User%Password (notice the dot) also works. The dot as Domain means "lookup your own database", too.