AUTOFS.CONF(5)
π NAME π
autofs.conf β autofs configuration. and yes bestie, this is the AUTOFS.CONF(5) page from the File Formats Manual, so buckle up π«Ά
β¨ DESCRIPTION β¨
okay so the config settings that automount(8) uses can be changed in the configuration file /etc/autofs.conf. that's the whole vibe π
This file contains two primary sections: autofs and amd. periodt.
Configuration entries may be present at the beginning of the configuration file without a section header and are implicitly included as part of the autofs section. no cap.
Each section name is enclosed in square brackets with spaces between the brackets and the section name. The amd section may be followed by further sections, named by the top level mount point path, that contain per mount configuration settings. iykyk π¦
πΈ SECTION autofs CONFIGURATION OPTIONS πΈ
Configuration settings available are:
open_file_limitβ sets the maximum number of open files. note there may be other limits within the system that prevent this from being set β systemd for example may need a setting in the unit file to increase its default. the autofs default is20480. β¨timeoutβ sets the default mount timeout in seconds. the internal program default is10minutes, but the default installed configuration overrides this and sets the timeout to5minutes to be consistent with earlier autofs releases. π°οΈmaster_waitβ sets the default maximum number of retries (actual iterations is half this, each is delayed by2seconds before retrying) waiting for the master map to become available if it cannot be read at program start (program default10, then continue). this can be longer if the map source itself waits for availability (such assss). π΄negative_timeoutβ sets the default timeout for caching failed key lookups (program default60). if the equivalent command line option is given it will override this setting. πpositive_timeoutβ sets the default timeout for using cached map entries (program default120). if the equivalent command line option is given it will override this setting. πmount_verboseβ use the verbose flag when spawningmount(8), and log some process info about the requestor and its parent (program default"no"). loud and proud π₯mount_waitβ sets the default time to wait for a response from a spawnedmount(8)before sending it aSIGTERM. note that we still need to wait for the RPC layer to timeout before the sub-process exits so this isn't ideal but it is the best we can do. the default is to wait untilmount(8)returns without intervention. πumount_waitβ sets the default time to wait for a response from a spawnedumount(8)before sending it aSIGTERM. note that we still need to wait for the RPC layer to timeout before the sub-process exits so this isn't ideal but it is the best we can do. same energy, different syscall πbrowse_modeβ maps are browsable by default (program default"yes"). πmount_nfs_default_protocolβ sets the default protocol thatmount.nfs(8)uses when performing a mount (program default3). autofs needs to know the default NFS protocol thatmount.nfs(8)uses so it can do special case handling for its availability probe for different NFS protocols. since we can't identify this default automatically we need to set it in the autofs configuration. ngl this one is giving "important little detail" πappend_optionsβ determines whether global options, given on the command line or per mount in the master map, are appended to map entry options or if the map entry options replace the global options (program default"yes", append options). βloggingβ sets default log level"none","verbose"or"debug"(program default"none"). pick your fighter πforce_standard_program_map_envβ override the use of a prefix with standard environment variables when a program map is executed. since program maps are run as the privileged user, setting these standard environment variables opensautomount(8)to potential user privilege escalation when the program map is written in a language that can load components from, for example, a user home directory (program default"no"). be careful with this one bestie, it's literally a privilege escalation warning π¨map_hash_table_sizeβ this configuration option may be used to change the number of hash table slots (default1024). this configuration option affects the overhead of searching the map entry cache for map entries when there are a large number of entries. it affects the number of entries that must be looked at to locate a map entry in the map entry cache. for example, the default of1024and a direct map with8000entries would result in each slot containing an average of8entries, which should be acceptable. however, if excessive CPU usage is observed during automount lookups increasing this option can reduce the CPU overhead considerably because it reduces the length of the search chains. note that the number of entries in a map doesn't necessarily relate to the number of entries used in the map entry cache. there are two distinct cases where the map hash table can make a significant difference: direct maps and indirect maps that use the"browse"option. for indirect maps that do not use the"browse"option entries are added to the map entry cache at lookup so the number of active cache entries, in this case, is usually much less than the number of entries in the map. in this last case it would be unusual for the map entry cache to grow large enough to warrant increasing the default before an event that cleans stale entries, a map re-read for example. π§ big brain option tbhuse_hostname_for_mountsβ NFS mounts where the host name resolves to more than one IP address are probed for availability and to establish the order in which mounts to them should be tried. to ensure that mount attempts are made only to hosts that are responding and are tried in the order of hosts with the quickest response the IP address of the host needs to be used for the mount. if it is necessary to use the hostname given in the map entry for the mount regardless, then set this option to"yes". be aware that if this is done there is no defense against the host name resolving to one that isn't responding and while the number of attempts at a successful mount will correspond to the number of addresses the host name resolves to the order will also not correspond to fastest responding hosts. π«Άdisable_not_found_messageβ the original request to add this log message needed it to be unconditional. that produces, IMHO, unnecessary noise in the log so a configuration option has been added to provide the ability to turn it off. the default is"no"to maintain the current behaviour. πuse_ignore_mount_optionβ an option to enable the use of autofs pseudo option"disable". this option is used as a hint to user space that the mount entry should be omitted from mount table listings. the default is"no"to avoid unexpected changes in behaviour and so is an opt-in setting. πΈsss_master_map_waitβ set the time to wait and retry ifsssdis unable to read the master map at program start. program default is0(don't wait) or10ifssssupports returningEHSTDOWNwhen the provider isn't available. if thessslibrary supports returningEHOSTDOWNwhen the provider is down then this value is how long to wait between retries reading the master map. when reading dependent maps or looking up a map key this value is multiplied by the number of retries that would be used when reading the master map. π΄use_mount_request_log_idβ set whether to use a mount request log id so that log entries for specific mount requests can be easily identified in logs that have multiple concurrent requests. default is don't use mount request log ids. π
π¦ LDAP Configuration π¦
Configuration settings available are:
ldap_timeoutβ set the network response timeout (default8). set timeout value for the synchronous API calls. the default is the LDAP library default of an infinite timeout. yes both of those defaults are in here, don't come for me πldap_network_timeoutβ set the network response timeout (default8). β±οΈldap_uriβ a space separated list of server uris of the form<proto>://<server>[/]where<proto>can beldaporldaps. the option can be given multiple times. map entries that include a server name override this option and it is then not used. default is an empty list in which case either the server given in a map entry or the LDAP configured default is used. this uri list is read at startup and whenever the daemon receives aHUPsignal. this configuration option can also be used to request autofs lookup SRV RRs for a domain of the form<proto>:///[<domain dn>]. note that a trailing/is not allowed when using this form. if the domain dn is not specified the dns domain name (if any) is used to construct the domain dn for the SRV RR lookup. the server list returned from an SRV RR lookup is refreshed according to the minimum ttl found in the SRV RR records or after one hour, whichever is less. πsearch_baseβ the base dn to use when searching for a map base dn. this entry may be given multiple times and each will be checked for a map base dn in the order they occur in the configuration. the search base list is read at startup and whenever the daemon receives aHUPsignal. πmap_object_classβ the map object class. in thenisMapschema this corresponds to the classnisMapand in theautomountMapschema it corresponds to the classautomountMap. ποΈentry_object_classβ the map entry object class. in thenisMapschema this corresponds to the classnisObjectand in theautomountMapschema it corresponds to the classautomount. πmap_attributeβ the attribute used to identify the name of the map to which this entry belongs. in thenisMapschema this corresponds to the attributenisMapNameand in theautomountMapschema it corresponds to the attributeouorautomountMapName. πentry_attributeβ the attribute that IDs a map key. InnisMapschema itβscn; inautomountMapschema itβsautomountKey. πvalue_attributeβ the attribute that IDs the value of the map entry. InnisMapschema itβsnisMapEntry; inautomountMapschema itβsautomountInformation. π―
β οΈ NOTE: entries must useclassand attribute consistently for autofs to work correctly. MixingcnandautomountKeyattributes in automount schema? Yeah, that will not work as expected. No cap. π
auth_conf_fileβ lets you set an alternate location for the ldap authentication configuration file. Peepautofs_ldap_auth.conf(5)for more. π
π SECTION amd CONFIGURATION OPTIONS π
Okay so some amd options are just not used by autofs. Some arenβt relevant inside autofs, some are done differently in autofs, and others are not yet implemented. Itβs giving βamd vibes, autofs rules.β π
Because mount_type is always autofs (thereβs no user space NFS server), the config entries relating to that arenβt used. Also, server availability is done differently within autofs, so options that relate to the amd server monitoring sub-system are also not used. π«
These options are mount_type, auto_attrcache, portmap_program, nfs_vers_ping, nfs_allow_any_interface, nfs_allow_insecure_port, nfs_proto, nfs_retransmit_counter, nfs_retransmit_counter_udp, nfs_retransmit_counter_tcp, nfs_retransmit_counter_toplvl, nfs_retry_interval, nfs_retry_interval_udp, nfs_retry_interval_tcp, nfs_retry_interval_toplvl and nfs_vers. π«
Other options that are not used within the autofs implementation:
log_file,truncate_logβ autofs sends its output to syslog, so an alternate log file (or truncating the log) canβt be used. πprint_pidβ thereβs no corresponding option for this within autofs. π«use_tcpwrappers,show_statfs_entriesβ thereβs no user space NFS server to control access to, so this option isnβt relevant.show_statfs_entriescanβt be implemented for the same reason. πdebug_mtab_fileβ thereβs no user space NFS server, and autofs avoids using file-based mtab whenever possible. πsun_map_syntaxβ Sun map format is handled by autofs itself. βοΈplock,show_statfs_entries,preferred_amq_portβ not supported by autofs. πldap_cache_maxmem,ldap_cache_secondsβ external ldap caching is not used by autofs. π§ldap_proto_versionβ autofs always attempts to use the highest available ldap protocol version. πcache_duration,map_reload_interval,map_optionsβ the map entry cache is continually updated and stale entries are cleaned on re-load, which happens when map changes are detected, so these config entries are not used by autofs. Small exception: if the map is large, it may be necessary to read the whole map at startup even if browsing is not enabled. Adding thecache:=alloption tomap_optionscan be used for this. ποΈlocalhost_addressβ not used within autofs. This config option was only used in the amd user space server code and is not relevant within autofs. π
Options that are handled differently within autofs:
pid_fileβ to specify a pid file name, a command line option must be used on startup. πΎprint_versionβ program version and feature information is obtained by using theautomountcommand line option"-V". βΉοΈdebug_options,log_optionsβ autofs has somewhat more limited logging and debug logging options. When thelog_optionsoption is encountered it is converted to the nearest matching autofs logging option. Since the config optiondebug_optionswould be handled the same way, it is ignored. πͺ΅restart_mountsβ this option has no sensible meaning within autofs because autofs always tries to re-connect to existing mounts. While this has its own set of problems, not re-connecting to existing mounts always results in a non-functional automount tree if mounts were busy at the last shutdown (as is also the case with amd when usingmount_type autofs). πforced_unmountsβ detaching mounts often causes serious problems for users of existing mounts. It is used by autofs in some cases, either at the explicit request of the user (with a command line or init option) and in some special cases during program operation, but it is avoided whenever possible. β οΈ
A number of configuration options are not yet implemented:
search_pathβ always a little frustrating: the compiled-in map location should be used to locate maps but isnβt in some cases. This requires work within autofs itself, and that will (obviously) include implementing this config option for the amd map parser as well. πfully_qualified_hostsβ not yet implemented. πunmount_on_exitβ since autofs always tries to re-connect to mounts left mounted from a previous shutdown, this is a sensible option to implement, and that will be done. πͺbrowsable_dirsβ allow map keys to be shown in directory listings. This option can have values of"yes"or"no". The default is"no". A variation of this option,"browsable", can be used as a pseudo mount option in type"auto"map entries to provide browsing functionality in sub-mounts. The amd"browsable_dirs = full"option cannot be implemented within the current autofs framework and is not supported. πexec_map_timeoutβ a timeout is not currently used for program maps, but this might be implemented in the future. β³tagβ the tag option is not implemented within autofs. π·οΈ
Supported options:
arch,karch,os,osverβ these options default to what is returned fromuname(2)and can be overridden if required. π₯οΈfull_osβ this option has no default and must be set in the configuration if used in maps. βοΈclusterβ if not set, defaults to the host domain name. This option corresponds to the HP_UX cluster name (according to the amd source) and is probably not used in Linux but is set anyway. ποΈvendorβ this option has a default value of"unknown"; it must be set in the configuration if used in maps. π·οΈauto_dirβ the base name of the mount tree used for external mounts that are sometimes needed by amd maps. Its default value is"/a". πmap_typeβ specifies the autofs map source, such asfile,nis,ldapetc., and has no default value set. πΊοΈmap_defaultsβ used to override/defaultsentries within maps and can be used to provide different defaults on specific machines without having to modify centrally managed maps. It is empty by default. π§©search_pathβ colon separated paths to search for maps that are not specified as a full path. πdismount_intervalβ equivalent to the autofs timeout option. It is only possible to use this with type"auto"mounts due to the way the autofs kernel module performs expiry. It takes its default value from the autofs internal default of 600 seconds. β±οΈautofs_use_lofsβ if set to"yes", autofs will attempt to use bind mounts for type"link"entries when possible (default is"yes"). πnis_domainβ allows setting of a domain name other than the system default. πlocal_domainβ used to override (or set) the host domain name. π‘normalize_hostnamesβ if set to"yes", then the contents of${rhost}is translated in its official host name. β¨domain_stripβ if set to"yes", the domain name part of the host is stripped when normalizing hostnames. This can be useful when using the same maps in a multiple domain environment. βοΈnormalize_slashesβ this option is set to"yes"by default and will collapse multiple unescaped occurrences of"/"to a single"/". πͺselectors_in_defaults,selectors_on_defaultβ this option has a default value of"no". If set to"yes", then any defaults entry will be checked for selectors to determine the values to be used.selectors_in_defaultsis the preferred option to use. ποΈldap_baseβ this option has no default value. It must be set to the base dn that is used for queries if ldap is to be used as a map source. π§±ldap_hostportsβ this option has no default value set. It must be set to the URI of the LDAP server to be used for lookups when ldap is used as a map source. It may contain a comma or space separated list of LDAP URIs. π°οΈhesiod_baseβ sets the base name used for hesiod map sources. πlinux_ufs_mount_typeβ an additional configuration option for the autofs amd format parser implementation. Thereβs no simple way to determine what the system default filesystem is, and am-utils needs to be continually updated to do this and can easily get it wrong anyway. So allow it to be set in the configuration. π§
π EXAMPLE π
[ autofs ]
timeout = 300
browse_mode = no
[ amd ]
dismount_interval = 300
map_type = nis
autofs_use_lofs = no
[ /expamle/mount ]
dismount_interval = 60
map_type = file
π SEE ALSO π
automount(8), auto.master(5), autofs_ldap_auth.conf(5).
βοΈ AUTHOR βοΈ
This manual page was written by Ian Kent <raven@themaw.net>. π«Ά
Thatβs the AUTOFS.CONF(5) manual page, bestie. Footer date: 23 Jan 2014. Stay mounted and stay iconic. π
β¨
π¦ where this page comes from
- centos-stream 10: autofs 1:5.1.9-15.el10 Β· GPL-2.0-or-later
- fedora 43: autofs 1:5.1.9-10.fc43 Β· GPL-2.0-or-later
- fedora 44: autofs 1:5.1.9-12.fc44 Β· GPL-2.0-or-later
- nixos 26.05: autofs 5.1.9
- nixpkgs unstable: autofs 5.1.9
- opensuse-leap 16.0: autofs 5.1.9-160000.4.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: autofs 5.1.9-160000.4.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: autofs 5.1.9-160000.4.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: autofs 5.1.9-160000.4.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms