1AUTOFS.CONF(5) File Formats Manual AUTOFS.CONF(5)
2
3
4
6 autofs.conf - autofs configuration
7
9 Configuration settings used by automount(8) may be changed in the con‐
10 figuration file /etc/autofs.conf.
11
12 This file contains two primary sections, autofs and amd.
13
14 Configuration entries may be present at the beginning of the configura‐
15 tion file without a section header and are implicitly included as part
16 of the autofs section.
17
18 Each section name is enclosed in square brackets with spaces between
19 the brackets and the section name. The amd section may be followed by
20 further sections, named by the top level mount point path, that contain
21 per mount configuration settings.
22
24 Configuration settings available are:
25
26 timeout
27 Sets the default mount timeout in seconds. The internal program
28 default is 10 minutes, but the default installed configuration
29 overrides this and sets the timeout to 5 minutes to be consis‐
30 tent with earlier autofs releases.
31
32 master_wait
33 sets the default maximum time to wait for the master map to
34 become available if it cannot be read at program start (program
35 default 10, wait for 10 seconds then continue).
36
37 negative_timeout
38 Set the default timeout for caching failed key lookups (program
39 default 60). If the equivalent command line option is given it
40 will override this setting.
41
42 mount_verbose
43 Use the verbose flag when spawning mount(8), and log some
44 process info about the requestor and its parent (program default
45 "no").
46
47 mount_wait
48 Set the default time to wait for a response from a spawned
49 mount(8) before sending it a SIGTERM. Note that we still need to
50 wait for the RPC layer to timeout before the sub-process exits
51 so this isn't ideal but it is the best we can do. The default is
52 to wait until mount(8) returns without intervention.
53
54 umount_wait
55 Set the default time to wait for a response from a spawned
56 umount(8) before sending it a SIGTERM. Note that we still need
57 to wait for the RPC layer to timeout before the sub-process
58 exits so this isn't ideal but it is the best we can do.
59
60 browse_mode
61 Maps are browsable by default (program default "yes").
62
63 mount_nfs_default_protocol
64 Set the default protocol that mount.nfs(8) uses when performing
65 a mount (program default 3). Autofs needs to know the default
66 NFS protocol that mount.nfs(8) uses so it can do special case
67 handling for its availability probe for different NFS protocols.
68 Since we can't identify this default automatically we need to
69 set it in the autofs configuration.
70
71 append_options
72 Determine whether global options, given on the command line or
73 per mount in the master map, are appended to map entry options
74 or if the map entry options replace the global options (program
75 default "yes", append options).
76
77 logging
78 set default log level "none", "verbose" or "debug" (program
79 default "none").
80
81 force_standard_program_map_env
82 override the use of a prefix with standard environment variables
83 when a program map is executed. Since program maps are run as
84 the privileged user setting these standard environment variables
85 opens automount(8) to potential user privilege escalation when
86 the program map is written in a language that can load compo‐
87 nents from, for example, a user home directory (program default
88 "no").
89
90 map_hash_table_size
91 This configuration option may be used to change the number of
92 hash table slots (default 1024).
93
94 This configuration option affects the overhead of searching the
95 map entry cache for map entries when there are a large number of
96 entries. It affects the number of entries that must be looked
97 at to locate a map entry in the map entry cache. For example,
98 the default of 1024 and a direct map with 8000 entries would
99 result in each slot containing an average of 8 entries, which
100 should be acceptable.
101
102 However, if excessive CPU usage is observed during automount
103 lookups increasing this option can reduce the CPU overhead con‐
104 siderably because it reduces the length of the search chains.
105
106 Note that the number of entries in a map doesn't necessarily
107 relate to the number of entries used in the map entry cache.
108
109 There are two distinct cases where the map hash table can make a
110 significant difference, direct maps and indirect maps that use
111 the "browse" option.
112
113 For indirect maps that do not use the "browse" option entries
114 are added to the map entry cache at lookup so the number of
115 active cache entries, in this case, is usually much less than
116 the number of entries in the map. In this last case it would be
117 unusual for the map entry cache to grow large enough to warrant
118 increasing the default before an event that cleans stale
119 entries, a map re-read for example.
120
121 use_hostname_for_mounts
122 NFS mounts where the host name resolves to more than one IP
123 address are probed for availability and to establish the order
124 in which mounts to them should be tried. To ensure that mount
125 attempts are made only to hosts that are responding and are
126 tried in the order of hosts with the quickest response the IP
127 address of the host needs to be used for the mount.
128
129 If it is necessary to use the hostname given in the map entry
130 for the mount regardless, then set this option to "yes".
131
132 Be aware that if this is done there is no defense against the
133 host name resolving to one that isn't responding and while the
134 number of attempts at a successful mount will correspond to the
135 number of addresses the host name resolves to the order will
136 also not correspond to fastest responding hosts.
137
138 disable_not_found_message
139 The original request to add this log message needed it to be
140 unconditional. That produces, IMHO, unnecessary noise in the
141 log so a configuration option has been added to provide the
142 ability to turn it off. The default is "no" to maintain the cur‐
143 rent behaviour.
144
145 use_ignore_mount_option
146 An option to enable the use of autofs pseudo option "disable".
147 This option is used as a hint to user space that the mount entry
148 should be ommitted from mount table listings. The default is
149 "no" to avoid unexpected changes in behaviour and so is an opt-
150 in setting.
151
152 sss_master_map_wait
153 Set the time to wait and retry if sssd returns "no such entry"
154 when starting up. When sssd is starting up it can sometimes
155 return "no such entry" for a short time until it has read in the
156 LDAP map information. Default is 0 seconds, don't wait.
157
158 use_mount_request_log_id
159 Set whether to use a mount request log id so that log entries
160 for specific mount requests can be easily identified in logs
161 that have multiple concurrent requests. Default is don't use
162 mount request log ids.
163
164 LDAP Configuration
165 Configuration settings available are:
166
167 ldap_timeout
168 Set the network response timeout (default 8). Set timeout value
169 for the synchronous API calls. The default is the LDAP library
170 default of an infinite timeout.
171
172 ldap_network_timeout
173 Set the network response timeout (default 8).
174
175 ldap_uri
176 A space separated list of server uris of the form
177 <proto>://<server>[/] where <proto> can be ldap or ldaps. The
178 option can be given multiple times. Map entries that include a
179 server name override this option and it is then not used.
180 Default is an empty list in which case either the server given
181 in a map entry or the LDAP configured default is used. This uri
182 list is read at startup and whenever the daemon receives a HUP
183 signal.
184
185 This configuration option can also be used to request autofs
186 lookup SRV RRs for a domain of the form <proto>:///[<domain
187 dn>]. Note that a trailing "/" is not allowed when using this
188 form. If the domain dn is not specified the dns domain name (if
189 any) is used to construct the domain dn for the SRV RR lookup.
190 The server list returned from an SRV RR lookup is refreshed
191 according to the minimum ttl found in the SRV RR records or
192 after one hour, whichever is less.
193
194 search_base
195 The base dn to use when searching for amap base dn. This entry
196 may be given multiple times and each will be checked for a map
197 base dn in the order they occur in the configuration. The search
198 base list is read at startup and whenever the daemon recieves a
199 HUP signal.
200
201 map_object_class
202 The map object class. In the nisMap schema this corresponds to
203 the class nisMap and in the automountMap schema it corresponds
204 to the class automountMap.
205
206 entry_object_class
207 The map entry object class. In the nisMap schema this corre‐
208 sponds to the class nisObject and in the automountMap schema it
209 corresponds to the class automount.
210
211 map_attribute
212 The attribute used to identify the name of the map to which this
213 entry belongs. In the nisMap schema this corresponds to the
214 attribute nisMapName and in the automountMap schema it corre‐
215 sponds to the attribute ou or automountMapName.
216
217 entry_attribute
218 The attribute used to identify a map key. In the nisMap schema
219 this corresponds to the attribute cn and in the automountMap
220 schema it corresponds to the attribute automountKey.
221
222 value_attribute
223 The attribute used to identify the value of the map entry. In
224 the nisMap schema this corresponds to the attribute nisMapEntry
225 and in the automountMap schema it corresponds to the attribute
226 automountInformation.
227
228 NOTE: It is essential that entries use class and attribute in a con‐
229 sistent manner for correct operation of autofs. For example mix‐
230 ing cn and automountKey attributes in automount schema will not
231 work as expected.
232
233 auth_conf_file
234 This configuration option may be used to specify an alternate
235 location for the ldap authentication configuration file. See
236 autofs_ldap_auth.conf(5) for more information.
237
239 A number of the amd configuration options are not used by autofs, some
240 because they are not relevant within autofs, some because they are done
241 differently in autofs and others that are not yet implemented.
242
243 Since mount_type is always autofs (because there's no user space NFS
244 server) the configuration entries relating to that aren't used. Also,
245 server availability is done differently within autofs so the options
246 that relate to the amd server monitoring sub-system are also not used.
247
248 These options are mount_type, auto_attrcache, portmap_program,
249 nfs_vers_ping, nfs_allow_any_interface, nfs_allow_insecure_port,
250 nfs_proto, nfs_retransmit_counter, nfs_retransmit_counter_udp,
251 nfs_retransmit_counter_tcp, nfs_retransmit_counter_toplvl,
252 nfs_retry_interval, nfs_retry_interval_udp, nfs_retry_interval_tcp,
253 nfs_retry_interval_toplvl and nfs_vers.
254
255 Other options that are not used within the autofs implementation:
256
257 log_file, truncate_log
258 sends its output to syslog so an alternate log file (or truncat‐
259 ing the log) can't be used.
260
261 print_pid
262 There's no corresponding option for this within autofs.
263
264 use_tcpwrappers, show_statfs_entries
265 There's no user space NFS server to control access to so this
266 option isn't relevant. The show_statfs_entries can't be imple‐
267 mented for the same reason.
268
269 debug_mtab_file
270 There's no user space NFS server and autofs avoids using file
271 based mtab whenever possible.
272
273 sun_map_syntax
274 Sun map format is handled by autofs itself.
275
276 plock, show_statfs_entries, preferred_amq_port
277 Are not supported by autofs.
278
279 ldap_cache_maxmem, ldap_cache_seconds
280 External ldap caching is not used by autofs.
281
282 ldap_proto_version
283 autofs always attempts to use the highest available ldap proto‐
284 col version.
285
286 cache_duration, map_reload_interval, map_options
287 The map entry cache is continually updated and stale entries
288 cleaned on re-load, which is done when map changes are detected
289 so these configuration entries are not used by autofs. An excep‐
290 tion to this is the case where the map is large. In this case it
291 may be necessary to read the whole map at startup even if brows‐
292 ing is not enabled. Adding the cache:=all option to map_options
293 can be used to for this.
294
295 localhost_address
296 This is not used within autofs. This configuration option was
297 only used in the amd user space server code and is not relevant
298 within autofs.
299
300 Options that are handled differently within autofs:
301
302 pid_file
303 To specify a pid file name a command line option must be used on
304 startup.
305
306 print_version
307 Program version and feature information is obtained by using the
308 automount command line option "-V".
309
310 debug_options , log_options
311 autofs has somewhat more limited logging and debug logging
312 options. When the log_options options is encountered it is con‐
313 verted to the nearest matching autofs logging option. Since the
314 configuration option debug_options would be handled the same way
315 it is ignored.
316
317 restart_mounts
318 This option has no sensible meaning within autofs because autofs
319 always tries to re-connect to existing mounts. While this has
320 its own set of problems not re-connecting to existing mounts
321 always results in a non-functional automount tree if mounts were
322 busy at the last shutdown (as is also the case with amd when
323 using mount_type autofs).
324
325 forced_unmounts
326 Detaching mounts often causes serious problems for users of
327 existing mounts. It is used by autofs in some cases, either at
328 the explicit request of the user (with a command line or init
329 option) and in some special cases during program operation but
330 is avoided whenever possible.
331
332 A number of configuration options are not yet implemented:
333
334 search_path
335 Always a little frustrating, the compiled in map location should
336 be used to locate maps but isn't in some cases. This requires
337 work within autofs itself and that will (obviously) include
338 implementing this configuration option for the amd map parser as
339 well.
340
341 fully_qualified_hosts
342 Not yet implemented.
343
344 unmount_on_exit
345 Since autofs always tries to re-connect to mounts left mounted
346 from a previous shutdown this is a sensible option to implement
347 and that will be done.
348
349 browsable_dirs
350 Allow map keys to be shown in directory listings. This option
351 can have values of "yes" or "no". The default is "no". A varia‐
352 tion of this option, "browsable", can be used as a pseudo mount
353 option in type "auto" map entries to provide browsing function‐
354 ality in sub-mounts. The amd "browsable_dirs = full" option can‐
355 not be implemented within the current autofs framework and is
356 not supported.
357
358 exec_map_timeout
359 A timeout is not currently used for program maps but this might
360 be implemented in the future.
361
362 tag
363 The tag option is not implemented within autofs.
364
365 Supported options:
366
367 arch, karch, os, osver
368 These options default to what is returned from uname(2) and can
369 be overridden if required.
370
371 full_os
372 This option has no default and must be set in the configuration
373 if used in maps.
374
375 cluster
376 If not set defaults to the host domain name. This option corre‐
377 sponds to the HP_UX cluster name (according to the amd source)
378 and is probably not used in Linux but is set anyway.
379
380 vendor This option has a default value of "unknown", it must be set in
381 the configuration if used in maps.
382
383 auto_dir
384 Is the base name of the mount tree used for external mounts that
385 are sometimes needed by amd maps. Its default value is "/a".
386
387 map_type
388 Specifies the autofs map source, such as file, nis, ldap etc.
389 and has no default value set.
390
391 map_defaults
392 This option is used to override /defaults entries within maps
393 and can be used to provide different defaults on specific
394 machines without having to modify centrally managed maps. It is
395 empty by default.
396
397 search_path
398 Colon separated paths to search for maps that are not specified
399 as a full path.
400
401 dismount_interval
402 Is equivalent to the autofs timeout option. It is only possible
403 to use this with type "auto" mounts due to the way the autofs
404 kernel module performs expiry. It takes its default value from
405 the autofs internal default of 600 seconds.
406
407 autofs_use_lofs
408 If set to "yes" autofs will attempt to use bind mounts for type
409 "link" entries when possible (default is "yes").
410
411 nis_domain
412 Allows setting of a domain name other than the system default.
413
414 local_domain
415 Is used to override (or set) the host domain name.
416
417 normalize_hostnames
418 If set to "yes" then the contents of ${rhost} is translated in
419 its official host name.
420
421 domain_strip
422 If set to "yes" the domain name part of the host is stripped
423 when normalizing hostnames. This can be useful when using of the
424 same maps in a multiple domain environment.
425
426 normalize_slashes
427 This option is set to "yes" by default and will collapse multi‐
428 ple unescaped occurrences of "/" to a single "/".
429
430 selectors_in_defaults, selectors_on_default
431 This option has a default value of "no". If set to "yes" then
432 any defaults entry will be checked for selectors to determine
433 the values to be used. selectors_in_defaults is the preferred
434 option to use.
435
436 ldap_base
437 iThis option has no default value. It must be set to the base dn
438 that is used for queries if ldap is to be used as a map source.
439
440 ldap_hostports
441 This option has no default value set. It must be set to the URI
442 of the LDAP server to be used for lookups when ldap is used as a
443 map source. It may contain a comma or space separated list of
444 LDAP URIs.
445
446 hesiod_base
447 Sets the base name used for hesiod map sources.
448
449 linux_ufs_mount_type
450 This is an additional configuration option for the autofs amd
451 format parser implementation.
452
453 There's no simple way to determine what the system default
454 filesystem is and am-utils needs to be continually updated to do
455 this and can easily get it wrong ayway. So allow it to be set in
456 the configuration.
457
459 [ autofs ]
460 timeout = 300
461 browse_mode = no
462
463 [ amd ]
464 dismount_interval = 300
465 map_type = nis
466 autofs_use_lofs = no
467
468 [ /expamle/mount ]
469 dismount_interval = 60
470 map_type = file
471
473 automount(8), auto.master(5), autofs_ldap_auth.conf(5).
474
476 This manual page was written by Ian Kent <raven@themaw.net>.
477
478
479
480 23 Jan 2014 AUTOFS.CONF(5)