JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

System Administration Commands - Part 2

mail.local(1M)

makedbm(1M)

makemap(1M)

makeuuid(1M)

masfcnv(1M)

mdlogd(1M)

mdmonitord(1M)

mdnsd(1M)

medstat(1M)

metaclear(1M)

metadb(1M)

metadetach(1M)

metadevadm(1M)

metahs(1M)

metaimport(1M)

metainit(1M)

metaoffline(1M)

metaonline(1M)

metaparam(1M)

metarecover(1M)

metarename(1M)

metareplace(1M)

metaset(1M)

metassist(1M)

metastat(1M)

metasync(1M)

metattach(1M)

mib2mof(1M)

mibiisa(1M)

mkbootmedia(1M)

mkdevalloc(1M)

mkdevmaps(1M)

mkfifo(1M)

mkfile(1M)

mkfs(1M)

mkfs_pcfs(1M)

mkfs_udfs(1M)

mkfs_ufs(1M)

mknod(1M)

mkntfs(1M)

mkpwdict(1M)

modinfo(1M)

modload(1M)

modunload(1M)

mofcomp(1M)

mofreg(1M)

monacct(1M)

monitor(1M)

mount(1M)

mountall(1M)

mountd(1M)

mount_hsfs(1M)

mount_nfs(1M)

mount_pcfs(1M)

mount_smbfs(1M)

mount_tmpfs(1M)

mount_udfs(1M)

mount_ufs(1M)

mpathadm(1M)

mpstat(1M)

msgid(1M)

mvdir(1M)

named(1M)

named-checkconf(1M)

named-checkzone(1M)

named-compilezone(1M)

ncaconfd(1M)

ncheck(1M)

ncheck_ufs(1M)

ndd(1M)

ndmpadm(1M)

ndmpd(1M)

ndmpstat(1M)

netadm(1M)

netcfg(1M)

netcfgd(1M)

netservices(1M)

netstat(1M)

netstrategy(1M)

newaliases(1M)

newfs(1M)

newkey(1M)

nfs4cbd(1M)

nfsd(1M)

nfslogd(1M)

nfsmapid(1M)

nfsref(1M)

nfsstat(1M)

nscadm(1M)

nscd(1M)

nscfg(1M)

nslookup(1M)

nsupdate(1M)

ntfscat(1M)

ntfsclone(1M)

ntfscluster(1M)

ntfscmp(1M)

ntfscp(1M)

ntfsfix(1M)

ntfsinfo(1M)

ntfslabel(1M)

ntfsls(1M)

ntfsprogs(1M)

ntfsresize(1M)

ntfsundelete(1M)

nulladm(1M)

nwamd(1M)

obpsym(1M)

oplhpd(1M)

parted(1M)

pbind(1M)

pcitool(1M)

pginfo(1M)

pgstat(1M)

picld(1M)

ping(1M)

pkg2du(1M)

pkgadd(1M)

pkgadm(1M)

pkgask(1M)

pkgchk(1M)

pkgcond(1M)

pkgrm(1M)

plockstat(1M)

pntadm(1M)

polkit-is-privileged(1M)

pooladm(1M)

poolbind(1M)

poolcfg(1M)

poold(1M)

poolstat(1M)

ports(1M)

poweradm(1M)

poweroff(1M)

powertop(1M)

pppd(1M)

pppoec(1M)

pppoed(1M)

pppstats(1M)

praudit(1M)

prctmp(1M)

prdaily(1M)

projadd(1M)

projdel(1M)

projmod(1M)

prstat(1M)

prtacct(1M)

prtconf(1M)

prtdiag(1M)

prtdscp(1M)

prtfru(1M)

prtpicl(1M)

prtvtoc(1M)

psradm(1M)

psrinfo(1M)

psrset(1M)

pwck(1M)

pwconv(1M)

quot(1M)

quota(1M)

quotacheck(1M)

quotaoff(1M)

quotaon(1M)

raidctl(1M)

ramdiskadm(1M)

rarpd(1M)

rcapadm(1M)

rcapd(1M)

rctladm(1M)

rdate(1M)

rdisc(1M)

reboot(1M)

rem_drv(1M)

remove_allocatable(1M)

removef(1M)

reparsed(1M)

repquota(1M)

restricted_shell(1M)

rexd(1M)

rexecd(1M)

rlogind(1M)

rmmount(1M)

rmt(1M)

rmvolmgr(1M)

rndc(1M)

rndc-confgen(1M)

roleadd(1M)

roledel(1M)

rolemod(1M)

root_archive(1M)

route(1M)

routeadm(1M)

routed(1M)

rpcbind(1M)

rpc.bootparamd(1M)

rpcinfo(1M)

rpc.mdcommd(1M)

rpc.metad(1M)

rpc.metamedd(1M)

rpc.metamhd(1M)

rpc.rexd(1M)

rpc.rstatd(1M)

rpc.rusersd(1M)

rpc.rwalld(1M)

rpc.smserverd(1M)

rpc.sprayd(1M)

rpc.yppasswdd(1M)

rpc.ypupdated(1M)

rquotad(1M)

rsh(1M)

rshd(1M)

rstatd(1M)

rtc(1M)

rtquery(1M)

runacct(1M)

rusersd(1M)

rwall(1M)

rwalld(1M)

rwhod(1M)

sa1(1M)

sa2(1M)

sadc(1M)

sar(1M)

sasinfo(1M)

savecore(1M)

sbdadm(1M)

scadm(1M)

sckmd(1M)

scmadm(1M)

sconadm(1M)

sdpadm(1M)

sendmail(1M)

sf880drd(1M)

sftp-server(1M)

shadowd(1M)

shadowstat(1M)

share(1M)

shareall(1M)

sharectl(1M)

share_nfs(1M)

share_smb(1M)

showmount(1M)

shutacct(1M)

shutdown(1M)

slpd(1M)

smattrpop(1M)

smbadm(1M)

smbd(1M)

smbiod(1M)

smbiod-svc(1M)

smbios(1M)

smbstat(1M)

smrsh(1M)

smtnrhdb(1M)

smtnrhtp(1M)

smtnzonecfg(1M)

smtp-notify(1M)

sndradm(1M)

sndrd(1M)

sndrsyncd(1M)

snmpdx(1M)

snmp-notify(1M)

snmpXwbemd(1M)

snoop(1M)

soconfig(1M)

soladdapp(1M)

soldelapp(1M)

solstice(1M)

sppptun(1M)

spray(1M)

sprayd(1M)

srptadm(1M)

sshd(1M)

ssh-keysign(1M)

startup(1M)

statd(1M)

stclient(1M)

stmfadm(1M)

stmsboot(1M)

strace(1M)

strclean(1M)

strerr(1M)

sttydefs(1M)

su(1M)

sulogin(1M)

svadm(1M)

svcadm(1M)

svccfg(1M)

svc.configd(1M)

svc.ipfd(1M)

svc.startd(1M)

swap(1M)

sync(1M)

syncinit(1M)

syncloop(1M)

syncstat(1M)

sysconfig(1M)

sysdef(1M)

syseventadm(1M)

syseventconfd(1M)

syseventd(1M)

syslogd(1M)

talkd(1M)

tapes(1M)

tcxconfig(1M)

telnetd(1M)

tftpd(1M)

th_define(1M)

th_manage(1M)

tic(1M)

tncfg(1M)

tnchkdb(1M)

tnctl(1M)

tnd(1M)

tninfo(1M)

tpmadm(1M)

traceroute(1M)

trapstat(1M)

ttymon(1M)

tunefs(1M)

turnacct(1M)

txzonemgr(1M)

tzreload(1M)

tzselect(1M)

uadmin(1M)

ucodeadm(1M)

ufsdump(1M)

ufsrestore(1M)

umount(1M)

umountall(1M)

umount_smbfs(1M)

unlink(1M)

unshare(1M)

unshareall(1M)

unshare_nfs(1M)

System Administration Commands - Part 3

mount_smbfs

, umount_smbfs

- mount and unmount a shared resource from an SMB file server

Synopsis

/usr/sbin/mount [-F smbfs] [generic-options] [-o name=value]
     [-O] resource
/usr/sbin/mount [-F smbfs] [generic-options] [-o name=value]
     [-O] mount-point
/usr/sbin/mount [-F smbfs] [generic-options] [-o name=value] 
     [-O] resource mount-point
/usr/sbin/umount [-F smbfs] [generic-options] 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 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 an SMB share. This service is enabled by default.

To enable the service, enter the following svcadm(1M) command:

# svcadm enable network/smb/client

Operands

The mount command supports the following operands:

resource //server/share

The name of the resource to be mounted. In addition to its name, you can specify the following information about the resource:

  • server is the DNS or NetBIOS name of the remote computer.

  • share is the resource name on the remote server.

You can also specify the user account. See the “Options” section.

The mount command can read a password from standard input for the user account. If the password is not provided, mount first attempts to use the password stored by the smbadm add-key command (if any). If that password fails to authenticate, the mount_smbfs command prompts you for a password if standard input is a TTY.

mount-point

The path to the location where the file system is to be mounted or unmounted. The mount command maintains a table of mounted file systems in the /etc/mnttab file. See the mnttab(4) man page.

Options

See the mount(1M) man page for the list of supported generic-options.

-o name=value or
-o name

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:

acdirmax=n

Hold cached attributes for no more than n seconds after directory update. The default value is 60.

acdirmin=n

Hold cached attributes for at least n seconds after directory update. The default value is 30.

acregmax=n

Hold cached attributes for no more than n seconds after file modification. The default value is 60.

acregmin=n

Hold cached attributes for at least n seconds after file modification. The default value is 3.

actimeo=n

Set minimum and maximum times for regular files and directories to n seconds. See “File Attributes,” below, for a description of the effect of setting this option to 0.

