HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)

a
automount(1M) automount(1M)
automount automatically mounts
/usr/local , /usr/local/bin
, and /usr/local/man
,as
needed, from either
shasta or ranier, whichever host responded first.
Direct Maps
A direct map contains mappings for any number of directories. Each directory listed in the map is
automatically mounted as needed. The direct map as a whole is not associated with any single directory.
Indirect Maps
An indirect map allows specifying mappings for the subdirectories to be mounted under the directory indi-
cated on the command line. It also obscures local subdirectories for which no mapping is specified. In an
indirect map, each directory field consists of the basename of a subdirectory to be mounted as needed.
Included Maps
The contents of another map can be included within a map with an entry of the form:
+mapname
mapname can either be a file name, or the name of an NIS/NIS+ map, or one of the special maps described
below. If mapname begins with a slash then it is assumed to be the pathname of a local file. Otherwise,
the location of the map is determined by the policy of the name service switch according to the entry for the
automounter in /etc/nsswitch.conf
, such as
automount: nis files
If the name service is files, then the name is assumed to be that of a local file in
/etc. If the key being
searched for is not found in the included map, the search continues with the next entry.
Special Maps
Three special maps,
-hosts, -passwd, and -null, are currently available. The
-hosts map uses the
gethostbyname() map to locate a remote host when the hostname is specified (see gethostent(3N)).
This map specifies mounts of all exported file systems from any host. For example, if the following
auto-
mount
command is already in effect:
automount /net -hosts
a reference to /net/hermes/usr
initiates an automatic mount of all file systems from hermes that
automount can mount, and any subsequent references to a directory under /net/hermes refer to the
corresponding directory on hermes
. The -passwd map uses the passwd(4) database to attempt to locate
a user’s home directory. For example, if the following
automount
command is already in effect:
automount /homes -passwd
if the home directory for a user has the form
/dir/server/username
and if server matches the host system on which that directory resides, automount mounts the user’s
home directory as /homes /username.
For this map, the tilde character (˜) is recognized as a synonym for username.
The
-null map, when indicated on the command line, cancels a previous map for the directory indicated.
It can be used to cancel a map given in auto_master .
Configuration and the auto_master Map
automount normally consults the auto_master configuration map for a list of initial automount
maps, and sets up automatic mounts for them in addition to those given on the command line. If there are
duplications, the command-line arguments take precedence. This configuration database contains argu-
ments to the automount command rather than mappings.
Maps given on the command line, or those given in a local master file specified with -f override those in
the auto_master map. For example, given the command
automount /homes /etc/auto.homes /- /etc/auto.direct
and the master map file auto_master containing
/homes -passwd
automount
mounts home directories using the /etc/auto.homes map instead of the special
-passwd map in addition to the various directories specified in the /etc/auto.direct map.
Section 1M96 Hewlett-Packard Company 8 HP-UX 11i Version 1: September 2005