MOUNT_SMBFS(8) | Maintenance Commands and Procedures | MOUNT_SMBFS(8) |
mount_smbfs, umount_smbfs - mount and unmount a shared resource from a CIFS file server
/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
/sbin/umount [-F smbfs] [generic-options] mount-point
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 operation, those contents remain hidden until the resource is unmounted. An authorized user with the SYS_MOUNT privilege can perform a mount operation. Also, a user can perform SMBFS mount operations on a directory the user owns.
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.
The umount utility detaches a mounted file system from the file system hierarchy. An authorized user with the SYS_MOUNT privilege can perform a umount operation. Also, a user can perform SMBFS unmount operations on a directory the user owns.
The network/smb/client service must be enabled to successfully mount a CIFS share. This service is enabled, by default.
To enable the service, enter the following svcadm(8) command:
# svcadm enable network/smb/client
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:
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: mount -F smbfs "//SALES;george@RSERVER" /mnt.
mount-point
See the mount(8) man page for the list of supported generic-options.
-o name=value or
-o name
acl|noacl
dirperms=octaltriplet
Note that these permissions have no relation to the rights granted by the CIFS server.
fileperms=octaltriplet
Note that these permissions have no relation to the rights granted by the CIFS server.
gid=groupid
intr|nointr
noprompt
The mount operation fails if a password is required, the noprompt property is set, and no password is stored by the smbutil login command.
retry_count=number
The retry_count property value set by the mount command overrides the global value set in SMF or the value set in your .nsmbrc file.
timeout=seconds
The timeout property value set by the mount command overrides the global value set in SMF or the value set in your .nsmbrc file.
uid=userid
xattr|noxattr
-O
Example 1 Mounting an SMBFS Share
The following example shows how to mount the /tmp share from the nano server in the SALES workgroup on the local /mnt mount point. You must supply the password for the root user to successfully perform the mount operation.
# mount -F smbfs "//SALES;root@nano.example.org/tmp" /mnt Password:
Example 2 Verifying That an SMBFS 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 supply the password for the root user to successfully perform the mount operation.
# mount -F smbfs //root@nano.example.org/tmp /mnt Password:
You can verify that the share is mounted in the following ways:
# grep root /etc/mnttab //root@nano.example.org/tmp /mnt smbfs dev=4900000 1177097833
# mount | grep root /mnt on //root@nano.example.org/tmp read/write/setuid/devices/dev=4900000 on Fri Apr 20 13:37:13 2007
# df /mnt /mnt (//root@nano.example.org/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.example.org/tmp
1882384 64448 1817936 4% /mnt
Example 3 Unmounting a CIFS Share
This example assumes that a CIFS share has been mounted on the /mnt mount point. The following command line unmounts the share from the mount point.
# umount /mnt
/etc/mnttab
/etc/dfs/fstypes
/etc/vfstab
$HOME/.nsmbrc
See the attributes(7) man page for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
ldap(1), smbutil(1), acl(2), fcntl(2), link(2), mknod(2), mount(2), symlink(2), umount(2), pcfs(4FS), smbfs(4FS), mnttab(5), nsmbrc(5), vfstab(5), attributes(7), mount(8), mountall(8), svcadm(8)
This manual page contains material originally authored by Boris Popov, bpATbutya.kz, bpATFreeBSD.org.
The Solaris CIFS client always attempts to use gethostbyname() 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.
Since NBNS has been exploited in the past, you might want to disable it. To disable NBNS, set the nbns-enabled service management facility property to false. By default, nbns-enabled is set to true.
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.
November 22, 2021 | OmniOS |