AUTO.MASTER

Section: File Formats (5)
Updated: 11 Apr 2006
Index Return to Main Contents
 

NAME

auto.master - Master Map for automounter  

DESCRIPTION

The auto.master map is consulted to set up automount managed mount points when the autofs(8) script is invoked or the automount(8) program is run. Each line describes a mount point and refers to an autofs map describing file systems to be mounted under the mount point. The default location of the master map is /etc/auto.master but an alternate name may be given on the command line when running the automounter and the default master map may changed by setting the DEFAULT_MASTER_MAP_NAME configuration variable in /etc/sysconfig/autofs. If the master map name has no path then the system Name Service Switch configuration will be consulted and each of the sources searched in line with the rules given in the Name Service Switch configuration. Access to mounts in maps is governed by a key. For direct maps the mount point is always specified as: /- and the key used within the direct map is the full path to the mount point. For indirect maps access is by using the path scheme: /mount-point/key where mount-point is one of the entries listed in the master map. The key is a single directory component and is matched against entries in the map given in the entry (See autofs(5)). Additionally, a map may be included from its source as if it were itself present in the master map by including a line of the form: + [maptype,format:]map[options] and automount(8) will process the map according to the specification described below for map entries.  

FORMAT

Master map entries have three fields separated by an arbitrary number of spaces or tabs. Lines beginning with # are comments. The first field is the mount point described above and the second field is the name of the map to be consulted for the mount point followed by the third field which contains options to be applied to all entries in the map. The format of a master map entry is:
mount-point [map-type[,format]:]map [options]
mount-point
Base location for the autofs filesystem to be mounted. For indirect maps this directory will be created (as with mkdir -p) and is removed when the autofs filesystem is umounted.
map-type
Type of map used for this mount point. The following are valid map types:
file
The map is a regular text file.
program
The map is an executable program, which is passed a key on the command line and returns an entry (everything besides the key) on stdout if successful.
yp
The map is a NIS (YP) database.
nisplus
The map is a NIS+ database.
hesiod
The map is a hesiod database whose filsys entries are used for maps.
ldap or ldaps
The map is stored in an LDAP directory. If ldaps is used the appropriate certificate must be configured in the LDAP client.
multi
This map type allows the specification of multiple maps separated by "--". These maps are searched in order to resolve key lookups.
format
Format of the map data; currently the only formats recognized are sun, which is a subset of the Sun automounter map format, and hesiod, for hesiod filesys entries. If the format is left unspecified, it defaults to sun for all map types except hesiod.
map
Name of the map to use. This is an absolute UNIX pathname for maps of types file or program, and the name of a database in the case for maps of type yp, nisplus, or hesiod or the dn of an LDAP entry for maps of type ldap.
options
Any remaining command line arguments without leading dashes (-) are taken as options (-o) to mount. Arguments with leading dashes are considered options for the maps.

The sun format supports the following options:

