1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
|
'\" t
.\" Title: smbtorture
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 05/09/2024
.\" Manual: Test Suite
.\" Source: Samba 4.0
.\" Language: English
.\"
.TH "SMBTORTURE" "1" "05/09/2024" "Samba 4\&.0" "Test Suite"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
smbtorture \- Run a series of tests against a SMB server
.SH "SYNOPSIS"
.HP \w'\fBsmbtorture\fR\ 'u
\fBsmbtorture\fR {//server/share} [\-d\ debuglevel] [\-U\ user%pass] [\-k] [\-N\ numprocs] [\-n\ netbios_name] [\-W\ workgroup] [\-e\ num\ files(entries)] [\-O\ socket_options] [\-m\ maximum_protocol] [\-L] [\-c\ CLIENT\&.TXT] [\-t\ timelimit] [\-C\ filename] [\-A] [\-p\ port] [\-s\ seed] [\-f\ max_failures] [\-X] {BINDING\-STRING|UNC} {TEST1} [TEST2] [\&.\&.\&.]
.SH "DESCRIPTION"
.PP
smbtorture is a testsuite that runs several tests against a SMB server\&. All tests are known to succeed against a Windows 2003 server (?)\&. Smbtorture\*(Aqs primary goal is finding differences in implementations of the SMB protocol and testing SMB servers\&.
.PP
Any number of tests can be specified on the command\-line\&. If no tests are specified, all tests are run\&.
.PP
If no arguments are specified at all, all available options and tests are listed\&.
.SS "Binding string format"
.PP
The binding string format is:
.PP
TRANSPORT:host[flags]
.PP
Where TRANSPORT is either ncacn_np for SMB, ncacn_ip_tcp for RPC/TCP or ncalrpc for local connections\&.
.PP
\*(Aqhost\*(Aq is an IP or hostname or netbios name\&. If the binding string identifies the server side of an endpoint, \*(Aqhost\*(Aq may be an empty string\&.
.PP
\*(Aqflags\*(Aq can include a SMB pipe name if using the ncacn_np transport or a TCP port number if using the ncacn_ip_tcp transport, otherwise they will be auto\-determined\&.
.PP
other recognised flags are:
.PP
sign
.RS 4
enable ntlmssp signing
.RE
.PP
seal
.RS 4
enable ntlmssp sealing
.RE
.PP
connect
.RS 4
enable rpc connect level auth (auth, but no sign or seal)
.RE
.PP
validate
.RS 4
enable the NDR validator
.RE
.PP
print
.RS 4
enable debugging of the packets
.RE
.PP
bigendian
.RS 4
use bigendian RPC
.RE
.PP
padcheck
.RS 4
check reply data for non\-zero pad bytes
.RE
.PP
For example, these all connect to the samr pipe:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:myserver
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:myserver[samr]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:myserver[\e\epipe\e\esamr]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:myserver[/pipe/samr]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:myserver[samr,sign,print]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:myserver[\e\epipe\e\esamr,sign,seal,bigendian]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:myserver[/pipe/samr,seal,validate]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_np:[/pipe/samr]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_ip_tcp:myserver
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_ip_tcp:myserver[1024]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncacn_ip_tcp:myserver[1024,sign,seal]
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
ncalrpc:
.RE
.SS "UNC Format"
.PP
The UNC format is:
.PP
//server/share
.SH "OPTIONS"
.PP
\-d debuglevel
.RS 4
Use the specified Samba debug level\&. A higher debug level means more output\&.
.RE
.PP
\-U user%pass
.RS 4
Use the specified username/password combination when logging in to a remote server\&.
.RE
.PP
\-k
.RS 4
Use kerberos when authenticating\&.
.RE
.PP
\-W workgroup
.RS 4
Use specified name as our workgroup name\&.
.RE
.PP
\-n netbios_name
.RS 4
Use specified name as our NetBIOS name\&.
.RE
.PP
\-O socket_options
.RS 4
Use specified socket options, equivalent of the smb\&.conf option
\(lqsocket options\(rq\&. See the smb\&.conf(5) manpage for details\&.
.RE
.PP
\-m max_protocol
.RS 4
Specify the maximum SMB dialect that should be used\&. Possible values are: CORE, COREPLUS, LANMAN1, LANMAN2, NT1
.RE
.PP
\-s seed
.RS 4
Initialize the randomizer using
\fIseed\fR
as seed\&.
.RE
.PP
\-L
.RS 4
Use oplocks\&.
.RE
.PP
\-X
.RS 4
Enable dangerous tests\&. Use with care! This might crash your server\&.\&.\&.
.RE
.PP
\-t timelimit
.RS 4
Specify the NBENCH time limit in seconds\&. Defaults to 600\&.
.RE
.PP
\-p ports
.RS 4
Specify ports to connect to\&.
.RE
.PP
\-c file
.RS 4
Read NBENCH commands from
\fIfile\fR
instead of from CLIENT\&.TXT\&.
.RE
.PP
\-A
.RS 4
Show not just OK or FAILED but more detailed output\&. Used only by DENY test at the moment\&.
.RE
.PP
\-C filename
.RS 4
Load a list of UNC names from the specified filename\&. Smbtorture instances will connect to a random host from this list\&.
.RE
.PP
\-N numprocs
.RS 4
Specify number of smbtorture processes to launch\&.
.RE
.PP
\-e num_files
.RS 4
Number of entries to use in certain tests (such as creating X files) (default: 1000)\&.
.RE
.PP
\-f max_failures
.RS 4
Number of failures before aborting a test (default: 1)\&.
.RE
.SH "VERSION"
.PP
This man page is correct for version 4\&.0 of the Samba suite\&.
.SH "SEE ALSO"
.PP
Samba
.SH "AUTHOR"
.PP
This utility is part of the
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
suite, which is developed by the global
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
.PP
smbtorture was written by Andrew Tridgell\&.
.PP
This manpage was written by Jelmer Vernooij\&.
.SH "NOTES"
.IP " 1." 4
Samba
.RS 4
\%http://www.samba.org/
.RE
.IP " 2." 4
Samba Team
.RS 4
\%http://www.samba.org/samba/team/
.RE
|