Print this page
Convert mount_smbfs.1m to mdoc

*** 1,530 **** ! '\" 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 1M "Jan 2, 2012" ! .SH NAME ! mount_smbfs, umount_smbfs \- mount and unmount a shared resource from a CIFS ! file server ! .SH SYNOPSIS ! .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 ! .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 .sp .LP 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(1M) command: ! .sp ! .in +2 ! .nf ! # \fBsvcadm enable network/smb/client\fR ! .fi ! .in -2 ! .sp ! ! .SS "Operands" ! .sp ! .LP ! 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(4) man page. ! .RE ! ! .SH OPTIONS ! .sp ! .LP ! See the \fBmount\fR(1M) 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(7FS) 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(7FS) 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(7FS) 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 ! .LP ! \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.sfbay/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.sfbay/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.sfbay/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.sfbay/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.sfbay/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.sfbay/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 ! .sp ! .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 ! .sp ! .LP ! See the \fBattributes\fR(5) 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 ! .sp ! .LP ! \fBldap\fR(1), \fBsmbutil\fR(1), ! \fBmount\fR(1M), \fBmountall\fR(1M), \fBsvcadm\fR(1M), ! \fBacl\fR(2), \fBfcntl\fR(2), \fBlink\fR(2), \fBmknod\fR(2), \fBmount\fR(2), ! \fBsymlink\fR(2), \fBumount\fR(2), \fBmnttab\fR(4), \fBnsmbrc\fR(4), ! \fBvfstab\fR(4), \fBattributes\fR(5), \fBpcfs\fR(7FS), \fBsmbfs\fR(7FS) ! .SH AUTHORS ! .sp ! .LP ! This manual page contains material originally authored by Boris Popov, ! \fBbpATbutya.kz\fR, \fBbpATFreeBSD.org\fR. ! .SH NOTES ! .sp ! .LP ! 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. --- 1,442 ---- ! .\" .\" 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. ! .Dd March 4, 2018 ! .Dt MOUNT_SMBFS 1M ! .Os ! .Sh NAME ! .Nm mount_smbfs , ! .Nm umount_smbfs ! .Nd mount and unmount a shared resource from an SMB file server ! .Sh SYNOPSIS ! .Nm mount ! .Op Fl F Cm smbfs ! .Op Ar generic-options ! .Op Fl o Ar name Ns Oo = Ns Ar value Oc ! .Op Fl O ! .Ar resource ! .Nm mount ! .Op Fl F Cm smbfs ! .Op Ar generic-options ! .Op Fl o Ar name Ns Oo = Ns Ar value Oc ! .Op Fl O ! .Ar mount-point ! .Nm mount ! .Op Fl F Cm smbfs ! .Op Ar generic-options ! .Op Fl o Ar name Ns Oo = Ns Ar value Oc ! .Op Fl O ! .Ar resource mount-point ! .Nm umount ! .Op Fl F Cm smbfs ! .Op Ar generic-options ! .Ar mount-point ! .Sh DESCRIPTION .sp .LP 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 ! The ! .Nm mount ! utility attaches a named resource, ! .Ar resource , ! to the file system hierarchy at the path name location, ! .Ar mount-point , ! which must already exist. ! .Pp ! If ! .Ar mount-point ! has any contents prior to the ! .Nm mount ! operation, those contents remain hidden until the resource is unmounted. ! An authorized user with the ! .Dv SYS_MOUNT ! privilege can perform a ! .Nm mount ! operation. ! Also, a user can perform SMBFS mount operations on a directory the user owns. ! .Pp ! If the resource is listed in the ! .Pa /etc/vfstab ! file, you can specify either ! .Ar resource ! or ! .Ar mount-point ! as the ! .Nm mount ! command will consult the ! .Pa /etc/vfstab ! file for more information. ! If the ! .Fl F ! option is omitted, ! .Nm mount ! takes the file system type from the entry in the ! .Pa /etc/vfstab file. ! .Pp ! If the resource is not listed in the ! .Pa /etc/vfstab ! file, the command line must specify both ! .Ar resource ! and ! .Ar mount-point . ! .Pp ! The ! .Nm umount ! utility detaches a mounted file system from the file system hierarchy. ! An authorized user with the ! .Dv SYS_MOUNT ! privilege can perform a ! .Nm umount ! operation. ! Also, a user can perform SMBFS unmount operations on a directory the user owns. ! .Pp ! The ! .Em network/smb/client ! service must be enabled to successfully mount an SMB share. ! This service is enabled, by default. ! .Pp ! To enable the service, enter the following ! .Xr svcadm 1M ! command: ! .Bd -literal ! # svcadm enable network/smb/client ! .Ed ! .Ss Operands ! The ! .Nm mount ! command supports the following operands: ! .Bl -tag -width Ds ! .It Xo ! .Ar resource ! .No // Ns Oo Ar workgroup Ns \&; Ns Oc Ns ! .Oo Ar user Ns Oo : Ns Ar password Ns Oc Ns @ Ns Oc Ns ! .Ar server Ns / Ns Ar share ! .Xc ! The name of the resource to be mounted. ! In addition to its name, you can specify the following information about the ! resource: ! .Bl -bullet ! .It ! .Ar password ! is the password associated with ! .Ar user . ! If ! .Ar password ! is not specified, the mount first attempts to use the password stored by the ! .Nm smbutil Cm login ! command (if any). ! If that password fails to authenticate, the ! .Nm mount_smbfs ! prompts you for a password. ! .It ! .Ar server ! is the DNS or NetBIOS name of the remote computer. ! .It ! .Ar share ! is the resource name on the remote server. ! .It ! .Ar user ! is the remote user name. ! If ! .Ar user ! is omitted, the logged in user ID is used. ! .It ! .Ar workgroup ! is the name of the workgroup or the Windows domain in which the user name is ! defined. ! .Pp 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: ! .Bd -literal ! mount -F smbfs "//SALES;george@RSERVER" /mnt ! .Ed ! .El ! .It Ar mount-point The path to the location where the file system is to be mounted or unmounted. ! The ! .Nm mount ! command maintains a table of mounted file systems in the ! .Pa /etc/mnttab ! file. ! See the ! .Xr mnttab 4 ! man page. ! .El ! .Sh OPTIONS ! See the ! .Xr mount 1M ! man page for the list of supported ! .Ar generic-options . ! .Bl -tag -width Ds ! .It Fl o Ar name Ns Oo = Ns Ar value Oc ! 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: ! .Bl -tag -width Ds ! .It Cm acl Ns | Ns Cm noacl Enable (or disable) presentation of Access Control Lists (ACLs) ! on files and directories under this ! .Xr smbfs 7FS ! mount. ! The default behavior is ! .Cm noacl , ! which presents files and directories as owned by the owner of the mount point ! and having permissions based on ! .Cm fileperms ! or ! .Cm dirperms . ! With the ! .Cm acl ! mount option, files are presented with ACLs obtained from the SMB server. ! Setting the ! .Cm acl ! mount option is not advised unless the system is joined to an Active Directory ! domain and using ! .Xr ldap 1 so it can correctly present ACL identities from the SMB server. ! .It Cm dirperms Ns = Ns Ar octaltriplet ! Specifies the permissions to be assigned to directories. ! The value must be specified as an octal triplet, such as ! .Ql 755 . ! The default value for the directory mode is taken from the ! .Cm fileperms ! setting, with execute permission added where ! .Cm fileperms ! has read permission. ! .Pp ! Note that these permissions have no relation to the rights granted by the SMB server. ! .It Cm fileperms Ns = Ns Ar octaltriplet ! Specifies the permissions to be assigned to files. ! The value must be specified as an octal triplet, such as ! .Ql 644 . ! The default value is ! .Ql 700 . ! .Pp ! Note that these permissions have no relation to the rights granted by the SMB server. ! .It Cm gid Ns = Ns Ar groupid ! Assigns the specified group ID to files. ! The default value is the group ID of the directory where the volume is mounted. ! .It Cm intr Ns | Ns Cm nointr ! Enable (or disable) cancellation of ! .Xr smbfs 7FS ! I/O operations when the user interrupts the calling thread (for example, by ! hitting Ctrl-C while an operation is underway). ! The default is ! .Cm intr ! (interruption enabled), so cancellation is normally allowed. ! .It Cm noprompt ! 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. ! .Pp ! The ! .Nm mount ! operation fails if a password is required, the ! .Cm noprompt ! property is set, and no password is stored by the ! .Nm smbutil Cm login ! command. ! .It Cm retry_count Ns = Ns Ar number Specifies the number of SMBFS retries to attempt before the connection is ! marked as broken. ! By default, 4 attempts are made. ! .Pp ! The ! .Cm retry_count ! property value set by the ! .Nm mount ! command overrides the global value set in SMF or the value set in your ! .Pa \&.nsmbrc ! file. ! .It Cm timeout Ns = Ns Ar seconds ! Specifies the SMB request timeout. ! By default, the timeout is 15 seconds. ! .Pp ! The ! .Cm timeout ! property value set by the ! .Nm mount ! command overrides the global value set in SMF or the value set in your ! .Pa \&.nsmbrc ! file. ! .It Cm uid Ns = Ns Ar userid ! Assigns the specified user ID files. ! The default value is the owner ID of the directory where the volume is mounted. ! .It Cm xattr Ns | Ns Cm noxattr ! Enable (or disable) Extended Attributes in this mount point. ! This option defaults to ! .Cm xattr ! (enabled Extended Attributes), but note: if the SMB server does not support SMB ! "named streams", ! .Xr smbfs 7FS ! forces this option to ! .Cm noxattr . ! When a mount has the ! .Cm noxattr ! option, attempts to use Extended attributes fail with ! .Er EINVAL . ! .El ! .It Fl O ! 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." ! .El ! .Sh FILES ! .Bl -tag -width Pa ! .It Pa /etc/mnttab ! Table of mounted file systems. ! .It Pa /etc/dfs/fstypes ! Default distributed file system type. ! .It Pa /etc/vfstab ! Table of automatically mounted resources. ! .It Pa $HOME/.nsmbrc ! User-settable mount point configuration file to store the description for each ! connection. ! .El ! .Sh EXAMPLES ! .Bl -tag -width Ds ! .It Sy Example 1 No Mounting an SMBFS Share ! The following example shows how to mount the ! .Pa /tmp ! share from the ! .Em nano ! server in the ! .Em SALES ! workgroup on the local ! .Pa /mnt ! mount point. ! You must supply the password for the root user to successfully perform the mount ! operation. ! .Bd -literal ! # mount -F smbfs "//SALES;root@nano.sfbay/tmp" /mnt Password: ! .Ed ! .It Sy Example 2 No Verifying That an SMBFS File System Is Mounted ! The following example shows how to mount the ! .Pa /tmp ! share from the ! .Em nano ! server on the local ! .Pa /mnt ! mount point. ! You must supply the password for the root user to successfully perform the mount ! operation. ! .Bd -literal ! # mount -F smbfs //root@nano.sfbay/tmp /mnt Password: ! .Ed ! .Pp You can verify that the share is mounted in the following ways: ! .Bl -bullet ! .It ! View the file system entry in the ! .Pa /etc/mnttab ! file. ! .Bd -literal ! # grep root /etc/mnttab //root@nano.sfbay/tmp /mnt smbfs dev=4900000 1177097833 ! .Ed ! .It ! View the output of the ! .Ql mount ! command. ! .Bd -literal ! # mount | grep root /mnt on //root@nano.sfbay/tmp read/write/setuid/devices/dev=4900000 on Fri Apr 20 13:37:13 2007 ! .Ed ! .It ! View the output of the ! .Ql df /mnt ! command. ! .Bd -literal ! # df /mnt /mnt (//root@nano.sfbay/tmp): 3635872 blocks -1 files ! .Ed ! .El ! .Pp ! Obtain information about the mounted share by viewing the output of the ! .Ql df -k /mnt ! command. ! .Bd -literal ! # df -k /mnt Filesystem kbytes used avail capacity Mounted on //root@nano.sfbay/tmp 1882384 64448 1817936 4% /mnt ! .Ed ! .It Sy Example 3 No Unmounting an SMB Share ! This example assumes that an SMB share has been mounted on the ! .Pa /mnt ! mount point. ! The following command line unmounts the share from the mount point. ! .Bd -literal ! # umount /mnt ! .Ed ! .El ! .Sh INTERFACE STABILITY ! .Sy Committed ! .Sh SEE ALSO ! .Xr ldap 1 , ! .Xr smbutil 1 , ! .Xr mount 1M , ! .Xr mountall 1M , ! .Xr svcadm 1M , ! .Xr acl 2 , ! .Xr fcntl 2 , ! .Xr link 2 , ! .Xr mknod 2 , ! .Xr mount 2 , ! .Xr symlink 2 , ! .Xr umount 2 , ! .Xr mnttab 4 , ! .Xr nsmbrc 4 , ! .Xr vfstab 4 , ! .Xr attributes 5 , ! .Xr pcfs 7FS , ! .Xr smbfs 7FS ! .Sh AUTHORS ! This manual page contains material originally authored by ! .An Boris Popov ! .Aq Mt bp@butya.kz , ! .Aq Mt bp@FreeBSD.org . ! .Sh NOTES ! The SMB client always attempts to use ! .Xr gethostbyname 3NSL ! to resolve host names. ! If the host name cannot be resolved, the SMB client uses NetBIOS name ! resolution (NBNS). ! By default, the SMB client permits the use of NBNS to enable SMB clients in ! Windows environments to work without additional configuration. ! .Pp ! Since NBNS has been exploited in the past, you might want to disable it. ! To disable NBNS, set the ! .Em nbns-enabled ! service management facility property to ! .Cm false . ! By default, ! .Em nbns-enabled ! is set to ! .Cm true . ! .Pp 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.