-Dvariable=value
Replace variable with value in map substitutions.
-strict
Treat errors when mounting file systems as fatal. This is important when multiple file systems should be mounted (`multimounts'). If this option is given, no file system is mounted at all if at least one file system can't be mounted. <<<<<<< master
 

GENERAL SYSTEM DEFAULTS CONFIGURATION

The default value of several general settings may be changed in the configuration file /etc/sysconfig/autofs. They are:
DEFAULT_TIMEOUT
sets the default mount timeout (program default 600).
DEFAULT_BROWSE_MODE
Maps are browsable by default (program default "yes").
DEFAULT_LOGGING
set default log level "none", "verbose" or "debug" (program default "none"). =======
 

GENERAL SYSTEM DEFAULTS CONFIGURATION

The default value of several general settings may be changed in the configuration file /etc/sysconfig/autofs. They are:
DEFAULT_TIMEOUT
sets the default mount timeout (program default 600).
DEFAULT_BROWSE_MODE
Maps are browsable by default (program default "yes").
DEFAULT_LOGGING
set default log level "none", "verbose" or "debug" (program default "none").
 

BUILTIN MAP -hosts

If "-hosts" is given as the map then accessing a key under the mount point which corresponds to a hostname will allow access to the exports of that host. For example, with an entry in the master map of /net -hosts accessing /net/myserver will mount exports from myserver on directories below /net/myserver. NOTE: mounts done from a hosts map will be mounted with the "nosuid" and "nodev" options unless the options "suid" and "dev" are explicitly given in the master map entry.  

LDAP MAPS

If the map type ldap is specified the mapname is of the form [//servername/]dn, where the optional servername is the name of the LDAP server to query, and dn is the Distinguished Name of a subtree to search for map entries. The old style ldap:servername:mapname is also understood. Alternatively, the type can be obtained from the Name Service Switch configuration, in which case the map name alone must be given. The default LDAP schema is the NIS schema described in RFC 2307. Entries in the nisMap schema are nisObject objects in the specified subtree, where the cn attribute is the key (the wildcard key is "/"), and the nisMapEntry attribute contains the information used by the automounter. Entries in the automountMap schema are automount objects in the specified subtree, where the cn or automountKey attribute (depending on local usage) is the key (the wildcard key is "/"), and the automountInformation attribute contains the information used by the automounter. The object classes and attributes used for accessing automount maps in LDAP can be changed by setting entries in the autofs configuration located in /etc/sysconfig/autofs. The configuration settings available are:
DEFAULT_MAP_OBJECT_CLASS
The map object class. Its Default value is "nisMap". In the automountMap schema this corresponds to the class automountMap.
DEFAULT_ENTRY_OBJECT_CLASS
The map entry object class. Its default value is nisObject. In the automountMap schema this corresponds to the class automount.
DEFAULT_MAP_ATTRIBUTE
The attribute used to identify the name of the map to which this entry belongs. Its default value is nisMapName. In the automountMap schema this corresponds to the attributes ou or automountMapName.
DEFAULT_ENTRY_ATTRIBUTE
The attribute used to identify a map key. Its default value is In the automountMap schema this corresponds to the attribute automountKey.
DEFAULT_VALUE_ATTRIBUTE
The attribute used to identify the value of the map entry. Its default value is BnisMapEntry. In the automountMap schema this corresponds to the attribute automountInformation.
 

LDAP AUTHENTICATION, ENCRYPTED AND CERTIFIED CONNECTIONS

LDAP authenticated binds, TLS encrypted connections and certification may be used by setting appropriate values in the autofs authentication configuration file and configuring the LDAP client with appropriate settings. The default location of this file is /etc/autofs_ldap_auth.conf. If this file exists it will be used to establish whether TLS or authentication should be used. An example of this file is:

<?xml version="1.0" ?>
<autofs_ldap_sasl_conf
        usetls="yes"
        tlsrequired="no"
        authrequired="no"
        authtype="DIGEST-MD5"
        user="xyz"
        secret="abc"
/>

If TLS encryption is to be used the location of the Certificate Authority certificate must be set within the LDAP client configuration in order to validate the server certificate. If, in addition, a certified connection is to be used then the client certificate and private key file locations must also be configured within the LDAP client. In OpenLDAP these may be configured in the ldap.conf file or in the per-user configuration. For example it may be sensible to use the system wide configuration for the location of the Certificate Authority certificate and set the location of the client certificate and private key in the per-user configuration. The location of these files and the configuration entry requirements is system dependent so the documentation for your installation will need to be consulted to get further information.  

EXAMPLE

/-        auto.data
/home     /etc/auto.home
/mnt      yp:mnt.map

This will generate two mountpoints for /home and /mnt and install direct mount triggers for each entry in the direct mount map auto.data. All accesses to /home will lead to the consultation of the map in /etc/auto.home and all accesses to /mnt will consult the NIS map mnt.map. All accesses to paths in the map auto.data will trigger mounts when they are accessed and the Name Service Switch configuration will be used to locate the source of the map auto.data.  

SEE ALSO

automount(8), autofs(5), autofs(8).  

AUTHOR

This manual page was written by Christoph Lameter <chris@waterf.org>, for the Dean GNU/Linux system. Edited by <hpa@transmeta.com> and Ian Kent <raven@themaw.net> .


 

Index

NAME
DESCRIPTION
FORMAT
GENERAL SYSTEM DEFAULTS CONFIGURATION
GENERAL SYSTEM DEFAULTS CONFIGURATION
BUILTIN MAP -hosts
LDAP MAPS
LDAP AUTHENTICATION, ENCRYPTED AND CERTIFIED CONNECTIONS
EXAMPLE
SEE ALSO
AUTHOR

linux.jgfs.net manual pages