|
NAMEauto_master —
auto_master and map file format
DESCRIPTIONThe automounter configuration consists of theauto_master configuration file, which assigns
filesystem paths to map names, and maps, which contain actual mount
information. The auto_master configuration file is
used by the
automount(8)
command. Map files are read by the
automountd(8)
daemon.
AUTO_MASTER SYNTAXTheauto_master file consists of lines with two or three
entries separated by whitespace and terminated by newline character:
mountpoint map_name [-options ] mountpoint is either a fully specified
path, or map_name specifies map to use. If
map_name begins with -options is an optional field that starts
with The following example specifies that the /etc/auto_example indirect map will be mounted on /example. /example auto_example MAP SYNTAXMap files consist of lines with a number of entries separated by whitespace and terminated by newline character:
key
[-options
]
[mountpoint
[-options
]
]
location
[...
]
In most cases, it can be simplified to:
key
[-options
]
location
key is the path component used by
automountd(8)
to find the right map entry to use. It is also used to form the final
mountpoint. A wildcard (‘ The options field, if present, must begin
with The optional mountpoint field is used to specify multiple mount points for a single key. The location field specifies the filesystem
to be mounted. Ampersands (‘
The location field may contain references to variables, like:
Defined variables are:
Additional variables can be defined with the
To pass a location that begins with This example, when put into
/etc/auto_example, and with
Automatically mount an SMB share on access, as a guest user, without prompting for a password:
Automatically mount the CD drive on access:
SPECIAL MAPSSpecial maps have names beginning with- . Supported
special maps are:
It is possible to add custom special maps by adding them, as executable maps named special_foo, to the /etc/autofs/ directory. EXECUTABLE MAPSIf the map file specified inauto_master has the execute
bit set,
automountd(8)
will execute it and parse the standard output instead of parsing the file
contents. When called without command line arguments, the executable is
expected to output a list of available map keys separated by newline
characters. Otherwise, the executable will be called with a key name as a
command line argument. Output from the executable is expected to be the entry
for that key, not including the key itself.
INDIRECT VERSUS DIRECT MAPSIndirect maps are referred to inauto_master by entries
with a fully qualified path as a mount point, and must contain only relative
paths as keys. Direct maps are referred to in
auto_master by entries with /-
as the mountpoint, and must contain only fully qualified paths as keys. For
indirect maps, the final mount point is determined by concatenating the
auto_master mountpoint with the map entry key and
optional map entry mountpoint. For direct maps, the final mount point is
determined by concatenating the map entry key with the optional map entry
mountpoint.
The example above could be rewritten using direct map, by placing
this in
and this in
DIRECTORY SERVICESBothauto_master and maps may contain entries consisting
of a plus sign and map name:
Those entries cause automountd(8) daemon to retrieve the named map from directory services (like LDAP) and include it where the entry was. If the file containing the map referenced in
To retrieve entries from directory services,
automountd(8)
daemon runs /etc/autofs/include, which is usually a
shell script, with map name as the only command line parameter. The script
should output entries formatted according to
FILES
SEE ALSOautofs(5), automount(8), automountd(8), autounmountd(8)AUTHORSTheauto_master configuration file functionality was
developed by Edward Tomasz Napierala
<trasz@FreeBSD.org>
under sponsorship from the FreeBSD Foundation.
Visit the GSP FreeBSD Man Page Interface. |