Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
No I already try this its not work if domain not set in the winexe command –  nils Jul 5 '13 at 13:01
    
Have you tried to use the target hostname as domain? –  krissi Jul 5 '13 at 13:05
    
what you mean as domain the target host is the IP address of the WIN server ? , give me example so will try . –  nils Jul 5 '13 at 14:11
    
when your target host is //targethost use winexe -U targethost/Administrator%Pass123 //targethost command –  krissi Jul 5 '13 at 14:45
    
I add the targethost in /etc/hosts and with his IP address and run this: winexe -U $targethost/Administrator%Pass123 //192.9l.22.19 , now its work - but how can exaplin this ? , I mean how the $targethost IP works in place of domain name ? –  nils Jul 5 '13 at 16:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.