System Administration Commands mount_smbfs(1M) NAME mount_smbfs - mount a shared resource from an SMB file server SYNOPSIS /sbin/mount [-F smbfs] [generic-options] [-o name=value] [-O] resource /sbin/mount [-F smbfs] [generic-options] [-o name=value] [-O] mount-point /sbin/mount [-F smbfs] [generic-options] [-o name=value] [-O] resource mount-point DESCRIPTION The mount utility attaches a named resource, resource, to the file system hierarchy at the path name location, mount- point, which must already exist. If mount-point has any contents prior to the mount opera- tion, those contents remain hidden until the resource is unmounted. A process requires the SYS_MOUNT privilege to perform a mount operation. If the resource is listed in the /etc/vfstab file, you can specify either resource or mount-point as the mount command will consult the /etc/vfstab file for more information. If the -F option is omitted, mount takes the file system type from the entry in the /etc/vfstab file. If the resource is not listed in the /etc/vfstab file, the command line must specify both resource and mount-point. Operands The mount command supports the following operands: resource //[workgroup;][user[:password]@]server/share The name of the resource to be mounted. In addition to its name, you can specify the following information about the resource: o password is the password associated with user. If password is not specified, the mount first attempts to use the password stored by the smbutil login command (if any). If that pass- word fails to authenticate, the mount_smbfs prompts you for a password. o server is the DNS or NetBIOS name of the remote computer. SunOS 5.11 Last change: May 15. 2007 1 System Administration Commands mount_smbfs(1M) o share is the resource name on the remote server. o user is the remote user name. If user is omit- ted, the logged in user ID is used. o workgroup is the name of the workgroup or the Windows domain in which the user name is defined. If the resource includes a workgroup, you must escape the semicolon that appears after the workgroup name to prevent it from being inter- preted by the command shell. For instance, sur- round the entire resource name with double quotes: mount -F smbfs "//SALES;george@RSERVER" /mnt. mount-point The path to the location where the file system is to be mounted. The mount command maintains a table of mounted file systems in the /etc/mnttab file. See the mnttab(4) man page. SMBFS File System Limitations The SMBFS file system currently has the following limita- tions: o No hard links. The link() system call returns ENOSYS if you attempt to create a hard link. o No symlinks. The symlink() system call returns ENOSYS if you attempt to create a symbolic link. o No real byte-range locks. The fcntl() system call lock operations are arbitrated locally (MI_LLOCK). o No ACLs set/get. GETACL with the acl() and facl() system calls returns a fabricated ACL like the PCFS file system does. SETACL returns ENOSYS. o No device nodes. The mknod() system call returns ENOSYS if you attempt to create a device node. OPTIONS See the mount(1M) man page for the list of supported generic-options. SunOS 5.11 Last change: May 15. 2007 2 System Administration Commands mount_smbfs(1M) -o name=value Set the file system-specific parameters. You can specify more than one name-value pair as a list of comma- separated pairs. No spaces are permitted in the list. The parameters are as follows: case=upper | case=lower Force mapping to upper case names or lower case names, respectively. By default, no case mapping is done, which is specified as case="". dirperms=octaltriplet Specify the permissions to be assigned to direc- tories. The value must be specified as an octal tri- plet, such as 755. The default value for the direc- tory mode adds the execute permission. Note that these permissions have no relation to the rights granted by the SMB server. fileperms=octaltriplet Specify the permissions to be assigned to files. The value must be specified as an octal triplet, such as 644. The default value for the file mode is taken from the mount point and adds the read permission. Note that these permissions have no relation to the rights granted by the SMB server. gid=groupid Assign the specified group ID to files. The default value is the group ID of the directory where the volume is mounted. uid=userid Assign the specified user ID files. The default value is the owner ID of the directory where the volume is mounted. -O Overlay mount. Allow the file system to be mounted over an existing mount point, making the underlying file sys- tem inaccessible. If a mount is attempted on a pre- SunOS 5.11 Last change: May 15. 2007 3 System Administration Commands mount_smbfs(1M) existing mount point without setting this flag, the mount fails, producing the error "device busy." EXAMPLES Example 1 Verifying That an SMB File System is Mounted The following example shows how to mount the /tmp share from the nano server on the local /mnt mount point. You must sup- ply the password for the root user to successfully perform the mount operation. # mount -F smbfs //root@nano.sfbay/tmp /mnt Password: You can verify that the share is mounted in the following ways: o View the file system entry in the /etc/mnttab file. # grep root /etc/mnttab //root@nano.sfbay/tmp /mnt smbfs dev=4900000 1177097833 o View the output of the mount command. # mount | grep root /mnt on //root@nano.sfbay/tmp read/write/setuid/devices/dev=4900000 on Fri Apr 20 13:37:13 2007 o View the output of the df /mnt command. # df /mnt /mnt (//root@nano.sfbay/tmp): 3635872 blocks -1 files Obtain information about the mounted share by viewing the output of the df -k /mnt command. # df -k /mnt Filesystem kbytes used avail capacity Mounted on //root@nano.sfbay/tmp 1882384 64448 1817936 4% /mnt SunOS 5.11 Last change: May 15. 2007 4 System Administration Commands mount_smbfs(1M) FILES /etc/mnttab Table of mounted file systems /etc/dfs/fstypes Default distributed file system type /etc/vfstab Table of automatically mounted resources ATTRIBUTES See the attributes(5) man page for descriptions of the fol- lowing attributes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWsmbfscu | |_____________________________|_____________________________| | Interface Stability | Committed | |_____________________________|_____________________________| SEE ALSO smbutil(1), mount(1M), mountall(1M), acl(2), facl(2), fcntl(2), link(2), mknod(2), mount(2), symlink(2), umount(2), mnttab(4), nsmbrc(4), vfstab(4), attributes(5), pcfs(7FS) NOTES 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. SunOS 5.11 Last change: May 15. 2007 5