1AUTO.MASTER(5)                File Formats Manual               AUTO.MASTER(5)
2
3
4

NAME

6       auto.master - Master Map for automounter consulted by autofs
7

DESCRIPTION

9       The  auto.master  map  is  consulted  to set up automount managed mount
10       points when the autofs(8) script is invoked or the automount(8) program
11       is  run.  Each line describes a mount point and refers to an autofs map
12       describing file systems to be mounted under the mount point.
13
14       The default location of the master map is /etc/auto.master but  an  al‐
15       ternate  name  may  be given on the command line when running the auto‐
16       mounter  and  the  default  master  map  may  changed  by  setting  the
17       MASTER_MAP_NAME  configuration  variable  in /etc/sysconfig/autofs.  If
18       the master map name has no path then the  system  Name  Service  Switch
19       configuration  will  be  consulted  and each of the sources searched in
20       line with the rules given in the Name Service Switch configuration.
21
22       Access to mounts in maps is governed by a key.
23
24       For direct maps the mount point is always specified as:
25
26       /-
27
28       and the key used within the direct map is the full path  to  the  mount
29       point. The direct map may have multiple entries in the master map.
30
31       For indirect maps access is by using the path scheme:
32
33       /mount-point/key
34
35       where  mount-point  is one of the entries listed in the master map. The
36       key is a single directory component and is matched against  entries  in
37       the map given in the entry (See autofs(5)).
38
39       Additionally,  a  map may be included from its source as if it were it‐
40       self present in the master map by including a line of the form:
41
42       +[maptype[,format]:]map [options]
43
44       and automount(8) will process the map according  to  the  specification
45       described below for map entries. Indirect map entries must be unique in
46       the master map so second and subsequent entries for an  indirect  mount
47       point are ignored by automount(8).
48
49       NOTE:  autofs currently does not collapse multiple slashes in paths, so
50              it is important to ensure paths used in maps are correct. If un‐
51              necessary  multiple slashes are present in a path it can lead to
52              unexpected failures such as an inability to  expire  automounts.
53              An exception to this is a trailing slash at the end of the auto‐
54              mount point path in the master map  which  will  be  removed  if
55              present.
56

FORMAT

