Print this page
Convert mount_smbfs.1m to mdoc
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/mount_smbfs.1m
+++ new/usr/src/man/man1m/mount_smbfs.1m
1 -'\" te
1 +.\"
2 2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" Portions Copyright 1994-2008 The FreeBSD Project. All rights reserved.
4 4 .\" 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
5 5 .\" 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
6 6 .\" 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,
7 7 .\" 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
8 8 .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9 9 .\" Copyright 2012 Nexenta Systems, Inc. All rights reserved.
10 -.TH MOUNT_SMBFS 1M "Jan 2, 2012"
11 -.SH NAME
12 -mount_smbfs, umount_smbfs \- mount and unmount a shared resource from a CIFS
13 -file server
14 -.SH SYNOPSIS
15 -.LP
16 -.nf
17 -\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
18 -.fi
19 -
20 -.LP
21 -.nf
22 -\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
23 -.fi
24 -
25 -.LP
26 -.nf
27 -\fB/sbin/mount\fR [\fB-F smbfs\fR] [\fIgeneric-options\fR] [\fB-o\fR \fIname\fR\fB=\fR\fIvalue\fR]
28 - [\fB-O\fR] \fIresource\fR \fImount-point\fR
29 -.fi
30 -
31 -.LP
32 -.nf
33 -\fB/sbin/umount\fR [\fB-F smbfs\fR] [\fIgeneric-options\fR] \fImount-point\fR
34 -.fi
35 -
36 -.SH DESCRIPTION
10 +.Dd March 4, 2018
11 +.Dt MOUNT_SMBFS 1M
12 +.Os
13 +.Sh NAME
14 +.Nm mount_smbfs ,
15 +.Nm umount_smbfs
16 +.Nd mount and unmount a shared resource from an SMB file server
17 +.Sh SYNOPSIS
18 +.Nm mount
19 +.Op Fl F Cm smbfs
20 +.Op Ar generic-options
21 +.Op Fl o Ar name Ns Oo = Ns Ar value Oc
22 +.Op Fl O
23 +.Ar resource
24 +.Nm mount
25 +.Op Fl F Cm smbfs
26 +.Op Ar generic-options
27 +.Op Fl o Ar name Ns Oo = Ns Ar value Oc
28 +.Op Fl O
29 +.Ar mount-point
30 +.Nm mount
31 +.Op Fl F Cm smbfs
32 +.Op Ar generic-options
33 +.Op Fl o Ar name Ns Oo = Ns Ar value Oc
34 +.Op Fl O
35 +.Ar resource mount-point
36 +.Nm umount
37 +.Op Fl F Cm smbfs
38 +.Op Ar generic-options
39 +.Ar mount-point
40 +.Sh DESCRIPTION
37 41 .sp
38 42 .LP
39 43 The \fBmount\fR utility attaches a named resource, \fIresource\fR, to the file
40 44 system hierarchy at the path name location, \fImount-point\fR, which must
41 45 already exist.
42 46 .sp
43 47 .LP
44 -If \fImount-point\fR has any contents prior to the \fBmount\fR operation, those
45 -contents remain hidden until the resource is unmounted. An authorized user with
46 -the \fBSYS_MOUNT\fR privilege can perform a \fBmount\fR operation. Also, a user
47 -can perform SMBFS mount operations on a directory the user owns.
48 -.sp
49 -.LP
50 -If the resource is listed in the \fB/etc/vfstab\fR file, you can specify either
51 -\fIresource\fR or \fImount-point\fR as the \fBmount\fR command will consult the
52 -\fB/etc/vfstab\fR file for more information. If the \fB-F\fR option is omitted,
53 -\fBmount\fR takes the file system type from the entry in the \fB/etc/vfstab\fR
48 +The
49 +.Nm mount
50 +utility attaches a named resource,
51 +.Ar resource ,
52 +to the file system hierarchy at the path name location,
53 +.Ar mount-point ,
54 +which must already exist.
55 +.Pp
56 +If
57 +.Ar mount-point
58 +has any contents prior to the
59 +.Nm mount
60 +operation, those contents remain hidden until the resource is unmounted.
61 +An authorized user with the
62 +.Dv SYS_MOUNT
63 +privilege can perform a
64 +.Nm mount
65 +operation.
66 +Also, a user can perform SMBFS mount operations on a directory the user owns.
67 +.Pp
68 +If the resource is listed in the
69 +.Pa /etc/vfstab
70 +file, you can specify either
71 +.Ar resource
72 +or
73 +.Ar mount-point
74 +as the
75 +.Nm mount
76 +command will consult the
77 +.Pa /etc/vfstab
78 +file for more information.
79 +If the
80 +.Fl F
81 +option is omitted,
82 +.Nm mount
83 +takes the file system type from the entry in the
84 +.Pa /etc/vfstab
54 85 file.
55 -.sp
56 -.LP
57 -If the resource is not listed in the \fB/etc/vfstab\fR file, the command line
58 -must specify both \fIresource\fR and \fImount-point\fR.
59 -.sp
60 -.LP
61 -The \fBumount\fR utility detaches a mounted file system from the file system
62 -hierarchy. An authorized user with the \fBSYS_MOUNT\fR privilege can perform a
63 -\fBumount\fR operation. Also, a user can perform SMBFS unmount operations on a
64 -directory the user owns.
65 -.sp
66 -.LP
67 -The \fBnetwork/smb/client\fR service must be enabled to successfully mount a
68 -CIFS share. This service is enabled, by default.
69 -.sp
70 -.LP
71 -To enable the service, enter the following \fBsvcadm\fR(1M) command:
72 -.sp
73 -.in +2
74 -.nf
75 -# \fBsvcadm enable network/smb/client\fR
76 -.fi
77 -.in -2
78 -.sp
79 -
80 -.SS "Operands"
81 -.sp
82 -.LP
83 -The \fBmount\fR command supports the following operands:
84 -.sp
85 -.ne 2
86 -.na
87 -\fB\fIresource\fR
88 -//[\fIworkgroup\fR;][\fIuser\fR[:\fIpassword\fR]@]\fIserver\fR/\fIshare\fR\fR
89 -.ad
90 -.sp .6
91 -.RS 4n
92 -.sp
93 -.LP
94 -The name of the resource to be mounted. In addition to its name, you can
95 -specify the following information about the resource:
96 -.RS +4
97 -.TP
98 -.ie t \(bu
99 -.el o
100 -\fIpassword\fR is the password associated with \fIuser\fR. If \fIpassword\fR is
101 -not specified, the mount first attempts to use the password stored by the
102 -\fBsmbutil login\fR command (if any). If that password fails to authenticate,
103 -the \fBmount_smbfs\fR prompts you for a password.
104 -.RE
105 -.RS +4
106 -.TP
107 -.ie t \(bu
108 -.el o
109 -\fIserver\fR is the DNS or NetBIOS name of the remote computer.
110 -.RE
111 -.RS +4
112 -.TP
113 -.ie t \(bu
114 -.el o
115 -\fIshare\fR is the resource name on the remote server.
116 -.RE
117 -.RS +4
118 -.TP
119 -.ie t \(bu
120 -.el o
121 -\fIuser\fR is the remote user name. If \fIuser\fR is omitted, the logged in
122 -user ID is used.
123 -.RE
124 -.RS +4
125 -.TP
126 -.ie t \(bu
127 -.el o
128 -\fIworkgroup\fR is the name of the workgroup or the Windows domain in which the
129 -user name is defined.
130 -.sp
86 +.Pp
87 +If the resource is not listed in the
88 +.Pa /etc/vfstab
89 +file, the command line must specify both
90 +.Ar resource
91 +and
92 +.Ar mount-point .
93 +.Pp
94 +The
95 +.Nm umount
96 +utility detaches a mounted file system from the file system hierarchy.
97 +An authorized user with the
98 +.Dv SYS_MOUNT
99 +privilege can perform a
100 +.Nm umount
101 +operation.
102 +Also, a user can perform SMBFS unmount operations on a directory the user owns.
103 +.Pp
104 +The
105 +.Em network/smb/client
106 +service must be enabled to successfully mount an SMB share.
107 +This service is enabled, by default.
108 +.Pp
109 +To enable the service, enter the following
110 +.Xr svcadm 1M
111 +command:
112 +.Bd -literal
113 +# svcadm enable network/smb/client
114 +.Ed
115 +.Ss Operands
116 +The
117 +.Nm mount
118 +command supports the following operands:
119 +.Bl -tag -width Ds
120 +.It Xo
121 +.Ar resource
122 +.No // Ns Oo Ar workgroup Ns \&; Ns Oc Ns
123 +.Oo Ar user Ns Oo : Ns Ar password Ns Oc Ns @ Ns Oc Ns
124 +.Ar server Ns / Ns Ar share
125 +.Xc
126 +The name of the resource to be mounted.
127 +In addition to its name, you can specify the following information about the
128 +resource:
129 +.Bl -bullet
130 +.It
131 +.Ar password
132 +is the password associated with
133 +.Ar user .
134 +If
135 +.Ar password
136 +is not specified, the mount first attempts to use the password stored by the
137 +.Nm smbutil Cm login
138 +command (if any).
139 +If that password fails to authenticate, the
140 +.Nm mount_smbfs
141 +prompts you for a password.
142 +.It
143 +.Ar server
144 +is the DNS or NetBIOS name of the remote computer.
145 +.It
146 +.Ar share
147 +is the resource name on the remote server.
148 +.It
149 +.Ar user
150 +is the remote user name.
151 +If
152 +.Ar user
153 +is omitted, the logged in user ID is used.
154 +.It
155 +.Ar workgroup
156 +is the name of the workgroup or the Windows domain in which the user name is
157 +defined.
158 +.Pp
131 159 If the resource includes a workgroup, you must escape the semicolon that
132 160 appears after the workgroup name to prevent it from being interpreted by the
133 -command shell. For instance, surround the entire resource name with double
134 -quotes: \fBmount -F smbfs "//SALES;george@RSERVER" /mnt\fR.
135 -.RE
136 -.RE
137 -
138 -.sp
139 -.ne 2
140 -.na
141 -\fB\fImount-point\fR\fR
142 -.ad
143 -.sp .6
144 -.RS 4n
161 +command shell.
162 +For instance, surround the entire resource name with double quotes:
163 +.Bd -literal
164 +mount -F smbfs "//SALES;george@RSERVER" /mnt
165 +.Ed
166 +.El
167 +.It Ar mount-point
145 168 The path to the location where the file system is to be mounted or unmounted.
146 -The \fBmount\fR command maintains a table of mounted file systems in the
147 -\fB/etc/mnttab\fR file. See the \fBmnttab\fR(4) man page.
148 -.RE
149 -
150 -.SH OPTIONS
151 -.sp
152 -.LP
153 -See the \fBmount\fR(1M) man page for the list of supported
154 -\fIgeneric-options\fR.
155 -.sp
156 -.ne 2
157 -.na
158 -\fB\fB-o\fR \fIname\fR\fB=\fR\fIvalue\fR or\fR
159 -.ad
160 -.br
161 -.na
162 -\fB\fB-o\fR \fIname\fR\fR
163 -.ad
164 -.sp .6
165 -.RS 4n
166 -Sets the file system-specific properties. You can specify more than one
167 -name-value pair as a list of comma-separated pairs. No spaces are permitted in
168 -the list. The properties are as follows:
169 -
170 -.sp
171 -.ne 2
172 -.na
173 -\fB\fBacl\fR|\fBnoacl\fR\fR
174 -.ad
175 -.sp .6
176 -.RS 4n
169 +The
170 +.Nm mount
171 +command maintains a table of mounted file systems in the
172 +.Pa /etc/mnttab
173 +file.
174 +See the
175 +.Xr mnttab 4
176 +man page.
177 +.El
178 +.Sh OPTIONS
179 +See the
180 +.Xr mount 1M
181 +man page for the list of supported
182 +.Ar generic-options .
183 +.Bl -tag -width Ds
184 +.It Fl o Ar name Ns Oo = Ns Ar value Oc
185 +Sets the file system-specific properties.
186 +You can specify more than one name-value pair as a list of comma-separated
187 +pairs.
188 +No spaces are permitted in the list.
189 +The properties are as follows:
190 +.Bl -tag -width Ds
191 +.It Cm acl Ns | Ns Cm noacl
177 192 Enable (or disable) presentation of Access Control Lists (ACLs)
178 -on files and directories under this \fBsmbfs\fR(7FS) mount.
179 -The default behavior is \fBnoacl\fR, which presents files and
180 -directories as owned by the owner of the mount point and having
181 -permissions based on \fBfileperms\fR or \fBdirperms\fR.
182 -With the \fBacl\fR mount option, files are presented with ACLs
183 -obtained from the SMB server.
184 -Setting the \fBacl\fR mount option is not advised unless the system
185 -is joined to an Active Directory domain and using \fBldap\fR(1)
193 +on files and directories under this
194 +.Xr smbfs 7FS
195 +mount.
196 +The default behavior is
197 +.Cm noacl ,
198 +which presents files and directories as owned by the owner of the mount point
199 +and having permissions based on
200 +.Cm fileperms
201 +or
202 +.Cm dirperms .
203 +With the
204 +.Cm acl
205 +mount option, files are presented with ACLs obtained from the SMB server.
206 +Setting the
207 +.Cm acl
208 +mount option is not advised unless the system is joined to an Active Directory
209 +domain and using
210 +.Xr ldap 1
186 211 so it can correctly present ACL identities from the SMB server.
187 -.RE
188 -
189 -.sp
190 -.ne 2
191 -.na
192 -\fB\fBdirperms=\fR\fIoctaltriplet\fR\fR
193 -.ad
194 -.sp .6
195 -.RS 4n
196 -Specifies the permissions to be assigned to directories. The value must be
197 -specified as an octal triplet, such as \fB755\fR. The default value for the
198 -directory mode is taken from the \fBfileperms\fR setting, with execute
199 -permission added where \fBfileperms\fR has read permission.
200 -.sp
201 -Note that these permissions have no relation to the rights granted by the CIFS
212 +.It Cm dirperms Ns = Ns Ar octaltriplet
213 +Specifies the permissions to be assigned to directories.
214 +The value must be specified as an octal triplet, such as
215 +.Ql 755 .
216 +The default value for the directory mode is taken from the
217 +.Cm fileperms
218 +setting, with execute permission added where
219 +.Cm fileperms
220 +has read permission.
221 +.Pp
222 +Note that these permissions have no relation to the rights granted by the SMB
202 223 server.
203 -.RE
204 -
205 -.sp
206 -.ne 2
207 -.na
208 -\fB\fBfileperms=\fR\fIoctaltriplet\fR\fR
209 -.ad
210 -.sp .6
211 -.RS 4n
212 -Specifies the permissions to be assigned to files. The value must be specified
213 -as an octal triplet, such as \fB644\fR. The default value is \fB700\fR.
214 -.sp
215 -Note that these permissions have no relation to the rights granted by the CIFS
224 +.It Cm fileperms Ns = Ns Ar octaltriplet
225 +Specifies the permissions to be assigned to files.
226 +The value must be specified as an octal triplet, such as
227 +.Ql 644 .
228 +The default value is
229 +.Ql 700 .
230 +.Pp
231 +Note that these permissions have no relation to the rights granted by the SMB
216 232 server.
217 -.RE
218 -
219 -.sp
220 -.ne 2
221 -.na
222 -\fB\fBgid=\fR\fIgroupid\fR\fR
223 -.ad
224 -.sp .6
225 -.RS 4n
226 -Assigns the specified group ID to files. The default value is the group ID of
227 -the directory where the volume is mounted.
228 -.RE
229 -
230 -.sp
231 -.ne 2
232 -.na
233 -\fB\fBintr\fR|\fBnointr\fR\fR
234 -.ad
235 -.sp .6
236 -.RS 4n
237 -Enable (or disable) cancellation of \fBsmbfs\fR(7FS) I/O operations when the
238 -user interrupts the calling thread (for example, by hitting Ctrl-C while an
239 -operation is underway). The default is \fBintr\fR (interruption enabled), so
240 -cancellation is normally allowed.
241 -.RE
242 -
243 -.sp
244 -.ne 2
245 -.na
246 -\fB\fBnoprompt\fR\fR
247 -.ad
248 -.sp .6
249 -.RS 4n
250 -Suppresses the prompting for a password when mounting a share. This property
251 -enables you to permit anonymous access to a share. Anonymous access does not
252 -require a password.
253 -.sp
254 -The \fBmount\fR operation fails if a password is required, the \fBnoprompt\fR
255 -property is set, and no password is stored by the \fBsmbutil login\fR command.
256 -.RE
257 -
258 -.sp
259 -.ne 2
260 -.na
261 -\fB\fBretry_count=\fR\fInumber\fR\fR
262 -.ad
263 -.sp .6
264 -.RS 4n
233 +.It Cm gid Ns = Ns Ar groupid
234 +Assigns the specified group ID to files.
235 +The default value is the group ID of the directory where the volume is mounted.
236 +.It Cm intr Ns | Ns Cm nointr
237 +Enable (or disable) cancellation of
238 +.Xr smbfs 7FS
239 +I/O operations when the user interrupts the calling thread (for example, by
240 +hitting Ctrl-C while an operation is underway).
241 +The default is
242 +.Cm intr
243 +(interruption enabled), so cancellation is normally allowed.
244 +.It Cm noprompt
245 +Suppresses the prompting for a password when mounting a share.
246 +This property enables you to permit anonymous access to a share.
247 +Anonymous access does not require a password.
248 +.Pp
249 +The
250 +.Nm mount
251 +operation fails if a password is required, the
252 +.Cm noprompt
253 +property is set, and no password is stored by the
254 +.Nm smbutil Cm login
255 +command.
256 +.It Cm retry_count Ns = Ns Ar number
265 257 Specifies the number of SMBFS retries to attempt before the connection is
266 -marked as broken. By default, 4 attempts are made.
267 -.sp
268 -The \fBretry_count\fR property value set by the \fBmount\fR command overrides
269 -the global value set in SMF or the value set in your \fB\&.nsmbrc\fR file.
270 -.RE
271 -
272 -.sp
273 -.ne 2
274 -.na
275 -\fB\fBtimeout=\fR\fIseconds\fR\fR
276 -.ad
277 -.sp .6
278 -.RS 4n
279 -Specifies the CIFS request timeout. By default, the timeout is 15 seconds.
280 -.sp
281 -The \fBtimeout\fR property value set by the \fBmount\fR command overrides the
282 -global value set in SMF or the value set in your \fB\&.nsmbrc\fR file.
283 -.RE
284 -
285 -.sp
286 -.ne 2
287 -.na
288 -\fB\fBuid=\fR\fIuserid\fR\fR
289 -.ad
290 -.sp .6
291 -.RS 4n
292 -Assigns the specified user ID files. The default value is the owner ID of the
293 -directory where the volume is mounted.
294 -.RE
295 -
296 -.sp
297 -.ne 2
298 -.na
299 -\fB\fBxattr\fR|\fBnoxattr\fR\fR
300 -.ad
301 -.sp .6
302 -.RS 4n
303 -Enable (or disable) Solaris Extended Attributes in this mount point. This
304 -option defaults to \fBxattr\fR (enabled Extended Attributes), but note: if the
305 -CIFS server does not support CIFS "named streams", \fBsmbfs\fR(7FS) forces this
306 -option to \fBnoxattr\fR. When a mount has the \fBnoxattr\fR option, attempts to
307 -use Solaris Extended attributes fail with EINVAL.
308 -.RE
309 -
310 -.RE
311 -
312 -.sp
313 -.ne 2
314 -.na
315 -\fB\fB-O\fR\fR
316 -.ad
317 -.sp .6
318 -.RS 4n
319 -Overlays mount. Allow the file system to be mounted over an existing mount
320 -point, making the underlying file system inaccessible. If a mount is attempted
321 -on a pre-existing mount point without setting this flag, the mount fails,
322 -producing the error "device busy."
323 -.RE
324 -
325 -.SH EXAMPLES
326 -.LP
327 -\fBExample 1 \fRMounting an SMBFS Share
328 -.sp
329 -.LP
330 -The following example shows how to mount the \fB/tmp\fR share from the
331 -\fBnano\fR server in the \fBSALES\fR workgroup on the local \fB/mnt\fR mount
332 -point. You must supply the password for the \fBroot\fR user to successfully
333 -perform the mount operation.
334 -
335 -.sp
336 -.in +2
337 -.nf
338 -# \fBmount -F smbfs "//SALES;root@nano.sfbay/tmp" /mnt\fR
258 +marked as broken.
259 +By default, 4 attempts are made.
260 +.Pp
261 +The
262 +.Cm retry_count
263 +property value set by the
264 +.Nm mount
265 +command overrides the global value set in SMF or the value set in your
266 +.Pa \&.nsmbrc
267 +file.
268 +.It Cm timeout Ns = Ns Ar seconds
269 +Specifies the SMB request timeout.
270 +By default, the timeout is 15 seconds.
271 +.Pp
272 +The
273 +.Cm timeout
274 +property value set by the
275 +.Nm mount
276 +command overrides the global value set in SMF or the value set in your
277 +.Pa \&.nsmbrc
278 +file.
279 +.It Cm uid Ns = Ns Ar userid
280 +Assigns the specified user ID files.
281 +The default value is the owner ID of the directory where the volume is mounted.
282 +.It Cm xattr Ns | Ns Cm noxattr
283 +Enable (or disable) Extended Attributes in this mount point.
284 +This option defaults to
285 +.Cm xattr
286 +(enabled Extended Attributes), but note: if the SMB server does not support SMB
287 +"named streams",
288 +.Xr smbfs 7FS
289 +forces this option to
290 +.Cm noxattr .
291 +When a mount has the
292 +.Cm noxattr
293 +option, attempts to use Extended attributes fail with
294 +.Er EINVAL .
295 +.El
296 +.It Fl O
297 +Overlays mount.
298 +Allow the file system to be mounted over an existing mount point, making the
299 +underlying file system inaccessible.
300 +If a mount is attempted on a pre-existing mount point without setting this flag,
301 +the mount fails, producing the error "device busy."
302 +.El
303 +.Sh FILES
304 +.Bl -tag -width Pa
305 +.It Pa /etc/mnttab
306 +Table of mounted file systems.
307 +.It Pa /etc/dfs/fstypes
308 +Default distributed file system type.
309 +.It Pa /etc/vfstab
310 +Table of automatically mounted resources.
311 +.It Pa $HOME/.nsmbrc
312 +User-settable mount point configuration file to store the description for each
313 +connection.
314 +.El
315 +.Sh EXAMPLES
316 +.Bl -tag -width Ds
317 +.It Sy Example 1 No Mounting an SMBFS Share
318 +The following example shows how to mount the
319 +.Pa /tmp
320 +share from the
321 +.Em nano
322 +server in the
323 +.Em SALES
324 +workgroup on the local
325 +.Pa /mnt
326 +mount point.
327 +You must supply the password for the root user to successfully perform the mount
328 +operation.
329 +.Bd -literal
330 +# mount -F smbfs "//SALES;root@nano.sfbay/tmp" /mnt
339 331 Password:
340 -.fi
341 -.in -2
342 -.sp
343 -
344 -.LP
345 -\fBExample 2 \fRVerifying That an SMBFS File System Is Mounted
346 -.sp
347 -.LP
348 -The following example shows how to mount the \fB/tmp\fR share from the
349 -\fBnano\fR server on the local \fB/mnt\fR mount point. You must supply the
350 -password for the \fBroot\fR user to successfully perform the mount operation.
351 -
352 -.sp
353 -.in +2
354 -.nf
355 -# \fBmount -F smbfs //root@nano.sfbay/tmp /mnt\fR
332 +.Ed
333 +.It Sy Example 2 No Verifying That an SMBFS File System Is Mounted
334 +The following example shows how to mount the
335 +.Pa /tmp
336 +share from the
337 +.Em nano
338 +server on the local
339 +.Pa /mnt
340 +mount point.
341 +You must supply the password for the root user to successfully perform the mount
342 +operation.
343 +.Bd -literal
344 +# mount -F smbfs //root@nano.sfbay/tmp /mnt
356 345 Password:
357 -.fi
358 -.in -2
359 -.sp
360 -
361 -.sp
362 -.LP
346 +.Ed
347 +.Pp
363 348 You can verify that the share is mounted in the following ways:
364 -.RS +4
365 -.TP
366 -.ie t \(bu
367 -.el o
368 -View the file system entry in the \fB/etc/mnttab\fR file.
369 -.sp
370 -.in +2
371 -.nf
372 -# \fBgrep root /etc/mnttab\fR
349 +.Bl -bullet
350 +.It
351 +View the file system entry in the
352 +.Pa /etc/mnttab
353 +file.
354 +.Bd -literal
355 +# grep root /etc/mnttab
373 356 //root@nano.sfbay/tmp /mnt smbfs dev=4900000 1177097833
374 -.fi
375 -.in -2
376 -.sp
377 -
378 -.RE
379 -.RS +4
380 -.TP
381 -.ie t \(bu
382 -.el o
383 -View the output of the \fBmount\fR command.
384 -.sp
385 -.in +2
386 -.nf
387 -# \fBmount | grep root\fR
357 +.Ed
358 +.It
359 +View the output of the
360 +.Ql mount
361 +command.
362 +.Bd -literal
363 +# mount | grep root
388 364 /mnt on //root@nano.sfbay/tmp read/write/setuid/devices/dev=4900000 on
389 365 Fri Apr 20 13:37:13 2007
390 -.fi
391 -.in -2
392 -.sp
393 -
394 -.RE
395 -.RS +4
396 -.TP
397 -.ie t \(bu
398 -.el o
399 -View the output of the \fBdf /mnt\fR command.
400 -.sp
401 -.in +2
402 -.nf
403 -# \fBdf /mnt\fR
366 +.Ed
367 +.It
368 +View the output of the
369 +.Ql df /mnt
370 +command.
371 +.Bd -literal
372 +# df /mnt
404 373 /mnt (//root@nano.sfbay/tmp): 3635872 blocks -1 files
405 -.fi
406 -.in -2
407 -.sp
408 -
409 -.RE
410 -.sp
411 -.LP
412 -Obtain information about the mounted share by viewing the output of the \fBdf
413 --k /mnt\fR command.
414 -
415 -.sp
416 -.in +2
417 -.nf
418 -# \fBdf -k /mnt\fR
374 +.Ed
375 +.El
376 +.Pp
377 +Obtain information about the mounted share by viewing the output of the
378 +.Ql df -k /mnt
379 +command.
380 +.Bd -literal
381 +# df -k /mnt
419 382 Filesystem kbytes used avail capacity Mounted on
420 383 //root@nano.sfbay/tmp
421 384 1882384 64448 1817936 4% /mnt
422 -.fi
423 -.in -2
424 -.sp
425 -
426 -.LP
427 -\fBExample 3 \fRUnmounting a CIFS Share
428 -.sp
429 -.LP
430 -This example assumes that a CIFS share has been mounted on the \fB/mnt\fR mount
431 -point. The following command line unmounts the share from the mount point.
432 -
433 -.sp
434 -.in +2
435 -.nf
436 -# \fBumount /mnt\fR
437 -.fi
438 -.in -2
439 -.sp
440 -
441 -.SH FILES
442 -.sp
443 -.ne 2
444 -.na
445 -\fB\fB/etc/mnttab\fR\fR
446 -.ad
447 -.sp .6
448 -.RS 4n
449 -Table of mounted file systems.
450 -.RE
451 -
452 -.sp
453 -.ne 2
454 -.na
455 -\fB\fB/etc/dfs/fstypes\fR\fR
456 -.ad
457 -.sp .6
458 -.RS 4n
459 -Default distributed file system type.
460 -.RE
461 -
462 -.sp
463 -.ne 2
464 -.na
465 -\fB\fB/etc/vfstab\fR\fR
466 -.ad
467 -.sp .6
468 -.RS 4n
469 -Table of automatically mounted resources.
470 -.RE
471 -
472 -.sp
473 -.ne 2
474 -.na
475 -\fB\fB$HOME/.nsmbrc\fR\fR
476 -.ad
477 -.sp .6
478 -.RS 4n
479 -User-settable mount point configuration file to store the description for each
480 -connection.
481 -.RE
482 -
483 -.SH ATTRIBUTES
484 -.sp
485 -.LP
486 -See the \fBattributes\fR(5) man page for descriptions of the following
487 -attributes:
488 -.sp
489 -
490 -.sp
491 -.TS
492 -box;
493 -c | c
494 -l | l .
495 -ATTRIBUTE TYPE ATTRIBUTE VALUE
496 -_
497 -Interface Stability Committed
498 -.TE
499 -
500 -.SH SEE ALSO
501 -.sp
502 -.LP
503 -\fBldap\fR(1), \fBsmbutil\fR(1),
504 -\fBmount\fR(1M), \fBmountall\fR(1M), \fBsvcadm\fR(1M),
505 -\fBacl\fR(2), \fBfcntl\fR(2), \fBlink\fR(2), \fBmknod\fR(2), \fBmount\fR(2),
506 -\fBsymlink\fR(2), \fBumount\fR(2), \fBmnttab\fR(4), \fBnsmbrc\fR(4),
507 -\fBvfstab\fR(4), \fBattributes\fR(5), \fBpcfs\fR(7FS), \fBsmbfs\fR(7FS)
508 -.SH AUTHORS
509 -.sp
510 -.LP
511 -This manual page contains material originally authored by Boris Popov,
512 -\fBbpATbutya.kz\fR, \fBbpATFreeBSD.org\fR.
513 -.SH NOTES
514 -.sp
515 -.LP
516 -The Solaris CIFS client always attempts to use \fBgethostbyname()\fR to resolve
517 -host names. If the host name cannot be resolved, the CIFS client uses NetBIOS
518 -name resolution (NBNS). By default, the Solaris CIFS client permits the use of
519 -NBNS to enable Solaris CIFS clients in Windows environments to work without
520 -additional configuration.
521 -.sp
522 -.LP
523 -Since NBNS has been exploited in the past, you might want to disable it. To
524 -disable NBNS, set the \fBnbns-enabled\fR service management facility property
525 -to \fBfalse\fR. By default, \fBnbns-enabled\fR is set to \fBtrue\fR.
526 -.sp
527 -.LP
385 +.Ed
386 +.It Sy Example 3 No Unmounting an SMB Share
387 +This example assumes that an SMB share has been mounted on the
388 +.Pa /mnt
389 +mount point.
390 +The following command line unmounts the share from the mount point.
391 +.Bd -literal
392 +# umount /mnt
393 +.Ed
394 +.El
395 +.Sh INTERFACE STABILITY
396 +.Sy Committed
397 +.Sh SEE ALSO
398 +.Xr ldap 1 ,
399 +.Xr smbutil 1 ,
400 +.Xr mount 1M ,
401 +.Xr mountall 1M ,
402 +.Xr svcadm 1M ,
403 +.Xr acl 2 ,
404 +.Xr fcntl 2 ,
405 +.Xr link 2 ,
406 +.Xr mknod 2 ,
407 +.Xr mount 2 ,
408 +.Xr symlink 2 ,
409 +.Xr umount 2 ,
410 +.Xr mnttab 4 ,
411 +.Xr nsmbrc 4 ,
412 +.Xr vfstab 4 ,
413 +.Xr attributes 5 ,
414 +.Xr pcfs 7FS ,
415 +.Xr smbfs 7FS
416 +.Sh AUTHORS
417 +This manual page contains material originally authored by
418 +.An Boris Popov
419 +.Aq Mt bp@butya.kz ,
420 +.Aq Mt bp@FreeBSD.org .
421 +.Sh NOTES
422 +The SMB client always attempts to use
423 +.Xr gethostbyname 3NSL
424 +to resolve host names.
425 +If the host name cannot be resolved, the SMB client uses NetBIOS name
426 +resolution (NBNS).
427 +By default, the SMB client permits the use of NBNS to enable SMB clients in
428 +Windows environments to work without additional configuration.
429 +.Pp
430 +Since NBNS has been exploited in the past, you might want to disable it.
431 +To disable NBNS, set the
432 +.Em nbns-enabled
433 +service management facility property to
434 +.Cm false .
435 +By default,
436 +.Em nbns-enabled
437 +is set to
438 +.Cm true .
439 +.Pp
528 440 If the directory on which a file system is to be mounted is a symbolic link,
529 441 the file system is mounted on the directory to which the symbolic link refers,
530 442 rather than being mounted on top of the symbolic link itself.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX