1WINEXE(1)                        User Commands                       WINEXE(1)
2
3
4

NAME

6       winexe - Winexe is a Remote Windows-command executor
7

SYNOPSIS

9       winexe [--uninstall] [--reinstall]
10        [--runas [DOMAIN/]USERNAME[%PASSWORD]] [--runas-file FILE]
11        [--interactive [0|1]] [--ostype [0|1]] [-d|--debuglevel=DEBUGLEVEL]
12        [--debug-stdout] [--configfile=CONFIGFILE] [--option=name=value]
13        [-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full]
14        [-R|--name-resolve=NAME-RESOLVE-ORDER]
15        [-O|--socket-options=SOCKETOPTIONS] [-m|--max-protocol=MAXPROTOCOL]
16        [-n|--netbiosname=NETBIOSNAME] [--netbios-scope=SCOPE]
17        [-W|--workgroup=WORKGROUP] [--realm=REALM]
18        [-U|--user=[DOMAIN/]USERNAME%[PASSWORD]] [-N|--no-pass]
19        [--password=STRING] [--pw-nt-hash] [-A|--authentication-file=FILE]
20        [-P|--machine-pass] [--simple-bind-dn=DN]
21        [--use-kerberos=desired|required|off] [--use-krb5-ccache=CCACHE]
22        [--use-winbind-ccache] [--client-protection=sign|encrypt|off]
23        [-V|--version] [-?|--help] [--usage]
24

DESCRIPTION

26       This tool is part of the samba(7) suite.
27
28       The winexe allows remote command execution on native Windows operating
29       systems.
30

OPTIONS

