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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
|
'\" te
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
.\" Portions Copyright 1994-2008 The FreeBSD Project. All rights reserved.
.\" 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 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 AUTHOR AND CONTRIBUTORS "AS IS" AND 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 AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 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 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
.TH MOUNT_SMBFS 8 "November 22, 2021"
.SH NAME
mount_smbfs, umount_smbfs \- mount and unmount a shared resource from a CIFS
file server
.SH SYNOPSIS
.nf
\fB/sbin/mount\fR [\fB-F smbfs\fR] [\fIgeneric-options\fR] [\fB-o\fR \fIname\fR\fB=\fR\fIvalue\fR] [\fB-O\fR] \fIresource\fR
.fi
.LP
.nf
\fB/sbin/mount\fR [\fB-F smbfs\fR] [\fIgeneric-options\fR] [\fB-o\fR \fIname\fR\fB=\fR\fIvalue\fR] [\fB-O\fR] \fImount-point\fR
.fi
.LP
.nf
\fB/sbin/mount\fR [\fB-F smbfs\fR] [\fIgeneric-options\fR] [\fB-o\fR \fIname\fR\fB=\fR\fIvalue\fR]
[\fB-O\fR] \fIresource\fR \fImount-point\fR
.fi
.LP
.nf
\fB/sbin/umount\fR [\fB-F smbfs\fR] [\fIgeneric-options\fR] \fImount-point\fR
.fi
.SH DESCRIPTION
The \fBmount\fR utility attaches a named resource, \fIresource\fR, to the file
system hierarchy at the path name location, \fImount-point\fR, which must
already exist.
.sp
.LP
If \fImount-point\fR has any contents prior to the \fBmount\fR operation, those
contents remain hidden until the resource is unmounted. An authorized user with
the \fBSYS_MOUNT\fR privilege can perform a \fBmount\fR operation. Also, a user
can perform SMBFS mount operations on a directory the user owns.
.sp
.LP
If the resource is listed in the \fB/etc/vfstab\fR file, you can specify either
\fIresource\fR or \fImount-point\fR as the \fBmount\fR command will consult the
\fB/etc/vfstab\fR file for more information. If the \fB-F\fR option is omitted,
\fBmount\fR takes the file system type from the entry in the \fB/etc/vfstab\fR
file.
.sp
.LP
If the resource is not listed in the \fB/etc/vfstab\fR file, the command line
must specify both \fIresource\fR and \fImount-point\fR.
.sp
.LP
The \fBumount\fR utility detaches a mounted file system from the file system
hierarchy. An authorized user with the \fBSYS_MOUNT\fR privilege can perform a
\fBumount\fR operation. Also, a user can perform SMBFS unmount operations on a
directory the user owns.
.sp
.LP
The \fBnetwork/smb/client\fR service must be enabled to successfully mount a
CIFS share. This service is enabled, by default.
.sp
.LP
To enable the service, enter the following \fBsvcadm\fR(8) command:
.sp
.in +2
.nf
# \fBsvcadm enable network/smb/client\fR
.fi
.in -2
.sp
.SS "Operands"
The \fBmount\fR command supports the following operands:
.sp
.ne 2
.na
\fB\fIresource\fR
//[\fIworkgroup\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR/\fIshare\fR\fR
.ad
.sp .6
.RS 4n
.sp
.LP
The name of the resource to be mounted. In addition to its name, you can
specify the following information about the resource:
.RS +4
.TP
.ie t \(bu
.el o
\fIpassword\fR is the password associated with \fIuser\fR. If \fIpassword\fR is
not specified, the mount first attempts to use the password stored by the
\fBsmbutil login\fR command (if any). If that password fails to authenticate,
the \fBmount_smbfs\fR prompts you for a password.
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fIserver\fR is the DNS or NetBIOS name of the remote computer.
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fIshare\fR is the resource name on the remote server.
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fIuser\fR is the remote user name. If \fIuser\fR is omitted, the logged in
user ID is used.
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fIworkgroup\fR is the name of the workgroup or the Windows domain in which the
user name is defined.
.sp
If the resource includes a workgroup, you must escape the semicolon that
appears after the workgroup name to prevent it from being interpreted by the
command shell. For instance, surround the entire resource name with double
quotes: \fBmount -F smbfs "//SALES;george@RSERVER" /mnt\fR.
.RE
.RE
.sp
.ne 2
.na
\fB\fImount-point\fR\fR
.ad
.sp .6
.RS 4n
The path to the location where the file system is to be mounted or unmounted.
The \fBmount\fR command maintains a table of mounted file systems in the
\fB/etc/mnttab\fR file. See the \fBmnttab\fR(5) man page.
.RE
.SH OPTIONS
See the \fBmount\fR(8) man page for the list of supported
\fIgeneric-options\fR.
.sp
.ne 2
.na
\fB\fB-o\fR \fIname\fR\fB=\fR\fIvalue\fR or\fR
.ad
.br
.na
\fB\fB-o\fR \fIname\fR\fR
.ad
.sp .6
.RS 4n
Sets the file system-specific properties. You can specify more than one
name-value pair as a list of comma-separated pairs. No spaces are permitted in
the list. The properties are as follows:
.sp
.ne 2
.na
\fB\fBacl\fR|\fBnoacl\fR\fR
.ad
.sp .6
.RS 4n
Enable (or disable) presentation of Access Control Lists (ACLs)
on files and directories under this \fBsmbfs\fR(4FS) mount.
The default behavior is \fBnoacl\fR, which presents files and
directories as owned by the owner of the mount point and having
permissions based on \fBfileperms\fR or \fBdirperms\fR.
With the \fBacl\fR mount option, files are presented with ACLs
obtained from the SMB server.
Setting the \fBacl\fR mount option is not advised unless the system
is joined to an Active Directory domain and using \fBldap\fR(1)
so it can correctly present ACL identities from the SMB server.
.RE
.sp
.ne 2
.na
\fB\fBdirperms=\fR\fIoctaltriplet\fR\fR
.ad
.sp .6
.RS 4n
Specifies the permissions to be assigned to directories. The value must be
specified as an octal triplet, such as \fB755\fR. The default value for the
directory mode is taken from the \fBfileperms\fR setting, with execute
permission added where \fBfileperms\fR has read permission.
.sp
Note that these permissions have no relation to the rights granted by the CIFS
server.
.RE
.sp
.ne 2
.na
\fB\fBfileperms=\fR\fIoctaltriplet\fR\fR
.ad
.sp .6
.RS 4n
Specifies the permissions to be assigned to files. The value must be specified
as an octal triplet, such as \fB644\fR. The default value is \fB700\fR.
.sp
Note that these permissions have no relation to the rights granted by the CIFS
server.
.RE
.sp
.ne 2
.na
\fB\fBgid=\fR\fIgroupid\fR\fR
.ad
.sp .6
.RS 4n
Assigns the specified group ID to files. The default value is the group ID of
the directory where the volume is mounted.
.RE
.sp
.ne 2
.na
\fB\fBintr\fR|\fBnointr\fR\fR
.ad
.sp .6
.RS 4n
Enable (or disable) cancellation of \fBsmbfs\fR(4FS) I/O operations when the
user interrupts the calling thread (for example, by hitting Ctrl-C while an
operation is underway). The default is \fBintr\fR (interruption enabled), so
cancellation is normally allowed.
.RE
.sp
.ne 2
.na
\fB\fBnoprompt\fR\fR
.ad
.sp .6
.RS 4n
Suppresses the prompting for a password when mounting a share. This property
enables you to permit anonymous access to a share. Anonymous access does not
require a password.
.sp
The \fBmount\fR operation fails if a password is required, the \fBnoprompt\fR
property is set, and no password is stored by the \fBsmbutil login\fR command.
.RE
.sp
.ne 2
.na
\fB\fBretry_count=\fR\fInumber\fR\fR
.ad
.sp .6
.RS 4n
Specifies the number of SMBFS retries to attempt before the connection is
marked as broken. By default, 4 attempts are made.
.sp
The \fBretry_count\fR property value set by the \fBmount\fR command overrides
the global value set in SMF or the value set in your \fB\&.nsmbrc\fR file.
.RE
.sp
.ne 2
.na
\fB\fBtimeout=\fR\fIseconds\fR\fR
.ad
.sp .6
.RS 4n
Specifies the CIFS request timeout. By default, the timeout is 15 seconds.
.sp
The \fBtimeout\fR property value set by the \fBmount\fR command overrides the
global value set in SMF or the value set in your \fB\&.nsmbrc\fR file.
.RE
.sp
.ne 2
.na
\fB\fBuid=\fR\fIuserid\fR\fR
.ad
.sp .6
.RS 4n
Assigns the specified user ID files. The default value is the owner ID of the
directory where the volume is mounted.
.RE
.sp
.ne 2
.na
\fB\fBxattr\fR|\fBnoxattr\fR\fR
.ad
.sp .6
.RS 4n
Enable (or disable) Solaris Extended Attributes in this mount point. This
option defaults to \fBxattr\fR (enabled Extended Attributes), but note: if the
CIFS server does not support CIFS "named streams", \fBsmbfs\fR(4FS) forces this
option to \fBnoxattr\fR. When a mount has the \fBnoxattr\fR option, attempts to
use Solaris Extended attributes fail with EINVAL.
.RE
.RE
.sp
.ne 2
.na
\fB\fB-O\fR\fR
.ad
.sp .6
.RS 4n
Overlays mount. Allow the file system to be mounted over an existing mount
point, making the underlying file system inaccessible. If a mount is attempted
on a pre-existing mount point without setting this flag, the mount fails,
producing the error "device busy."
.RE
.SH EXAMPLES
\fBExample 1 \fRMounting an SMBFS Share
.sp
.LP
The following example shows how to mount the \fB/tmp\fR share from the
\fBnano\fR server in the \fBSALES\fR workgroup on the local \fB/mnt\fR mount
point. You must supply the password for the \fBroot\fR user to successfully
perform the mount operation.
.sp
.in +2
.nf
# \fBmount -F smbfs "//SALES;root@nano.example.org/tmp" /mnt\fR
Password:
.fi
.in -2
.sp
.LP
\fBExample 2 \fRVerifying That an SMBFS File System Is Mounted
.sp
.LP
The following example shows how to mount the \fB/tmp\fR share from the
\fBnano\fR server on the local \fB/mnt\fR mount point. You must supply the
password for the \fBroot\fR user to successfully perform the mount operation.
.sp
.in +2
.nf
# \fBmount -F smbfs //root@nano.example.org/tmp /mnt\fR
Password:
.fi
.in -2
.sp
.sp
.LP
You can verify that the share is mounted in the following ways:
.RS +4
.TP
.ie t \(bu
.el o
View the file system entry in the \fB/etc/mnttab\fR file.
.sp
.in +2
.nf
# \fBgrep root /etc/mnttab\fR
//root@nano.example.org/tmp /mnt smbfs dev=4900000 1177097833
.fi
.in -2
.sp
.RE
.RS +4
.TP
.ie t \(bu
.el o
View the output of the \fBmount\fR command.
.sp
.in +2
.nf
# \fBmount | grep root\fR
/mnt on //root@nano.example.org/tmp read/write/setuid/devices/dev=4900000 on
Fri Apr 20 13:37:13 2007
.fi
.in -2
.sp
.RE
.RS +4
.TP
.ie t \(bu
.el o
View the output of the \fBdf /mnt\fR command.
.sp
.in +2
.nf
# \fBdf /mnt\fR
/mnt (//root@nano.example.org/tmp): 3635872 blocks -1 files
.fi
.in -2
.sp
.RE
.sp
.LP
Obtain information about the mounted share by viewing the output of the \fBdf
-k /mnt\fR command.
.sp
.in +2
.nf
# \fBdf -k /mnt\fR
Filesystem kbytes used avail capacity Mounted on
//root@nano.example.org/tmp
1882384 64448 1817936 4% /mnt
.fi
.in -2
.sp
.LP
\fBExample 3 \fRUnmounting a CIFS Share
.sp
.LP
This example assumes that a CIFS share has been mounted on the \fB/mnt\fR mount
point. The following command line unmounts the share from the mount point.
.sp
.in +2
.nf
# \fBumount /mnt\fR
.fi
.in -2
.sp
.SH FILES
.ne 2
.na
\fB\fB/etc/mnttab\fR\fR
.ad
.sp .6
.RS 4n
Table of mounted file systems.
.RE
.sp
.ne 2
.na
\fB\fB/etc/dfs/fstypes\fR\fR
.ad
.sp .6
.RS 4n
Default distributed file system type.
.RE
.sp
.ne 2
.na
\fB\fB/etc/vfstab\fR\fR
.ad
.sp .6
.RS 4n
Table of automatically mounted resources.
.RE
.sp
.ne 2
.na
\fB\fB$HOME/.nsmbrc\fR\fR
.ad
.sp .6
.RS 4n
User-settable mount point configuration file to store the description for each
connection.
.RE
.SH ATTRIBUTES
See the \fBattributes\fR(7) man page for descriptions of the following
attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Committed
.TE
.SH SEE ALSO
.BR ldap (1),
.BR smbutil (1),
.BR acl (2),
.BR fcntl (2),
.BR link (2),
.BR mknod (2),
.BR mount (2),
.BR symlink (2),
.BR umount (2),
.BR pcfs (4FS),
.BR smbfs (4FS),
.BR mnttab (5),
.BR nsmbrc (5),
.BR vfstab (5),
.BR attributes (7),
.BR mount (8),
.BR mountall (8),
.BR svcadm (8)
.SH AUTHORS
This manual page contains material originally authored by Boris Popov,
\fBbpATbutya.kz\fR, \fBbpATFreeBSD.org\fR.
.SH NOTES
The Solaris CIFS client always attempts to use \fBgethostbyname()\fR to resolve
host names. If the host name cannot be resolved, the CIFS client uses NetBIOS
name resolution (NBNS). By default, the Solaris CIFS client permits the use of
NBNS to enable Solaris CIFS clients in Windows environments to work without
additional configuration.
.sp
.LP
Since NBNS has been exploited in the past, you might want to disable it. To
disable NBNS, set the \fBnbns-enabled\fR service management facility property
to \fBfalse\fR. By default, \fBnbns-enabled\fR is set to \fBtrue\fR.
.sp
.LP
If the directory on which a file system is to be mounted is a symbolic link,
the file system is mounted on the directory to which the symbolic link refers,
rather than being mounted on top of the symbolic link itself.
|