share_nfs.1m (2010 09)

s
share_nfs(1M) share_nfs(1M)
services like NIS cannot be used to resolve hostnames on the server, because when mapping an IP
address to a hostname they do not return domain information. For example,
NIS 129.144.45.9 --> "myhost"
DNS or LDAP 129.144.45.9 --> "myhost.mydomain.mycompany.com"
The domain name suffix is distinguished from hostnames and netgroups by a prefixed dot. For
example,
rw=.mydomain.mycompany.com
A single dot can be used to match a hostname with no suffix. For example,
rw=.
will match "mydomain" but not "mydomain.mycompany.com". This feature can be used to match
hosts resolved through NIS rather than DNS and LDAP.
network
The network or subnet component is preceded by an at-sign (
@). It can be either a name or a dotted
address. If a name, it will be converted to a dotted address by
getnetbyname()
. For example,
=@mynet would be equivalent to:
=@129.144 or =@129.144.0.0
The network prefix assumes an octet aligned netmask determined from the zero octets in the low-
order part of the address. In the case where network prefixes are not byte-aligned, the syntax will
allow a mask length to be specified explicitly following a slash (
/) delimiter. For example,
=@mynet/17 or rw=@129.144.132/17
where the mask is the number of leftmost contiguous significant bits in the corresponding IP
address.
A prefixed minus sign (
-) denies access to that component of access_list . The list is searched
sequentially until a match is found that either grants or denies access, or until the end of the list is
reached.
WARNINGS
File system sharing used to be called exporting on HP-UX, and the
exportfs command was used. With
the new share NFS model, the share command replaces exportfs. This command is available on
HP-UX 11.31 and later releases.
To support compatibility with scripts run on systems with older versions of HP-UX that do not have sup-
port for the
share command and instead use exportfs, share will not fail when the
access option
is used, as long as it is used in the same way as with
exportfs. However, attempts to use the
access
option with new share options, (for example, sec=), may result in the access option being rejected. It
is highly recommended not to use the access option with the share command. Instead, use the ro=
and rw= options to achieve the desired access restrictions. share support of the access option will be
removed in a future release of HP-UX.
If
share commands are invoked multiple times on the same file system, the last share invocation
supersedes any previous invocations and the options set by the last share command replace the old
options. For example, if read-only permission was previously given to usera on somefs, the following
share command could be used to also give read-only permission to userb:
share -F nfs -o ro=usera:userb /somefs
This behavior is not limited to sharing the root file system, but applies to all file systems.
EXAMPLES
The following example shows the
/export file system shared with logging enabled:
example% share -o log /export
The default global logging parameters are used since no tag identifier is specified. The location of the log
file, as well as the necessary logging work files, is specified by the global entry in
/etc/nfs/nfslog.conf.
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3