Print this page
NEX-16805 Add smbutil discon command
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/man/man1/smbutil.1
+++ new/usr/src/man/man1/smbutil.1
1 1 '\" te
2 2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Right Reserved.
3 +.\" Copyright 2018 Nexenta Systems, Inc. All rights reserved.
3 4 .\" Portions Copyright 1994-2008 The FreeBSD Project. All rights reserved.
4 5 .\" Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
5 6 .\" disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND
6 7 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7 8 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
8 9 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9 -.TH SMBUTIL 1 "Jun 24, 2009"
10 +.TH SMBUTIL 1 "Apr 11, 2018"
10 11 .SH NAME
11 12 smbutil \- Solaris CIFS client utility
12 13 .SH SYNOPSIS
13 14 .LP
14 15 .nf
15 16 \fB/usr/bin/smbutil crypt\fR
16 17 .fi
17 18
18 19 .LP
19 20 .nf
21 +\fB/usr/bin/smbutil discon //[\fIdomain\fR;][\fIuser\fR@]\fIserver\fR\fR
22 +.fi
23 +
24 +.LP
25 +.nf
20 26 \fB/usr/bin/smbutil login [-c] [[\fIdomain\fR/]\fIuser\fR]\fR
21 27 .fi
22 28
23 29 .LP
24 30 .nf
25 31 \fB/usr/bin/smbutil login [-c] [\fIuser\fR[@\fIdomain\fR]]\fR
26 32 .fi
27 33
28 34 .LP
29 35 .nf
30 36 \fB/usr/bin/smbutil logout [[\fIdomain\fR/]\fIuser\fR]\fR
31 37 .fi
32 38
33 39 .LP
34 40 .nf
35 41 \fB/usr/bin/smbutil logout [\fIuser\fR[@\fIdomain\fR]]\fR
36 42 .fi
37 43
38 44 .LP
39 45 .nf
40 46 \fB/usr/bin/smbutil logout -a\fR
41 47 .fi
42 48
43 49 .LP
44 50 .nf
45 51 \fB/usr/bin/smbutil logoutall\fR
46 52 .fi
47 53
48 54 .LP
49 55 .nf
50 56 \fB/usr/bin/smbutil lookup \fIname\fR\fR
51 57 .fi
52 58
53 59 .LP
54 60 .nf
55 61 \fB/usr/bin/smbutil status \fIserver\fR\fR
56 62 .fi
57 63
58 64 .LP
59 65 .nf
60 66 \fB/usr/bin/smbutil view [-A | -U \fIuser\fR] //[\fIdomain\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR\fR
61 67 .fi
62 68
63 69 .LP
64 70 .nf
65 71 \fB/usr/bin/smbutil [\fB-?dv\fR]\fR
66 72 .fi
67 73
68 74 .SH DESCRIPTION
69 75 .sp
70 76 .LP
71 77 The \fBsmbutil\fR command controls the Solaris CIFS client and issues various
72 78 commands.
73 79 .SS "Subcommands"
74 80 .sp
75 81 .LP
76 82 The \fBsmbutil\fR command supports the following subcommands:
77 83 .sp
78 84 .ne 2
79 85 .na
80 86 \fB\fBcrypt\fR\fR
81 87 .ad
82 88 .sp .6
83 89 .RS 4n
84 90 Creates a hash of a password. This subcommand prompts for a password and writes
85 91 the hash to standard output. This hash value is suitable for use as a value for
86 92 the \fBpassword\fR property in the \fB$HOME/.nsmbrc\fR file.
|
↓ open down ↓ |
57 lines elided |
↑ open up ↑ |
87 93 .sp
88 94 The hashed password begins with two dollar signs (\fB$$\fR). If you assign this
89 95 hashed password to the \fBpassword\fR property in your \fB$HOME/.nsmbrc\fR, be
90 96 sure that you escape the special characters in the password.
91 97 .sp
92 98 If you plan to store hashed passwords in your \fB$HOME/.nsmbrc\fR file, ensure
93 99 that the file permissions are set so that only the owner can read or write the
94 100 file (\fB400\fR or \fB600\fR), or the passwords are ignored.
95 101 .RE
96 102
103 +.sp
104 +.ne 2
105 +.na
106 +\fB\fBdiscon -U \fIuser\fR]
107 +//[\fIdomain\fR;][\fIuser\fR\fIserver\fR\fR\fR
108 +.ad
109 +.sp .6
110 +.RS 4n
111 +Disconnects the specified SMB session to \fIserver\fR.
112 +Usage is similar to the \fB\fBview\fR\fR sub-command.
113 +This sub-command is primarily for use in tests.
114 +.RE
115 +
97 116 .sp
98 117 .ne 2
99 118 .na
100 119 \fB\fBlogin [-c] [ [[\fIdomain\fR/]\fIuser\fR] | [\fIuser\fR[@\fIdomain\fR]
101 120 ]\fR\fR
102 121 .ad
103 122 .sp .6
104 123 .RS 4n
105 124 Specifies persistent password information to be used for a CIFS server user
106 125 account. When you specify this information, mounts can be done without a
107 126 password prompt in non-Kerberos configurations. Kerberos sites should use
108 127 Kerberos automatically, not prompt for a password. If a default domain is
109 128 available in SMF or \fBnsmbrc\fR(4), the domain can be omitted. If a user name
110 129 is not specified, the Solaris user account name is used.
111 130 .sp
112 131 Use the \fB-c\fR to check whether a persistent password is set for the
113 132 specified user.
114 133 .sp
115 134 Passwords can also be stored for a specific server by using a server name in
116 135 place of the domain name. This capability is useful with servers that are
117 136 configured for "workgroup mode."
118 137 .RE
119 138
120 139 .sp
121 140 .ne 2
122 141 .na
123 142 \fB\fBlogout [ [[\fIdomain\fR/]\fIuser\fR] | [\fIuser\fR[@\fIdomain\fR] ]\fR\fR
124 143 .ad
125 144 .sp .6
126 145 .RS 4n
127 146 Erases the persistent passwords for the user running the command.
128 147 .sp
129 148 The user name and domain name portions of the name are optional. If these names
130 149 are not specified, the user name and domain name values are taken from the
131 150 properties set in your environment. See the \fBnsmbrc\fR(4) manual page.
132 151 .sp
133 152 If you stored your password for a specific server, specify the server name in
134 153 place of the domain name.
135 154 .RE
136 155
137 156 .sp
138 157 .ne 2
139 158 .na
140 159 \fB\fBlogout -a\fR\fR
141 160 .ad
142 161 .sp .6
143 162 .RS 4n
144 163 Erases all of the persistent passwords that are stored for the user who is
145 164 running the command.
146 165 .RE
147 166
148 167 .sp
149 168 .ne 2
150 169 .na
151 170 \fB\fBlogoutall\fR\fR
152 171 .ad
153 172 .sp .6
154 173 .RS 4n
155 174 Erases all the persistent passwords that are stored by all users running the
156 175 \fBsmbutil login\fR command.
157 176 .sp
158 177 This command must be run as superuser.
159 178 .RE
160 179
161 180 .sp
162 181 .ne 2
163 182 .na
164 183 \fB\fBlookup \fIname\fR\fR\fR
165 184 .ad
166 185 .sp .6
167 186 .RS 4n
168 187 Resolves the specified \fIname\fR to an IP address.
169 188 .sp
170 189 This subcommand is only supported if an NBNS/WINS name server is available.
171 190 .RE
172 191
173 192 .sp
174 193 .ne 2
175 194 .na
176 195 \fB\fBstatus \fIserver\fR\fR\fR
177 196 .ad
178 197 .sp .6
179 198 .RS 4n
180 199 Resolves the specified server to the NetBIOS domain and system name.
181 200 \fIserver\fR can be an IP address or a DNS name.
182 201 .RE
183 202
184 203 .sp
185 204 .ne 2
186 205 .na
187 206 \fB\fBview [-A | -U \fIuser\fR]
188 207 //[\fIdomain\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR\fR\fR
189 208 .ad
190 209 .sp .6
191 210 .RS 4n
192 211 Lists the resources available to \fIuser\fR on the specified \fIserver\fR.
193 212 .sp
194 213 You can specify the \fB-A\fR option to view the resources as an anonymous user
195 214 or the \fB-U\fR \fIuser\fR option to view the resources as the specified user.
196 215 These options are mutually exclusive.
197 216 .sp
198 217 If the resource includes a domain, you must escape the semicolon that appears
199 218 after the domain name to prevent it from being interpreted by the command
200 219 shell. For instance, surround the entire resource name with single quotes:
201 220 \fBsmbutil view '//SALES;george@RSERVER'\fR.
202 221 .RE
203 222
204 223 .SH OPTIONS
205 224 .sp
206 225 .LP
207 226 The following global options are supported:
208 227 .sp
209 228 .ne 2
210 229 .na
211 230 \fB\fB-d\fR\fR
212 231 .ad
213 232 .RS 13n
214 233 Produces debugging output.
215 234 .RE
216 235
217 236 .sp
218 237 .ne 2
219 238 .na
220 239 \fB\fB-v\fR\fR
221 240 .ad
222 241 .RS 13n
223 242 Produces verbose output.
224 243 .RE
225 244
226 245 .sp
227 246 .ne 2
228 247 .na
229 248 \fB\fB-?\fR\fR
230 249 .ad
231 250 .RS 13n
232 251 Prints a short help message.
233 252 .RE
234 253
235 254 .SH EXAMPLES
236 255 .LP
237 256 \fBExample 1 \fRCreating a Password Hash for the \fB$HOME/.nsmbrc\fR File
238 257 .sp
239 258 .LP
240 259 The following example shows how to use the \fBsmbutil crypt\fR command to
241 260 create a hash of the password you specify. Then, you can use the hash as the
242 261 value for the \fB$HOME/.nsmbrc\fR file.
243 262
244 263 .sp
245 264 .LP
246 265 Be sure to escape the two dollar-sign prefix of the hashed password if you
247 266 store it as a value of the \fBpassword\fR property.
248 267
249 268 .sp
250 269 .in +2
251 270 .nf
252 271 $ \fBsmbutil crypt\fR
253 272 Password:
254 273 $$178465324253e0c07
255 274 .fi
256 275 .in -2
257 276 .sp
258 277
259 278 .sp
260 279 .LP
261 280 The following \fB$HOME/.nsmbrc\fR file fragment shows how the password hash
262 281 value is set:
263 282
264 283 .sp
265 284 .in +2
266 285 .nf
267 286 [RSERVER:george]
268 287 charsets=koi8-r:cp866
269 288 password='$$178465324253e0c07'
270 289 .fi
271 290 .in -2
272 291 .sp
273 292
274 293 .LP
275 294 \fBExample 2 \fRStoring a Password for a CIFS Server
276 295 .sp
277 296 .LP
278 297 The following example shows how to use the \fBsmbutil login\fR command to store
279 298 the \fBroot@example\fR user's password.
280 299
281 300 .sp
282 301 .in +2
283 302 .nf
284 303 $ \fBsmbutil login root@example\fR
285 304 Password:
286 305 .fi
287 306 .in -2
288 307 .sp
289 308
290 309 .LP
291 310 \fBExample 3 \fRErasing the Stored Password
292 311 .sp
293 312 .LP
294 313 The following example shows how to use the \fBsmbutil logout\fR command to
295 314 remove the \fBroot@example\fR user's password.
296 315
297 316 .sp
298 317 .in +2
299 318 .nf
300 319 $ \fBsmbutil logout root@example\fR
301 320 .fi
302 321 .in -2
303 322 .sp
304 323
305 324 .LP
306 325 \fBExample 4 \fRViewing Available Shares
307 326 .sp
308 327 .LP
309 328 The following example shows how to use the \fBsmbutil view\fR command to see
310 329 the available shares for user \fBroot\fR on server \fBexample\fR.
311 330
312 331 .sp
313 332 .in +2
314 333 .nf
315 334 $ \fBsmbutil view //root@example\fR
316 335 Password:
317 336 Share Type Comment
318 337 -------------------------------
319 338 netlogon disk Network Logon Service
320 339 ipc$ IPC IPC Service (Samba Server)
321 340 tmp disk Temporary file space
322 341 public disk Public Stuff
323 342 root disk Home Directories
324 343
325 344 5 shares listed from 5 available
326 345 .fi
327 346 .in -2
328 347 .sp
329 348
330 349 .LP
331 350 \fBExample 5 \fRViewing Available Shares as an Anonymous User
332 351 .sp
333 352 .LP
334 353 The following example shows how to use the \fBsmbutil view\fR command to
335 354 anonymously view the available shares on the \fBexample\fR server.
336 355
337 356 .sp
338 357 .in +2
339 358 .nf
340 359 $ \fBsmbutil view -A //example\fR
341 360 Share Type Comment
342 361 -------------------------------
343 362 netlogon disk Network Logon Service
344 363 ipc$ IPC IPC Service (Samba Server)
345 364 tmp disk Temporary file space
346 365 public disk Public Stuff
347 366 ethereal disk /export/ethereal
348 367 myshare disk Jan's stuff
349 368
350 369 6 shares listed from 6 available
351 370 .fi
352 371 .in -2
353 372 .sp
354 373
355 374 .LP
356 375 \fBExample 6 \fRObtaining the IP Address From a Server Name
357 376 .sp
358 377 .LP
359 378 The following example shows how to use the \fBsmbutil lookup\fR command to
360 379 obtain the IP address of the \fBexample\fR server.
361 380
362 381 .sp
363 382 .in +2
364 383 .nf
365 384 $ \fBsmbutil lookup example\fR
366 385 Got response from 192.168.168.210
367 386 IP address of example: 192.168.168.210
368 387 .fi
369 388 .in -2
370 389 .sp
371 390
372 391 .LP
373 392 \fBExample 7 \fRObtaining the NetBIOS Domain and System Name Using the Server
374 393 Name
375 394 .sp
376 395 .LP
377 396 The following example shows how to use the \fBsmbutil status\fR command to
378 397 obtain the NetBIOS domain and system name of the \fBexample\fR server. The
379 398 server name, \fBexample\fR, is specified on the command line.
380 399
381 400 .sp
382 401 .in +2
383 402 .nf
384 403 $ \fBsmbutil status example\fR
385 404 Domain: WORKGROUP
386 405 Server: EXAMPLE
387 406 .fi
388 407 .in -2
389 408 .sp
390 409
391 410 .LP
392 411 \fBExample 8 \fRObtaining the NetBIOS Domain and System Name Using the IP
393 412 Address
394 413 .sp
395 414 .LP
396 415 The following example shows how to use the \fBsmbutil status\fR command to
397 416 obtain the NetBIOS domain and system name of the \fBexample\fR server. The IP
398 417 address, \fB192.168.168.210\fR, is specified on the command line.
399 418
400 419 .sp
401 420 .in +2
402 421 .nf
403 422 $ \fBsmbutil status 192.168.168.210\fR
404 423 Domain: WORKGROUP
405 424 Server: EXAMPLE
406 425 .fi
407 426 .in -2
408 427 .sp
409 428
410 429 .SH FILES
411 430 .sp
412 431 .ne 2
413 432 .na
414 433 \fB\fB$HOME/.nsmbrc\fR\fR
415 434 .ad
416 435 .sp .6
417 436 .RS 4n
418 437 User-settable mount point configuration file to store the description for each
419 438 connection.
420 439 .RE
421 440
422 441 .SH ATTRIBUTES
423 442 .sp
424 443 .LP
425 444 See \fBattributes\fR(5) for descriptions of the following attributes:
426 445 .sp
427 446
428 447 .sp
429 448 .TS
430 449 box;
431 450 c | c
432 451 l | l .
433 452 ATTRIBUTE TYPE ATTRIBUTE VALUE
434 453 _
435 454 Interface Stability See below.
436 455 .TE
437 456
438 457 .sp
439 458 .LP
440 459 The output is Uncommitted. The rest of the interface is Committed.
441 460 .SH SEE ALSO
442 461 .sp
443 462 .LP
444 463 \fBmount_smbfs\fR(1M), \fBnsmbrc\fR(4), \fBattributes\fR(5), \fBsmbfs\fR(7FS)
445 464 .SH AUTHORS
446 465 .sp
447 466 .LP
448 467 This manual page contains material originally authored by Boris Popov,
449 468 \fBbp@butya.kz\fR, \fBbp@FreeBSD.org\fR.
450 469 .SH NOTES
451 470 .sp
452 471 .LP
453 472 The Solaris CIFS client always attempts to use \fBgethostbyname()\fR to resolve
454 473 host names. If the host name cannot be resolved, the CIFS client uses NetBIOS
455 474 name resolution (NBNS). By default, the Solaris CIFS client permits the use of
456 475 NBNS to enable Solaris CIFS clients in Windows environments to work without
457 476 additional configuration.
458 477 .sp
459 478 .LP
460 479 Since NBNS has been exploited in the past, you might want to disable it. To
461 480 disable NBNS, set the \fBnbns-enabled\fR service management facility property
462 481 to \fBfalse\fR. By default, \fBnbns-enabled\fR is set to \fBtrue\fR.
|
↓ open down ↓ |
356 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX