Information Technology Reference
In-Depth Information
Table 15.1
The share Command's NFS-Specific Options
(continued)
Option
Description
rw
Allows read/write access.
rw=
list
Allows read/write access only to those clients specified by
list
.
sec=
mode
Uses one or more of the security modes specified by
mode
to
authenticate clients.
window=
value
Sets the maximum lifetime for a client's credentials to
value
seconds.
The following listing shows how the
share
command allows NFS clients to
mount the
/export/home
file system, including WebNFS clients. All clients
will have read-only access:
# share -F nfs -o public,ro /export/home
#
If the
share
command is used without any command-line arguments, the
currently shared resources will be listed.
The unshare Command
The
unshare
command is used to stop the sharing of NFS resources so that
NFS clients can no longer mount and access them. At a minimum, the full
pathname of a directory (or mount point of the file system) that is currently
shared is specified as a command-line argument.
Only one other command-line argument is supported: the
-F nfs
command-
line argument, which is used to specify the type of file system. If not speci-
fied, the default file system type listed in the
/etc/dfs/fstypes
file (NFS) is
assumed.
The following listing shows using the
unshare
command to stop the sharing
of the
/export/home
file system:
# unshare -F nfs /export/home
#
The /etc/dfs/dfstab File
The
/etc/dfs/dfstab
file specifies resources that should be shared automat-
ically when the system is changed to run level 3 or when the
shareall
com-
mand is used.
This file can be modified using any text editor. To automatically share a
resource, add a line to the
/etc/dfs/dfstab
file that contains the
share
com-
mand with the desired command-line arguments and options that would
have been entered manually. To remove automatic sharing of a resource,
delete the appropriate
share
command from
/etc/dfs/dfstab
.