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. Plus map inclusion is only permitted
46       in file map sources.  Indirect map entries must be unique in the master
47       map  so  second  and subsequent entries for an indirect mount point are
48       ignored by automount(8).
49
50       NOTE:  autofs currently does not collapse multiple slashes in paths, so
51              it is important to ensure paths used in maps are correct. If un‐
52              necessary multiple slashes are present in a path it can lead  to
53              unexpected  failures  such as an inability to expire automounts.
54              An exception to this is a trailing slash at the end of the auto‐
55              mount  point  path  in  the  master map which will be removed if
56              present.
57

FORMAT

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

BUILTIN MAP -hosts

237       If "-hosts" is given as the map then accessing a key  under  the  mount
238       point  which corresponds to a hostname will allow access to the exports
239       of that host. The hosts map cannot be dynamically updated and  requires
240       a  HUP signal to be sent to the daemon for it to check hosts for an up‐
241       date. Due to possible hierarchic dependencies within a mount  tree,  it
242       might not be completely updated during the HUP signal processing.
243
244       For  example,  with an entry in the master map of /net -hosts accessing
245       /net/myserver will mount exports from  myserver  on  directories  below
246       /net/myserver.
247
248       NOTE:  mounts  done  from  a  hosts  map  will be mounted with the "no‐
249       suid,nodev,intr" options unless overridden by explicitly specifying the
250       "suid", "dev" or "nointr" options in the master map entry.
251

LDAP MAPS

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

LDAP AUTHENTICATION, ENCRYPTED AND CERTIFIED CONNECTIONS

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

EXAMPLE

337         /-        auto.data
338         /home     /etc/auto.home
339         /mnt      yp:mnt.map
340
341       This will generate two mountpoints for /home and /mnt and  install  di‐
342       rect  mount  triggers for each entry in the direct mount map auto.data.
343       All accesses to /home will lead to  the  consultation  of  the  map  in
344       /etc/auto.home  and  all  accesses  to  /mnt  will  consult the NIS map
345       mnt.map.  All accesses to paths  in  the  map  auto.data  will  trigger
346       mounts when they are accessed and the Name Service Switch configuration
347       will be used to locate the source of the map auto.data.
348
349       To avoid making edits to /etc/auto.master,  /etc/auto.master.d  may  be
350       used.   Files  in  that  directory  must  have a ".autofs" suffix, e.g.
351       /etc/auto.master.d/extra.autofs.  Such files contain lines of the  same
352       format as the auto.master file, e.g.
353
354         /foo    /etc/auto.foo
355         /baz    yp:baz.map
356

SEE ALSO

358       automount(8),     autofs(5),     autofs(8),     autofs.conf(5),    aut‐
359       ofs_ldap_auth.conf(5).
360

AUTHOR

362       This manual page was written by Christoph  Lameter  <chris@waterf.org>,
363       for  the Debian GNU/Linux system. Edited by <hpa@transmeta.com> and Ian
364       Kent <raven@themaw.net> .
365
366
367
368                                  11 Apr 2006                   AUTO.MASTER(5)
Impressum