Debian Codegraph @

upstream/debian-unstable/man1/winexe.1

raw
1 '\" t
2 .\" Title: winexe
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: User Commands
7 .\" Source: Samba 4.24.3-Debian-4.24.3+dfsg-1
8 .\" Language: English
9 .\"
10 .TH "WINEXE" "1" "05/26/2026" "Samba 4\&.24\&.3\-Debian\-4\&.24\&.3+dfs" "User Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 winexe \- Winexe is a Remote Windows\-command executor
32 .SH "SYNOPSIS"
33 .HP \w'\ 'u
34 winexe [\-\-uninstall] [\-\-reinstall] [\-\-runas\ [DOMAIN/]USERNAME[%PASSWORD]] [\-\-runas\-file\ FILE] [\-\-interactive\ [0|1]] [\-\-ostype\ [0|1]] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] [\-U|\-\-user=[DOMAIN/]USERNAME%[PASSWORD]] [\-N|\-\-no\-pass] [\-\-password=STRING] [\-\-pw\-nt\-hash] [\-A|\-\-authentication\-file=FILE] [\-P|\-\-machine\-pass] [\-\-simple\-bind\-dn=DN] [\-\-use\-kerberos=desired|required|off] [\-\-use\-krb5\-ccache=CCACHE] [\-\-use\-winbind\-ccache] [\-\-client\-protection=sign|encrypt|off] [\-V|\-\-version] [\-?|\-\-help] [\-\-usage]
35 .SH "DESCRIPTION"
36 .PP
37 This tool is part of the
38 \fBsamba\fR(7)
39 suite\&.
40 .PP
41 The
42 winexe
43 allows remote command execution on native Windows operating systems\&.
44 .SH "OPTIONS"
45 .PP
46 \-\-uninstall
47 .RS 4
48 Uninstall winexe service after remote execution\&.
49 .RE
50 .PP
51 \-\-reinstall
52 .RS 4
53 Reinstall winexe service before remote execution\&.
54 .RE
55 .PP
56 \-\-runas \fI[DOMAIN/]USERNAME[%PASSWORD]]\fR
57 .RS 4
58 Run as the given user (BEWARE: this password is sent in cleartext over the network!)
59 .RE
60 .PP
61 \-\-runas\-file \fIFILE\fR
62 .RS 4
63 Run as user options defined in a file\&.
64 .RE
65 .PP
66 \-\-interactive \fI[0|1]\fR
67 .RS 4
68 Desktop interaction\&.
69 .sp
70 There are two options:
71 .RS
72 .sp
73 .RS 4
74 .ie n \{\
75 \h'-04'\(bu\h'+03'\c
76 .\}
77 .el \{\
78 .sp -1
79 .IP \(bu 2.3
80 .\}
81 0 \- disallow
82 .RE
83 .sp
84 .RS 4
85 .ie n \{\
86 \h'-04'\(bu\h'+03'\c
87 .\}
88 .el \{\
89 .sp -1
90 .IP \(bu 2.3
91 .\}
92 1 \- allow\&. If allow, also use the \-\-system switch (Windows requirement)\&. Vista does not support this option\&.
93 .RE
94 .sp
95 .RE
96 .RE
97 .PP
98 \-\-ostype \fI[0|1|2]\fR
99 .RS 4
100 Determines which version (32\-bit or 64\-bit) of service will be installed\&.
101 .sp
102 There are three options:
103 .RS
104 .sp
105 .RS 4
106 .ie n \{\
107 \h'-04'\(bu\h'+03'\c
108 .\}
109 .el \{\
110 .sp -1
111 .IP \(bu 2.3
112 .\}
113 0 \- 32\-bit
114 .RE
115 .sp
116 .RS 4
117 .ie n \{\
118 \h'-04'\(bu\h'+03'\c
119 .\}
120 .el \{\
121 .sp -1
122 .IP \(bu 2.3
123 .\}
124 1 \- 64\-bit
125 .RE
126 .sp
127 .RS 4
128 .ie n \{\
129 \h'-04'\(bu\h'+03'\c
130 .\}
131 .el \{\
132 .sp -1
133 .IP \(bu 2.3
134 .\}
135 2 \- winexe will decide
136 .RE
137 .sp
138 .RE
139 .RE
140 .PP
141 \-d|\-\-debuglevel=level
142 .RS 4
143 \fIlevel\fR
144 is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
145 .sp
146 The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
147 .sp
148 Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
149 .sp
150 Note that specifying this parameter here will override the
151 \m[blue]\fBlog level\fR\m[]
152 parameter in the
153 /etc/samba/smb\&.conf
154 file\&.
155 .RE
156 .PP
157 \-\-debug\-stdout
158 .RS 4
159 This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
160 .RE
161 .PP
162 \-\-configfile=<configuration file>
163 .RS 4
164 The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as
165 \m[blue]\fBclient smb encrypt\fR\m[]\&. See
166 /etc/samba/smb\&.conf
167 for more information\&. The default configuration file name is determined at compile time\&.
168 .RE
169 .PP
170 \-\-option=<name>=<value>
171 .RS 4
172 Set the
173 \fBsmb.conf\fR(5)
174 option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&.
175 .RE
176 .PP
177 \-l|\-\-log\-basename=logdirectory
178 .RS 4
179 Base directory name for log/debug files\&. The extension
180 \fB"\&.progname"\fR
181 will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
182 .RE
183 .PP
184 \-\-leak\-report
185 .RS 4
186 Enable talloc leak reporting on exit\&.
187 .RE
188 .PP
189 \-\-leak\-report\-full
190 .RS 4
191 Enable full talloc leak reporting on exit\&.
192 .RE
193 .PP
194 \-V|\-\-version
195 .RS 4
196 Prints the program version number\&.
197 .RE
198 .PP
199 \-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER
200 .RS 4
201 This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best is to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&.
202 .sp
203 The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows:
204 .RS
205 .sp
206 .RS 4
207 .ie n \{\
208 \h'-04'\(bu\h'+03'\c
209 .\}
210 .el \{\
211 .sp -1
212 .IP \(bu 2.3
213 .\}
214 \fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the
215 \fBlmhosts\fR(5)
216 for details) then any name type matches for lookup\&.
217 .RE
218 .sp
219 .RS 4
220 .ie n \{\
221 \h'-04'\(bu\h'+03'\c
222 .\}
223 .el \{\
224 .sp -1
225 .IP \(bu 2.3
226 .\}
227 \fBhost\fR: Do a standard host name to IP address resolution, using the system
228 /etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the
229 /etc/nsswitch\&.conf
230 file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
231 .RE
232 .sp
233 .RS 4
234 .ie n \{\
235 \h'-04'\(bu\h'+03'\c
236 .\}
237 .el \{\
238 .sp -1
239 .IP \(bu 2.3
240 .\}
241 \fBwins\fR: Query a name with the IP address listed in the
242 \fIwins server\fR
243 parameter\&. If no WINS server has been specified this method will be ignored\&.
244 .RE
245 .sp
246 .RS 4
247 .ie n \{\
248 \h'-04'\(bu\h'+03'\c
249 .\}
250 .el \{\
251 .sp -1
252 .IP \(bu 2.3
253 .\}
254 \fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
255 \fIinterfaces\fR
256 parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&.
257 .RE
258 .sp
259 .RE
260 If this parameter is not set then the name resolve order defined in the
261 /etc/samba/smb\&.conf
262 file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&.
263 .sp
264 The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the
265 \m[blue]\fBname resolve order\fR\m[]
266 parameter of the
267 /etc/samba/smb\&.conf
268 file, the name resolution methods will be attempted in this order\&.
269 .RE
270 .PP
271 \-O|\-\-socket\-options=SOCKETOPTIONS
272 .RS 4
273 TCP socket options to set on the client socket\&. See the socket options parameter in the
274 /etc/samba/smb\&.conf
275 manual page for the list of valid options\&.
276 .RE
277 .PP
278 \-m|\-\-max\-protocol=MAXPROTOCOL
279 .RS 4
280 The value of the parameter (a string) is the highest protocol level that will be supported by the client\&.
281 .sp
282 Note that specifying this parameter here will override the
283 \m[blue]\fBclient max protocol\fR\m[]
284 parameter in the
285 /etc/samba/smb\&.conf
286 file\&.
287 .RE
288 .PP
289 \-n|\-\-netbiosname=NETBIOSNAME
290 .RS 4
291 This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
292 \m[blue]\fBnetbios name\fR\m[]
293 parameter in the
294 /etc/samba/smb\&.conf
295 file\&. However, a command line setting will take precedence over settings in
296 /etc/samba/smb\&.conf\&.
297 .RE
298 .PP
299 \-\-netbios\-scope=SCOPE
300 .RS 4
301 This specifies a NetBIOS scope that
302 nmblookup
303 will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are
304 \fIvery\fR
305 rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&.
306 .RE
307 .PP
308 \-W|\-\-workgroup=WORKGROUP
309 .RS 4
310 Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&.
311 .sp
312 Note that specifying this parameter here will override the
313 \m[blue]\fBworkgroup\fR\m[]
314 parameter in the
315 /etc/samba/smb\&.conf
316 file\&.
317 .RE
318 .PP
319 \-r|\-\-realm=REALM
320 .RS 4
321 Set the realm for the domain\&.
322 .sp
323 Note that specifying this parameter here will override the
324 \m[blue]\fBrealm\fR\m[]
325 parameter in the
326 /etc/samba/smb\&.conf
327 file\&.
328 .RE
329 .PP
330 \-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD]
331 .RS 4
332 Sets the SMB username or username and password\&.
333 .sp
334 If %PASSWORD is not specified, the user will be prompted\&. The client will first check the
335 \fBUSER\fR
336 environment variable (which is also permitted to also contain the password separated by a %), then the
337 \fBLOGNAME\fR
338 variable (which is not permitted to contain a password) and if either exists, the value is used\&. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used\&.
339 .sp
340 A third option is to use a credentials file which contains the plaintext of the username and password\&. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables\&. If this method is used, make certain that the permissions on the file restrict access from unwanted users\&. See the
341 \fI\-A\fR
342 for more details\&.
343 .sp
344 Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with
345 kinit\&.
346 .sp
347 While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&.
348 .RE
349 .PP
350 \-N|\-\-no\-pass
351 .RS 4
352 If specified, this parameter suppresses the normal password prompt from the client to the user\&. This is useful when accessing a service that does not require a password\&.
353 .sp
354 Unless a password is specified on the command line or this parameter is specified, the client will request a password\&.
355 .sp
356 If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used\&.
357 .RE
358 .PP
359 \-\-password
360 .RS 4
361 Specify the password on the commandline\&.
362 .sp
363 Be cautious about including passwords in scripts or passing user\-supplied values onto the command line\&. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with
364 kinit\&.
365 .sp
366 If \-\-password is not specified, the tool will check the
367 \fBPASSWD\fR
368 environment variable, followed by
369 \fBPASSWD_FD\fR
370 which is expected to contain an open file descriptor (FD) number\&.
371 .sp
372 Finally it will check
373 \fBPASSWD_FILE\fR
374 (containing a file path to be opened)\&. The file should only contain the password\&. Make certain that the permissions on the file restrict access from unwanted users!
375 .sp
376 While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race\&.
377 .RE
378 .PP
379 \-\-pw\-nt\-hash
380 .RS 4
381 The supplied password is the NT hash\&.
382 .RE
383 .PP
384 \-A|\-\-authentication\-file=filename
385 .RS 4
386 This option allows you to specify a file from which to read the username and password used in the connection\&. The format of the file is:
387 .sp
388 .if n \{\
389 .RS 4
390 .\}
391 .nf
392 username = <value>
393 password = <value>
394 domain = <value>
395
396 .fi
397 .if n \{\
398 .RE
399 .\}
400 .sp
401 Make certain that the permissions on the file restrict access from unwanted users!
402 .RE
403 .PP
404 \-P|\-\-machine\-pass
405 .RS 4
406 Use stored machine account password\&.
407 .RE
408 .PP
409 \-\-simple\-bind\-dn=DN
410 .RS 4
411 DN to use for a simple bind\&.
412 .RE
413 .PP
414 \-\-use\-kerberos=desired|required|off
415 .RS 4
416 This parameter determines whether Samba client tools will try to authenticate using Kerberos\&. For Kerberos authentication you should use DNS names instead of IP addresses when connecting to a service\&. By default Samba client tools will try to use the default Kerberos credential cache (ccache)\&. In case the ccache does not exist or \-U|\-\-user option was specified, clients will ask to enter a password and will obtain a Kerberos ticket (kinit) for you\&. If you want to use an alternative Kerberos credentical cache, use the \-\-use\-krb5\-ccache option\&.
417 .sp
418 Note that specifying this parameter here will override the
419 \m[blue]\fBclient use kerberos\fR\m[]
420 parameter in the
421 /etc/samba/smb\&.conf
422 file\&.
423 .RE
424 .PP
425 \-\-use\-krb5\-ccache=CCACHE
426 .RS 4
427 Specifies the credential cache location for Kerberos authentication\&.
428 .sp
429 This will enforce \-\-use\-kerberos=required\&.
430 .RE
431 .PP
432 \-\-use\-winbind\-ccache
433 .RS 4
434 Try to use the credential cache by winbind\&.
435 .RE
436 .PP
437 \-\-client\-protection=sign|encrypt|off
438 .RS 4
439 Sets the connection protection the client tool should use\&.
440 .sp
441 Note that specifying this parameter here will override the
442 \m[blue]\fBclient protection\fR\m[]
443 parameter in the
444 /etc/samba/smb\&.conf
445 file\&.
446 .sp
447 In case you need more fine grained control you can use:
448 \-\-option=clientsmbencrypt=OPTION,
449 \-\-option=clientipcsigning=OPTION,
450 \-\-option=clientsigning=OPTION\&.
451 .RE
452 .PP
453 \-?|\-\-help
454 .RS 4
455 Print a summary of command line options\&.
456 .RE
457 .PP
458 \-\-usage
459 .RS 4
460 Display brief usage message\&.
461 .RE
462 .SH "EXIT STATUS"
463 .PP
464 The winexe program returns 0 if the operation succeeded, or 1 if the operation failed\&.
465 .SH "VERSION"
466 .PP
467 This man page is part of version 4\&.24\&.3\-Debian\-4\&.24\&.3+dfsg\-1 of the Samba suite\&.
468 .SH "AUTHOR"
469 .PP
470 The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
471 .PP
472 The
473 winexe
474 and it\*(Aqs native Windows counterpart were written by Andrzej Hajda\&. The Samba client tool winexe was later rewritten by Volker Lendecke\&.
475 .PP
476 This manpage was written by Guenther Deschner\&.