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 /etc/samba/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 /etc/samba/smb.conf for more information.
97           The default 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 /etc/samba/smb.conf file parameter (name resolve order) will be
154           used.
155
156           The default order is lmhosts, host, wins, bcast. Without this
157           parameter or any entry in the name resolve order parameter of the
158           /etc/samba/smb.conf file, the name resolution methods will be
159           attempted in this order.
160
161       -O|--socket-options=SOCKETOPTIONS
162           TCP socket options to set on the client socket. See the socket
163           options parameter in the /etc/samba/smb.conf manual page for the
164           list of valid options.
165
166       -m|--max-protocol=MAXPROTOCOL
167           The value of the parameter (a string) is the highest protocol level
168           that will be supported by the client.
169
170           Note that specifying this parameter here will override the client
171           max protocol parameter in the /etc/samba/smb.conf file.
172
173       -n|--netbiosname=NETBIOSNAME
174           This option allows you to override the NetBIOS name that Samba uses
175           for itself. This is identical to setting the netbios name parameter
176           in the /etc/samba/smb.conf file. However, a command line setting
177           will take precedence over settings in /etc/samba/smb.conf.
178
179       --netbios-scope=SCOPE
180           This specifies a NetBIOS scope that nmblookup will use to
181           communicate with when generating NetBIOS names. For details on the
182           use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS
183           scopes are very rarely used, only set this parameter if you are the
184           system administrator in charge of all the NetBIOS systems you
185           communicate with.
186
187       -W|--workgroup=WORKGROUP
188           Set the SMB domain of the username. This overrides the default
189           domain which is the domain defined in smb.conf. If the domain
190           specified is the same as the servers NetBIOS name, it causes the
191           client to log on using the servers local SAM (as opposed to the
192           Domain SAM).
193
194           Note that specifying this parameter here will override the
195           workgroup parameter in the /etc/samba/smb.conf file.
196
197       -r|--realm=REALM
198           Set the realm for the domain.
199
200           Note that specifying this parameter here will override the realm
201           parameter in the /etc/samba/smb.conf file.
202
203       -U|--user=[DOMAIN\]USERNAME[%PASSWORD]
204           Sets the SMB username or username and password.
205
206           If %PASSWORD is not specified, the user will be prompted. The
207           client will first check the USER environment variable (which is
208           also permitted to also contain the password separated by a %), then
209           the LOGNAME variable (which is not permitted to contain a password)
210           and if either exists, the value is used. If these environmental
211           variables are not found, the username found in a Kerberos
212           Credentials cache may be used.
213
214           A third option is to use a credentials file which contains the
215           plaintext of the username and password. This option is mainly
216           provided for scripts where the admin does not wish to pass the
217           credentials on the command line or via environment variables. If
218           this method is used, make certain that the permissions on the file
219           restrict access from unwanted users. See the -A for more details.
220
221           Be cautious about including passwords in scripts or passing
222           user-supplied values onto the command line. For security it is
223           better to let the Samba client tool ask for the password if needed,
224           or obtain the password once with kinit.
225
226           While Samba will attempt to scrub the password from the process
227           title (as seen in ps), this is after startup and so is subject to a
228           race.
229
230       -N|--no-pass
231           If specified, this parameter suppresses the normal password prompt
232           from the client to the user. This is useful when accessing a
233           service that does not require a password.
234
235           Unless a password is specified on the command line or this
236           parameter is specified, the client will request a password.
237
238           If a password is specified on the command line and this option is
239           also defined the password on the command line will be silently
240           ignored and no password will be used.
241
242       --password
243           Specify the password on the commandline.
244
245           Be cautious about including passwords in scripts or passing
246           user-supplied values onto the command line. For security it is
247           better to let the Samba client tool ask for the password if needed,
248           or obtain the password once with kinit.
249
250           If --password is not specified, the tool will check the PASSWD
251           environment variable, followed by PASSWD_FD which is expected to
252           contain an open file descriptor (FD) number.
253
254           Finally it will check PASSWD_FILE (containing a file path to be
255           opened). The file should only contain the password. Make certain
256           that the permissions on the file restrict access from unwanted
257           users!
258
259           While Samba will attempt to scrub the password from the process
260           title (as seen in ps), this is after startup and so is subject to a
261           race.
262
263       --pw-nt-hash
264           The supplied password is the NT hash.
265
266       -A|--authentication-file=filename
267           This option allows you to specify a file from which to read the
268           username and password used in the connection. The format of the
269           file is:
270
271                                   username = <value>
272                                   password = <value>
273                                   domain   = <value>
274
275
276           Make certain that the permissions on the file restrict access from
277           unwanted users!
278
279       -P|--machine-pass
280           Use stored machine account password.
281
282       --simple-bind-dn=DN
283           DN to use for a simple bind.
284
285       --use-kerberos=desired|required|off
286           This parameter determines whether Samba client tools will try to
287           authenticate using Kerberos. For Kerberos authentication you need
288           to use dns names instead of IP addresses when connecting to a
289           service.
290
291           Note that specifying this parameter here will override the client
292           use kerberos parameter in the /etc/samba/smb.conf file.
293
294       --use-krb5-ccache=CCACHE
295           Specifies the credential cache location for Kerberos
296           authentication.
297
298           This will set --use-kerberos=required too.
299
300       --use-winbind-ccache
301           Try to use the credential cache by winbind.
302
303       --client-protection=sign|encrypt|off
304           Sets the connection protection the client tool should use.
305
306           Note that specifying this parameter here will override the client
307           protection parameter in the /etc/samba/smb.conf file.
308
309           In case you need more fine grained control you can use:
310           --option=clientsmbencrypt=OPTION, --option=clientipcsigning=OPTION,
311           --option=clientsigning=OPTION.
312
313       -?|--help
314           Print a summary of command line options.
315
316       --usage
317           Display brief usage message.
318

EXIT STATUS

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

VERSION

324       This man page is part of version 4.18.9 of the Samba suite.
325

AUTHOR

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