32       --uninstall
33           Uninstall winexe service after remote execution.
34
35       --reinstall
36           Reinstall winexe service before remote execution.
37
38       --runas [DOMAIN/]USERNAME[%PASSWORD]]
39           Run as the given user (BEWARE: this password is sent in cleartext
40           over the network!)
41
42       --runas-file FILE
43           Run as user options defined in a file.
44
45       --interactive [0|1]
46           Desktop interaction.
47
48           There are two options:
49
50                  •   0 - disallow
51
52                  •   1 - allow. If allow, also use the --system switch
53                      (Windows requirement). Vista does not support this
54                      optoin.
55
56
57       --ostype [0|1|2]
58           Determines which version (32-bit or 64-bit) of service will be
59           installed.
60
61           There are three options:
62
63                  •   0 - 32-bit
64
65                  •   1 - 64-bit
66
67                  •   2 - winexe will decide
68
69
70       -d|--debuglevel=DEBUGLEVEL
71           level is an integer from 0 to 10. The default value if this
72           parameter is not specified is 1 for client applications.
73
74           The higher this value, the more detail will be logged to the log
75           files about the activities of the server. At level 0, only critical
76           errors and serious warnings will be logged. Level 1 is a reasonable
77           level for day-to-day running - it generates a small amount of
78           information about operations carried out.
79
80           Levels above 1 will generate considerable amounts of log data, and
81           should only be used when investigating a problem. Levels above 3
82           are designed for use only by developers and generate HUGE amounts
83           of log data, most of which is extremely cryptic.
84
85           Note that specifying this parameter here will override the log
86           level parameter in the smb.conf file.
87
88       --debug-stdout
89           This will redirect debug output to STDOUT. By default all clients
90           are logging to STDERR.
91
92       --configfile=<configuration file>
93           The file specified contains the configuration details required by
94           the client. The information in this file can be general for client
95           and server or only provide client specific like options such as
96           client smb encrypt. See smb.conf for more information. The default
97           configuration file name is determined at compile time.
98
99       --option=<name>=<value>
100           Set the smb.conf(5) option "<name>" to value "<value>" from the
101           command line. This overrides compiled-in defaults and options read
102           from the configuration file. If a name or a value includes a space,
103           wrap whole --option=name=value into quotes.
104
105       -l|--log-basename=logdirectory
106           Base directory name for log/debug files. The extension ".progname"
107           will be appended (e.g. log.smbclient, log.smbd, etc...). The log
108           file is never removed by the client.
109
110       --leak-report
111           Enable talloc leak reporting on exit.
112
113       --leak-report-full
114           Enable full talloc leak reporting on exit.
115
116       -V|--version
117           Prints the program version number.
118
119       -R|--name-resolve=NAME-RESOLVE-ORDER
120           This option is used to determine what naming services and in what
121           order to resolve host names to IP addresses. The option takes a
122           space-separated string of different name resolution options. The
123           best ist to wrap the whole --name-resolve=NAME-RESOLVE-ORDER into
124           quotes.
125
126           The options are: "lmhosts", "host", "wins" and "bcast". They cause
127           names to be resolved as follows:
128
129lmhosts: Lookup an IP address in the Samba lmhosts file.
130                      If the line in lmhosts has no name type attached to the
131                      NetBIOS name (see the lmhosts(5) for details) then any
132                      name type matches for lookup.
133
134host: Do a standard host name to IP address resolution,
135                      using the system /etc/hosts, NIS, or DNS lookups. This
136                      method of name resolution is operating system dependent,
137                      for instance on IRIX or Solaris this may be controlled
138                      by the /etc/nsswitch.conf file). Note that this method
139                      is only used if the NetBIOS name type being queried is
140                      the 0x20 (server) name type, otherwise it is ignored.
141
142wins: Query a name with the IP address listed in the
143                      wins server parameter. If no WINS server has been
144                      specified this method will be ignored.
145
146bcast: Do a broadcast on each of the known local
147                      interfaces listed in the interfaces parameter. This is
148                      the least reliable of the name resolution methods as it
149                      depends on the target host being on a locally connected
150                      subnet.
151
152           If this parameter is not set then the name resolve order defined in
153           the smb.conf file parameter (name resolve order) will be used.
154
155           The default order is lmhosts, host, wins, bcast. Without this
156           parameter or any entry in the name resolve order parameter of the
157           smb.conf file, the name resolution methods will be attempted in
158           this order.
159
160       -O|--socket-options=SOCKETOPTIONS
161           TCP socket options to set on the client socket. See the socket
162           options parameter in the smb.conf manual page for the list of valid
163           options.
164
165       -m|--max-protocol=MAXPROTOCOL
166           The value of the parameter (a string) is the highest protocol level
167           that will be supported by the client.
168
169           Note that specifying this parameter here will override the client
170           max protocol parameter in the smb.conf file.
171
172       -n|--netbiosname=NETBIOSNAME
173           This option allows you to override the NetBIOS name that Samba uses
174           for itself. This is identical to setting the netbios name parameter
175           in the smb.conf file. However, a command line setting will take
176           precedence over settings in smb.conf.
177
178       --netbios-scope=SCOPE
179           This specifies a NetBIOS scope that nmblookup will use to
180           communicate with when generating NetBIOS names. For details on the
181           use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS
182           scopes are very rarely used, only set this parameter if you are the
183           system administrator in charge of all the NetBIOS systems you
184           communicate with.
185
186       -W|--workgroup=WORKGROUP
187           Set the SMB domain of the username. This overrides the default
188           domain which is the domain defined in smb.conf. If the domain
189           specified is the same as the servers NetBIOS name, it causes the
190           client to log on using the servers local SAM (as opposed to the
191           Domain SAM).
192
193           Note that specifying this parameter here will override the
194           workgroup parameter in the smb.conf file.
195
196       -r|--realm=REALM
197           Set the realm for the domain.
198
199           Note that specifying this parameter here will override the realm
200           parameter in the smb.conf file.
201
202       -U|--user=[DOMAIN\]USERNAME[%PASSWORD]
203           Sets the SMB username or username and password.
204
205           If %PASSWORD is not specified, the user will be prompted. The
206           client will first check the USER environment variable (which is
207           also permitted to also contain the password seperated by a %), then
208           the LOGNAME variable (which is not permitted to contain a password)
209           and if either exists, the value is used. If these environmental
210           variables are not found, the username found in a Kerberos
211           Credentials cache may be used.
212
213           A third option is to use a credentials file which contains the
214           plaintext of the username and password. This option is mainly
215           provided for scripts where the admin does not wish to pass the
216           credentials on the command line or via environment variables. If
217           this method is used, make certain that the permissions on the file
218           restrict access from unwanted users. See the -A for more details.
219
220           Be cautious about including passwords in scripts or passing
221           user-supplied values onto the command line. For security it is
222           better to let the Samba client tool ask for the password if needed,
223           or obtain the password once with kinit.
224
225           While Samba will attempt to scrub the password from the process
226           title (as seen in ps), this is after startup and so is subject to a
227           race.
228
229       -N|--no-pass
230           If specified, this parameter suppresses the normal password prompt
231           from the client to the user. This is useful when accessing a
232           service that does not require a password.
233
234           Unless a password is specified on the command line or this
235           parameter is specified, the client will request a password.
236
237           If a password is specified on the command line and this option is
238           also defined the password on the command line will be silently
239           ignored and no password will be used.
240
241       --password
242           Specify the password on the commandline.
243
244           Be cautious about including passwords in scripts or passing
245           user-supplied values onto the command line. For security it is
246           better to let the Samba client tool ask for the password if needed,
247           or obtain the password once with kinit.
248
249           If --password is not specified, the tool will check the PASSWD
250           environment variable, followed by PASSWD_FD which is expected to
251           contain an open file descriptor (FD) number.
252
253           Finally it will check PASSWD_FILE (containing a file path to be
254           opened). The file should only contain the password. Make certain
255           that the permissions on the file restrict access from unwanted
256           users!
257
258           While Samba will attempt to scrub the password from the process
259           title (as seen in ps), this is after startup and so is subject to a
260           race.
261
262       --pw-nt-hash
263           The supplied password is the NT hash.
264
265       -A|--authentication-file=filename
266           This option allows you to specify a file from which to read the
267           username and password used in the connection. The format of the
268           file is:
269
270                                   username = <value>
271                                   password = <value>
272                                   domain   = <value>
273
274
275           Make certain that the permissions on the file restrict access from
276           unwanted users!
277
278       -P|--machine-pass
279           Use stored machine account password.
280
281       --simple-bind-dn=DN
282           DN to use for a simple bind.
283
284       --use-kerberos=desired|required|off
285           This parameter determines whether Samba client tools will try to
286           authenticate using Kerberos. For Kerberos authentication you need
287           to use dns names instead of IP addresses when connnecting to a
288           service.
289
290           Note that specifying this parameter here will override the client
291           use kerberos parameter in the smb.conf file.
292
293       --use-krb5-ccache=CCACHE
294           Specifies the credential cache location for Kerberos
295           authentication.
296
297           This will set --use-kerberos=required too.
298
299       --use-winbind-ccache
300           Try to use the credential cache by winbind.
301
302       --client-protection=sign|encrypt|off
303           Sets the connection protection the client tool should use.
304
305           Note that specifying this parameter here will override the client
306           protection parameter in the smb.conf file.
307
308           In case you need more fine grained control you can use:
309           --option=clientsmbencrypt=OPTION, --option=clientipcsigning=OPTION,
310           --option=clientsigning=OPTION.
311
312       -?|--help
313           Print a summary of command line options.
314
315       --usage
316           Display brief usage message.
317

EXIT STATUS

319       The winexe program returns 0 if the operation succeeded, or 1 if the
320       operation failed.
321

VERSION

323       This man page is part of version 4.15.2 of the Samba suite.
324

AUTHOR

326       The original Samba software and related utilities were created by
327       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
328       Source project similar to the way the Linux kernel is developed.
329
330       The winexe and it's native Windows counterpart were written by Andrzej
331       Hajda. The Samba client tool winexe was later rewritten by Volker
332       Lendecke.
333
334       This manpage was written by Guenther Deschner.
335
336
337
338Samba 4.15.2                      11/13/2021                         WINEXE(1)
Impressum