58       Master  map  entries have three fields separated by an arbitrary number
59       of spaces or tabs. Lines beginning with # are comments. The first field
60       is  the mount point described above and the second field is the name of
61       the map to be consulted for the mount point followed by the third field
62       which contains options to be applied to all entries in the map.
63
64       The format of a master map entry is:
65
66       mount-point [map-type[,format]:]map [options]
67
68       mount-point
69              Base  location for the autofs filesystem to be mounted.  For in‐
70              direct maps this directory will be created (as  with  mkdir  -p)
71              and is removed when the autofs filesystem is umounted.
72
73       map-type
74              Type  of map used for this mount point.  The following are valid
75              map types:
76
77              file   The map is a regular text file.
78
79              program
80                     The map is an executable program, which is passed  a  key
81                     on  the command line and returns an entry (everything be‐
82                     sides the key) on stdout if successful.   Optinally,  the
83                     keyword  exec  may  be  used  as a synonym for program to
84                     avoid confusion with amd formated maps  mount  type  pro‐
85                     gram.
86
87              yp     The map is a NIS (YP) database.
88
89              nisplus
90                     The map is a NIS+ database.
91
92              hesiod The  map  is  a  hesiod database whose filsys entries are
93                     used for maps.
94
95              ldap or ldaps
96                     The map is stored in an LDAP directory. If ldaps is  used
97                     the  appropriate  certificate  must  be configured in the
98                     LDAP client.
99
100              multi  This map type allows the specification of  multiple  maps
101                     separated  by  "--".  These maps are searched in order to
102                     resolve key lookups.
103
104              dir    This map type can be used at + master map including nota‐
105                     tion. The contents of files under given directory are in‐
106                     cluded to the master map. The name of file to be included
107                     must  be  ended with ".autofs". A file will be ignored if
108                     its name is not ended with the suffix. In addition a  dot
109                     file,  a  file which name is started with "." is also ig‐
110                     nored.
111
112       format
113              Format of the map data; currently  the  formats  recognized  are
114              sun,  which  is a subset of the Sun automounter map format, hes‐
115              iod, for hesiod filesys entries and amd for amd formated map en‐
116              tries.   If  the  format is left unspecified, it defaults to sun
117              for all map types except hesiod unless it is  a  top  level  amd
118              mount  that  has a configuration entry for the mount point path,
119              in which case the format used is amd.
120
121       map
122              Name of the map to use.  This is an absolute UNIX  pathname  for
123              maps  of types file, dir, or program, and the name of a database
124              in the case for maps of type yp, nisplus, or hesiod or the dn of
125              an LDAP entry for maps of type ldap.
126
127       options
128              Any  remaining command line arguments without leading dashes (-)
129              are taken as options (-o)  to  mount.   Arguments  with  leading
130              dashes are considered options for the maps and are passed to au‐
131              tomount (8).
132
133              The sun format supports the following options:
134
135              -Dvariable=value
136                     Replace variable with value in map substitutions.
137
138              -strict
139                     Treat errors when mounting file systems as fatal. This is
140                     important  when  multiple  file systems should be mounted
141                     (`multimounts'). If this option is given, no file  system
142                     is  mounted  at  all if at least one file system can't be
143                     mounted.
144
145              [no]browse
146                     This is an autofs specific option that is a pseudo  mount
147                     option and so is given without a leading dash. Use of the
148                     browse option pre-creates mount point directories for in‐
149                     direct mount maps so the map keys can be seen in a direc‐
150                     tory listing without being mounted. Use  of  this  option
151                     can  cause  performance  problem  if  the indirect map is
152                     large so it should be used  with  caution.  The  internal
153                     program  default  is  to  enable browse mode for indirect
154                     mounts but the default installed configuration  overrides
155                     this by setting BROWSE_MODE to "no" because of the poten‐
156                     tial performance problem. This option does  the  same  as
157                     the  deprecated --ghost option, the browse option is pre‐
158                     ferred because it is used  by  other  autofs  implementa‐
159                     tions.
160
161              nobind This  is an autofs specific option that is a pseudo mount
162                     option and so is given without a leading dash. It may  be
163                     used  either  in  the master map entry (so it effects all
164                     the map entries) or with individual map entries  to  pre‐
165                     vent  bind  mounting of local NFS filesystems. For direct
166                     mount maps the option is only effective if  specified  on
167                     the  first  direct map entry and is applied to all direct
168                     mount maps in the master map. It is ignored if  given  on
169                     subsequent direct map entries. It may be used on individ‐
170                     ual map entries of both types. Preventing bind mounts  of
171                     NFS  file  systems  can  no  longer  be done by using the
172                     "port=" option, the nobind option must be used instead.
173
174              symlink
175                     This option makes bind mounting use a symlink instead  of
176                     an  actual  bind  mount.  It is an autofs specific option
177                     that is a pseudo mount option and so is given  without  a
178                     leading  dash.  It  may be used with indirect map entries
179                     only, either in the master map (so it effects all map en‐
180                     tries)  or with individual map entries. The option is ig‐
181                     nored for direct mounts and  non-root  offest  mount  en‐
182                     tries.
183
184              slave or private
185                     This option allows mount propagation of bind mounts to be
186                     set to either slave or private. This option may be needed
187                     when  using  multi-mounts that have bind mounts that bind
188                     to a file system that is propagation shared. This is  be‐
189                     cuase the bind mount will have the same properties as its
190                     target which causes problems for offset mounts. When this
191                     happens  an  unwanted  offset mount is propagated back to
192                     the target file system resulting in a deadlock  when  at‐
193                     tempting  to access the offset.  This option is a an aut‐
194                     ofs pseudo mount option that can be used  in  the  master
195                     map  only.  By default bind mounts will inherit the mount
196                     propagation of the target file system.
197
198              -r, --random-multimount-selection
199                     Enables the use of random selection when choosing a  host
200                     from a list of replicated servers. This option is applied
201                     to this mount only, overriding the  global  setting  that
202                     may be specified on the command line.
203
204              -w, --use-weight-only
205                     Use  only  specified  weights  for server selection where
206                     more than one server is specified in the map entry. If no
207                     server  weights are given then each available server will
208                     be tried in the order listed, within proximity.
209
210              -t, --timeout <seconds>
211                     Set the expire timeout for map entries. This  option  can
212                     be  used  to  override the global default given either on
213                     the command line or in the configuration.
214
215              -n, --negative-timeout <seconds>
216                     Set the timeout for caching failed key lookups. This  op‐
217                     tion can be used to override the global default given ei‐
218                     ther on the command line or in the configuration.
219
220              --mode <octal_mode>
221                     Set the directory mode for the base location of the  aut‐
222                     ofs  mount  point.   If this option is given, autofs will
223                     chmod that directory with this mode.
224

BUILTIN MAP -hosts

226       If "-hosts" is given as the map then accessing a key  under  the  mount
227       point  which corresponds to a hostname will allow access to the exports
228       of that host. The hosts map cannot be dynamically updated and  requires
229       a  HUP signal to be sent to the daemon for it to check hosts for an up‐
230       date. Due to possible hierarchic dependencies within a mount  tree,  it
231       might not be completely updated during the HUP signal processing.
232
233       For  example,  with an entry in the master map of /net -hosts accessing
234       /net/myserver will mount exports from  myserver  on  directories  below
235       /net/myserver.
236
237       NOTE:  mounts  done  from  a  hosts  map  will be mounted with the "no‐
238       suid,nodev,intr" options unless overridden by explicily specifying  the
239       "suid", "dev" or "nointr" options in the master map entry.
240

LDAP MAPS

242       If the map type ldap is specified the mapname is of the form [//server‐
243       name/]dn, where the optional servername is the name of the LDAP  server
244       to  query,  and dn is the Distinguished Name of a subtree to search for
245       map entries.  The old style ldap:servername:mapname is also understood.
246       Alternatively,  the  type  can be obtained from the Name Service Switch
247       configuration, in which case the map name alone must be given.
248
249       If no schema is set in the autofs configuration then autofs will  check
250       each  of the commonly used schema for a valid entry and if one is found
251       it will used for subsequent lookups.
252
253       There are three common schemas in use:
254
255       nisMap
256              Entries in the nisMap schema are nisObject objects in the speci‐
257              fied  subtree,  where  the cn attribute is the key (the wildcard
258              key is "/"), and the nisMapEntry attribute contains the informa‐
259              tion used by the automounter.
260
261       automountMap
262              The  automountMap  schema  has two variations that differ in the
263              attribute used for the map  key.  Entries  in  the  automountMap
264              schema are automount objects in the specified subtree, where the
265              cn or automountKey attribute (depending on local usage)  is  the
266              key  (the wildcard key is "/"), and the automountInformation at‐
267              tribute contains the information used by the  automounter.  Note
268              that the cn attribute is case insensitive.
269
270       The  object classes and attributes used for accessing automount maps in
271       LDAP can be changed by setting entries in the autofs configuration  lo‐
272       cated in /etc/sysconfig/autofs.conf.
273
274       NOTE:  If  a  schema  is given in the configuration then all the schema
275              configuration values must be set, any partial schema  specifica‐
276              tion will be ignored.
277
278       For amd format maps a different schema is used:
279
280       amdMap
281              The  amdmap schema contains attributes amdmapName, amdmapKey and
282              amdmapValue where amdmapName contains the name of the containing
283              map, amdmapKey contains the map key and amdmapValue contains the
284              map entry.
285

LDAP AUTHENTICATION, ENCRYPTED AND CERTIFIED CONNECTIONS

287       LDAP authenticated binds, TLS encrypted connections  and  certification
288       may  be used by setting appropriate values in the autofs authentication
289       configuration file and configuring the  LDAP  client  with  appropriate
290       settings.      The     default     location    of    this    file    is
291       /etc/autofs_ldap_auth.conf.
292
293       If this file exists it will be used to establish whether TLS or authen‐
294       tication should be used.
295
296       An example of this file is:
297
298         <?xml version="1.0" ?>
299         <autofs_ldap_sasl_conf
300                 usetls="yes"
301                 tlsrequired="no"
302                 authrequired="no"
303                 authtype="DIGEST-MD5"
304                 user="xyz"
305                 secret="abc"
306         />
307
308       If TLS encryption is to be used the location of the Certificate Author‐
309       ity certificate must be set within the LDAP client configuration in or‐
310       der  to  validate  the server certificate. If, in addition, a certified
311       connection is to be used then the client certificate  and  private  key
312       file locations must also be configured within the LDAP client.
313
314       In  OpenLDAP  these  may  be configured in the ldap.conf file or in the
315       per-user configuration. For example it may be sensible to use the  sys‐
316       tem  wide  configuration  for the location of the Certificate Authority
317       certificate and set the location of the client certificate and  private
318       key  in the per-user configuration. The location of these files and the
319       configuration entry requirements is system dependent so the  documenta‐
320       tion for your installation will need to be consulted to get further in‐
321       formation.
322
323       See autofs_ldap_auth.conf (5) for more information.
324

EXAMPLE

326         /-        auto.data
327         /home     /etc/auto.home
328         /mnt      yp:mnt.map
329
330       This will generate two mountpoints for /home and /mnt and  install  di‐
331       rect  mount  triggers for each entry in the direct mount map auto.data.
332       All accesses to /home will lead to  the  consultation  of  the  map  in
333       /etc/auto.home  and  all  accesses  to  /mnt  will  consult the NIS map
334       mnt.map.  All accesses to paths  in  the  map  auto.data  will  trigger
335       mounts when they are accessed and the Name Service Switch configuration
336       will be used to locate the source of the map auto.data.
337

SEE ALSO

339       automount(8),    autofs(5),     autofs(8),     autofs.conf(5),     aut‐
340       ofs_ldap_auth.conf(5).
341

AUTHOR

343       This  manual  page was written by Christoph Lameter <chris@waterf.org>,
344       for the Debian GNU/Linux system.  Edited by <hpa@transmeta.com> and Ian
345       Kent <raven@themaw.net> .
346
347
348
349                                  11 Apr 2006                   AUTO.MASTER(5)
Impressum