See “Specifying Values for Attribute Cache Duration Options,” below, for a description of how acdirmax, acdirmin, acregmax, acregmin, and actimeo are parsed on a mount command line.

dirperms=octaltriplet

Specifies the permissions to be assigned to directories. The value must be specified as an octal triplet, such as 755. The default value for the directory mode is taken from the fileperms setting, with execute permission added where fileperms has read permission.

Note that these permissions have no relation to the rights granted by the SMB server.

domain=value

Specifies the name of the workgroup or the Windows domain in which the user name is defined. If the domain name is not specified, the default system's SMB domain is used.

fileperms=octaltriplet

Specifies the permissions to be assigned to files. The value must be specified as an octal triplet, such as 644. The default value is 700.

Note that these permissions have no relation to the rights granted by the SMB server.

gid=groupid

Assigns the specified group ID to files. The default value is the group ID of the directory where the volume is mounted.

intr|nointr

Enable (or disable) cancellation of 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 intr (interruption enabled), so cancellation is normally allowed.

noac

Suppress attribute caching. Local stat(2) calls always request attributes from the SMB server.

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.

The mount operation fails if a password is required, the noprompt property is set, and no password is stored by the smbadm add-key command.

retry_count=number

Specifies the number of SMBFS retries to attempt before the connection is marked as broken. By default, 4 attempts are made.

timeout=seconds

Specifies the SMB request timeout. By default, the timeout is 15 seconds.

uid=userid

Assigns the specified user ID files. The default value is the owner ID of the directory where the volume is mounted.

user=value

Specifies the remote user name. If user is omitted, the logged-in user ID is used.

xattr|noxattr

Enable (or disable) Solaris Extended Attributes in this mount point. This option defaults to xattr (enabled Extended Attributes), but note: if the SMB server does not support SMB “named streams”, smbfs(7FS) forces this option to noxattr. When a mount has the noxattr option, attempts to use Solaris Extended attributes fail with EINVAL.

-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.”

File Attributes

To improve smbfs performance, file attributes are cached. File modification times get updated whenever any local modifications occur. However, file access times can be temporarily out-of-date until the cache gets refreshed.

The attribute cache retains file attributes on the client. Attributes for a file are assigned a time to be flushed. If the file is modified before the flush time, then the flush time is extended by the time since the last modification (under the assumption that files that changed recently are likely to change soon). There is a minimum and maximum flush time extension for regular files and for directories. Setting actimeo=n sets flush time to n seconds for both regular files and directories.

Setting actimeo=n disables attribute caching on the client. This means that every reference to attributes is satisfied directly from the server. While this guarantees that the client always has the latest file attributes from the server, it has an adverse effect on performance through additional latency, network load, and server load.

Setting the noac option also disables attribute caching. When smbfs is enhanced to support write caching, this option will have the further effect of disabling that write caching.

Specifying Values for Attribute Cache Duration Options

The attribute cache duration options are acdirmax, acdirmin, acregmax, acregmin, and actimeo, as described under OPTIONS, above. A value specified for actimeo sets the values of all attribute cache duration options except for any of these options specified following actimeo on a mount command line. For example, consider the following command:

# mount -F smbfs -o acdirmax=10,actimeo=1000 \
     //server/share /mountpoint

Because actimeo is the last duration option in the command line, its value (1000) becomes the setting for all of the duration options, including acdirmax. Now consider:

# mount -F smbfs -o actimeo=1000,acdirmax=10 \
     //server/share /mountpoint

Because the acdirmax option follows actimeo on the command line, it is assigned the value specified (10). The remaining duration options are set to the value of actimeo (1000).

Examples

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 -o user=root,domain=SALES //nano.sfbay/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 -o user=root //nano.sfbay/tmp /mnt
Password:

You can verify that the share is mounted in the following ways:

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
//nano.sfbay/tmp
                      1882384   64448 1817936     4%    /mnt

Example 3 Unmounting an SMB Share

This example assumes that an SMB share has been mounted on the /mnt mount point. The following command line unmounts the share from the mount point.

# umount /mnt

Files

/etc/mnttab

Table of mounted file systems.

/etc/dfs/fstypes

Default distributed file system type.

/etc/vfstab

Table of automatically mounted resources.

/var/smb/smbfspasswd

Stores per-user settings for the Solaris SMB client.

Attributes

See the attributes(5) man page for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/file-system/smb
Interface Stability
Committed

See Also

mount(1M), mountall(1M), smbadm(1M), svcadm(1M), acl(2), fcntl(2), link(2), mknod(2), mount(2), stat(2), symlink(2), umount(2), mnttab(4), smb(4), vfstab(4), attributes(5), pcfs(7FS), smbfs(7FS)

Notes

The Solaris SMB client always attempts to use gethostbyname() to resolve host names. If the host name cannot be resolved, the SMB client uses NetBIOS name resolution (NBNS). The Solaris SMB client permits the use of NBNS to enable Solaris SMB clients in Windows environments to work without additional configuration.

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.