AMD.CONF(5)
π amd.conf β the Amd configuration file π
hey bestie!! you clicked into AMD.CONF(5) and honestly? iconic choice π this is the whole vibe of amd.conf, and i'm gonna walk you through every last bit of it. grab a snack π
β¨ NAME β¨
amd.conf β Amd configuration file πΈ
β¨ SYNOPSIS β¨
amd.conf
β¨ DESCRIPTION β¨
the amd.conf file is the configuration file for Amd, as part of the am-utils suite π«Ά
amd.conf contains runtime configuration information for the Amd automounter program β¨ no cap.
π FILE FORMAT π
okay so the file is made of sections and parameters, that's the whole structure π
a section begins with the name of the section in square brackets and just keeps going until the next section starts, or until you hit the end of the file. sections contain parameters shaped like name = value.
the file is line-based β meaning every newline-terminated line is either a comment, a section name, or a parameter. there is no line-continuation syntax, so don't try it π
section names, parameter names and their values are all case sensitive, fr fr.
only the first equals sign in a parameter matters. whitespace before or after that first equals sign gets discarded. leading, trailing and internal whitespace in section and parameter names is irrelevant. leading and trailing whitespace in a parameter value is discarded. internal whitespace inside a parameter value is not allowed β unless the whole parameter value is wrapped in double quotes, like name = "some value" β¨
any line starting with a pound sign (#) is ignored, and so are lines that are nothing but whitespace πΈ
the values after the equals sign are all either:
- a string β no quotes needed if the string doesn't include spaces, or
- a boolean, which you can give as
yes/no.
case is significant in all values, bestie. and some items, like cache timeouts, are numeric π’
ποΈ SECTIONS ποΈ
π The [global] section
parameters in here either apply to Amd as a whole, or to every regular map section that follows it. there should be only one global section defined in one configuration file π
it is highly recommended that this section be specified first in the configuration file. if it isn't, then the regular map sections that come before it will not use the global values defined later. so like, put it first. periodt π
πΊοΈ Regular [/map] sections
parameters in regular (non-global) sections apply to a single map entry. for example, if the map section [/homes] is defined, then all parameters following it get applied to the /homes Amd-managed mount point π¦
ποΈ PARAMETERS ποΈ
π Parameters common to all sections
these parameters can go either in the global section or in a map-specific section. entries in a map-specific section override the default value, or whatever was defined in the global section π and if a common parameter is only specified in the global section, it applies to all the regular map sections that follow it.
browsable_dirs(string, default=no) β if"yes", then Amd's top-level mount points will be browsable toreaddir(3)calls π meaning you could run, for example,ls(1)and see what keys are available to mount in that directory. but not all entries get made visible toreaddir(3): the"/default"entry, wildcard entries, and those with a"/"in them are not included. if you specify"full"to this option, all but"/default"will be visible. note that if you run a command which will attempt tostat(2)the entries β like what often happens with"ls -l"or"ls -F,"β Amd will attempt to mount every entry in that map π this is often called a ``mount storm.''map_defaults(string, default to empty) β this option sets a string to be used as the map's/defaultsentry, overriding any/defaultsspecified in the map. this lets local users override map defaults without modifying maps globally πmap_options(string, default no options) β this option is the same as specifying map options on the command line to Amd, such as"cache:=all"β¨map_type(string, default search all map types) β if specified, Amd will initialize the map only for the type given. this is useful to avoid the default map search type used by Amd, which takes longer and can have undesired side-effects such as initializing NIS even if it's not used π possible values are:execβ executable mapsfileβ plain fileshesiodβ Hesiod name service from MITldapβ Lightweight Directory Access Protocolndbmβ (New) dbm style hash filesnisβ Network Information Services (version 2)nisplusβ Network Information Services Plus (version 3)passwdβ local password filesunionβ union maps
mount_type(string, default=nfs) β all Amd mount types default to NFS. that is, Amd is an NFS server on the map mount points, for the local host it is running on. if"autofs"is specified, Amd will be an autofs server for those mount points πautofs_use_lofs(string, default=yes) β when set to"yes"and using Autofs, Amd will use lofs-type (loopback) mounts fortype:=linkmounts. this has the advantage of mounting in place, and users get to see the same pathname that theychdir'ed into π if this option is set to"no,"then Amd will use symlinks instead: that code is more tested, but it negates autofs's big advantage of in-place mounts πsearch_path(string, default no search path) β this provides a (colon-delimited) search path for file maps. using a search path, sites can allow for local map customizations and overrides, and can distributed maps in several locations as needed πΊοΈselectors_in_defaults(boolean, default=no) β if"yes,"then the/defaultsentry of maps will search for and process any selectors before setting defaults for all other keys in that map. useful when you want to set different options for a whole map based on some parameters. for example, you may want to better the NFS performance over slow slip-based networks as follows:
/defaults \
wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \
wire!=slip-net;opts:=intr,rsize=8192,wsize=8192
deprecated form: selectors_on_default β οΈ
sun_map_syntax(boolean, default=no) β if"yes,"then Amd will parse the map according to the Sun Automount syntax βοΈ
π₯ Parameters applicable to the global section only
arch(string, default to compiled in value) β same as the-Aoption to Amd. lets you override the value of thearchAmd variable πauto_attrcache(numeric, default=0) β specify in seconds (or units of 0.1 seconds, depending on the OS), what is the (kernel-side) NFS attribute cache timeout for Amd's own automount points. a value of0is supposed to turn off attribute caching, meaning that Amd will be consulted via a kernel-RPC each time someonestat()'s the mount point (which could be abused as a denial-of-service attack) π± warning: some OSs are incapable of turning off the NFS attribute cache reliably. on such systems, Amd may not work reliably under heavy load. see theREADME.attrcachedocument in the Am-utils distribution for more details πauto_dir(string, default=/a) β same as the-aoption to Amd. this sets the private directory where Amd will create sub-directories for its real mount points ποΈcache_duration(numeric, default=300) β same as the-coption to Amd. sets the duration in seconds that looked-up or mounted map entries remain in the cache β³cluster(string, default no cluster) β same as the-Coption to Amd. specifies the alternate HP-UX cluster to use π₯οΈdebug_mtab_file(string, default=/tmp/mnttab) β path to mtab file that is used by Amd to store a list of mounted file systems during debug-mtab mode. this option only applies to systems that store mtab information on disk πΎdebug_options(string, default no debug options) β same as the-Doption to Amd. specify any debugging options for Amd. it works only if am-utils was configured for debugging using the--enable-debugoption. the"mem"option, as well as all other options, can be turned on via--enable-debug=mem. otherwise debugging options are ignored π options are comma delimited, and can be preceded by the string"no"to negate their meaning. you can get the list of supported debugging options by runningAmd -H. possible values are:allβ all options (excludeshrtimeandmtab)defaultsβ "sensible" default options (all--excluding hrtime, mtab, and xdrtrace)testβ full debug options plus mtab,nodaemon,nofork,noamqamqβ register for amqdaemonβ enter daemon modeforkβ fork serverfullβ program tracehrtimeβ print high resolution time stamps (only ifsyslog(3)is not used)infoβ info service specific debugging (hesiod, nis, etc.)memβ trace memory allocationsmtabβ use local"/tmp/mtab"filereaddirβ show browsable_dirs progressstrβ debug string mungingtraceβ trace protocol and NFS mount argumentsxdrtraceβ trace XDR routines
dismount_interval(numeric, default=120) β same as the-woption to Amd. specify in seconds, the time between attempts to dismount file systems that have exceeded their cached times β°domain_strip(boolean, default=yes) β if"yes,"then the domain name part referred to by${rhost}is stripped off. this is useful to keep logs and smaller. if"no,"then the domain name part is left changed. this is useful when using multiple domains with the same maps (as you may have hosts whose domain-stripped name is identical) πexec_map_timeout(numeric, default=10) β the timeout in seconds that Amd will wait for an executable map program before an answer is returned from that program (or script). this value should be set to as small as possible while still allowing normal replies to be returned before the timer expires, because during the time that the executable map program is queried, Amd is essentially waiting and is thus not responding to any other queries πforced_unmounts(boolean, default=no) β if set to"yes,"and the client OS supports forced or lazy unmounts, then Amd will attempt to use them if it gets any of three serious error conditions when trying to unmount an existing mount point or mount on top of one:EIO,ESTALE, orEBUSYπ
This could be useful to recover from serious conditions such as hardware failure of mounted disks, or NFS servers which are down permanently, were migrated, or changed their IP address. Only type:=toplvl mounts hung with EBUSY are forcibly unmounted using this option, which is useful to recover from a hung Amd π
full_os(string, default to compiled in value) β the full name of the operating system, plus its version π lets you override the compiled-in full name and version. Iconic when the compiled-in name is justβ¦ not it. For example, the full operating system name on linux comes up aslinux'', but you can override it tolinux-2.2.5.''fully_qualified_hosts(string, default=no) β if it's "yes," then Amd does its RPC authentication using fully-qualified host names β¨ this is necessary for some systems, and especially when you're doing cross-domain mounting. For this function to work, the Amd variable${hostd}is used, which requires that${domain}not be null π«Άhesiod_base(string, default=automount) β specify the base name for hesiod maps πΈkarch(string, default to karch of the system) β same as the-koption to Amd. Lets you override the kernel-architecture of your system π lowkey so useful on Sun (Sparc) machines, where you can build one Amd binary, and run it on multiple machines, yet you want each one to get the correctkarchvariable set (for example,sun4c,sun4m,sun4u, etc.). Note that if not specified, Amd will useuname(3)to figure out the kernel architecture of the machine πldap_base(string, default not set) β specify the base name for LDAP π this often includes LDAP-specific values such as country and organization.ldap_cache_maxmem(numeric, default=131072) β the maximum memory Amd should use to cache LDAP entries πldap_cache_seconds(numeric, default=0) β the number of seconds to keep entries in the cache βldap_hostports(string, default not set) β specify the LDAP host and port values π¦ldap_proto_version(numeric, default=2) β specify the version of the LDAP protocol to use πlocal_domain(string, default no sub-domain) β same as the-doption to Amd. Specify the local domain name πΈ if this option isn't given, the domain name is determined from the hostname, by removing the first component of the fully-qualified host name.localhost_address(string, default to localhost or 127.0.0.1) β the name or IP address Amd should use when connecting the sockets for the local NFS server and the RPC server π this defaults to127.0.0.1or whatever the host reports as its local address. Super handy on hosts with multiple addresses where you want to force Amd to connect to a specific address β¨log_file(string, default=/dev/stderr) β same as the-loption to Amd. Specify a file name to log Amd events to π«Ά if the string/dev/stderris specified, Amd will send its events to the standard error file descriptor. If the stringsyslogis given, Amd will record its events with the system loggersyslogd(8)π the default syslog facility used isLOG_DAEMON. If you wish to change it, append its name to the log file name, delimited by a single colon. For example, if logfile is the stringsyslog:local7then Amd will log messages viasyslog(3)using theLOG_LOCAL7facility (if it exists on the system) π₯log_options(string, default=defaults) β same as the-xoption to Amd. Specify any logging options for Amd π options are comma delimited, and can be preceded by the string "no" to negate their meaning. Thedebuglogging option is only available if am-utils was configured with--enable-debug. You can get the list of supported debugging and logging options by runningamd -Hπ possible values are:allβ all messagesdefaultsβ default messages (fatal,error,user,warning,info)debugβ debug messageserrorβ non-fatal system errors (cannot be turned off)fatalβ fatal errors (cannot be turned off)infoβ informationmapβ map errorsstatsβ additional statistical informationuserβ non-fatal user errorswarnβ warningswarningβ warnings
map_reload_interval(numeric, default=3600) β the number of seconds Amd waits before it checks whether any maps have changed at their source (NIS servers, LDAP servers, files, etc.) π¦ Amd will reload only those maps that have changed πnfs_allow_any_interface(string, default=no) β normally Amd accepts local NFS packets only from127.0.0.1. If this parameter is set to "yes" then Amd will accept local NFS packets from any local interface π³ this is useful on hosts that may have multiple interfaces where the system is forced to send all outgoing packets (even those bound to the same host) via an address other than127.0.0.1.nfs_allow_insecure_port(string, default=no) β normally Amd refuses requests coming from unprivileged ports (i.e. ports >= 1024 on Unix systems), so that only privileged users and the kernel can send NFS requests to it π«Ά however, some kernels (certain versions of Darwin, MacOS X, and Linux) have bugs that cause them to use unprivileged ports in certain situations, which causes Amd to stop dead in its tracks π this parameter lets Amd operate normally even on such systems, at the expense of a slight decrease in the security of its operations. If you see messages like "ignoring request from foo:1234, port not reserved" in your Amd log, try enabling this parameter and give it another go β¨nfs_proto(string, default to trying version tcp then udp) β by default, Amd tries TCP and then UDP. This option forces the overall NFS protocol used to TCP or UDP π₯ it overrides what's in the Amd maps, and is useful when Amd is compiled with NFSv3 support that may not be stable. With this option you can turn off the complete usage of NFSv3 dynamically (without having to recompile Amd) until such time as NFSv3 support is desired again πnfs_retransmit_counter(numeric, default=11) β same as the retransmit part of the-ttimeout.retransmit option to Amd. Specifies the number of NFS retransmissions that the kernel will use to communicate with Amd πΈnfs_retransmit_counter_udp(numeric, default=11) β same as thenfs_retransmit_counteroption, but for all UDP mounts only πnfs_retransmit_counter_tcp(numeric, default=11) β same as thenfs_retransmit_counteroption, but for all TCP mounts only πnfs_retransmit_counter_toplvl(numeric, default=11) β same as thenfs_retransmit_counteroption, but only for Amd's top-level UDP mounts βnfs_retry_interval(numeric, default=8) β same as the timeout part of the-ttimeout.retransmit option to Amd. Specifies the NFS timeout interval, in tenths of seconds, between NFS/RPC retries (for UDP and TCP) π«Ά this is the value that the kernel will use to communicate with Amd.
Amd relies on the kernel RPC retransmit mechanism to trigger mount retries. The values of the nfs_retransmit_counter and the nfs_retry_interval parameters change the overall retry interval π too long an interval gives poor interactive response; too short an interval causes excessive retries.
nfs_retry_interval_udp(numeric, default=8) β same as thenfs_retry_intervaloption, but for all UDP mounts only π¦nfs_retry_interval_tcp(numeric, default=8) β same as thenfs_retry_intervaloption, but for all TCP mounts only πnfs_retry_interval_toplvl(numeric, default=8) β same as thenfs_retry_intervaloption, but only for Amd's top-level UDP mounts β¨nfs_vers(numeric, default to trying version 3 then 2) β by default, Amd tries version 3 and then version 2. This option forces the overall NFS protocol used to version 3 or 2 π₯ it overrides what's in the Amd maps, and is useful when Amd is compiled with NFSv3 support that may not be stable. With this option you can turn off the complete usage of NFSv3 dynamically (without having to recompile Amd) until such time as NFSv3 support is desired again πnis_domain(string, default to local NIS domain name) β same as the-yoption to Amd. Specify an alternative NIS domain from which to fetch the NIS maps π the default is the system domain name. This option is ignored if NIS support is not available πnormalize_hostnames(boolean, default=no) β same as the-noption to Amd. If "yes," then the name referred to by${rhost}is normalized relative to the host database before being used π the effect is to translate aliases into ``official'' names.normalize_slashes(boolean, default=yes) β if "yes," then Amd will condense all multiple ``/'' (slash) characters into one and remove all trailing slashes π if "no," then Amd will not touch strings that may contain repeated or trailing slashes. The latter is sometimes useful with SMB mounts, which often require multiple slash characters in pathnames π¦os(string, default to compiled in value) β same as the-Ooption to Amd. Lets you override the compiled-in name of the operating system π useful when the built-in name isn't desired for backward compatibility reasons. For example, if the built in name issunos5'', you can override it tosos5'', and use older maps which were written with the latter in mind πosver(string, default to compiled in value) β same as the-ooption to Amd. Overrides the compiled-in version number of the operating system β useful when the built in version isn't desired for backward compatibility reasons. For example, if the build in version is2.5.1'', you can override it to5.5.1'', and use older maps that were written with the latter in mind πΈpid_file(string, default=/dev/stdout) β bestie, this is where you tell Amd to stash the process ID of the running daemon. Don't specify it and Amd just prints its process id onto the standard output, easy peasy. It's super useful for killing Amd after it's been running. Fun lil fact: you can also grab the PID of a running Amd withamq -p. Heads up tho β this file only gets used if theprint_pidoption is on. πplock(boolean, default=yes) β same energy as the-Soption to Amd. Set it to"yes"and Amd locks its own running executable pages into memory. The way this works: on systems that support theplock(3)ormlockall(2)call, Amd can lock its process into memory, which means there's less chance the operating system will schedule, page out, and swap the Amd process as needed. Performance go brrr, but at a cost β it reserves the memory the Amd process uses, so that memory is unavailable for other processes. Trade-offs, we love them. β¨portmap_program(numeric, default=300019) β pick an alternate Port-mapper RPC program number instead of the official one. Obsessed with this one for running multiple Amd processes at once β like, you can run another Amd in"test"mode without affecting the primary Amd process in any way. π¦ For safety reasons the alternate program numbers you can specify must be in the range300019-300029, inclusive. Amq has an option-Pfor specifying an alternate program number of an Amd to contact, so amq can fully control any number of Amd processes running on the same host. Iconic.preferred_amq_port(numeric, default=0) β set an alternate Port-mapper RPC port number for Amd's Amq service. Used for both UDP and TCP, no cap. Setting this to0(or just not defining it) makes Amd pick an arbitrary port number. Setting the Amq RPC service port to a specific number is so useful in firewalled or NAT'ed environments, where you literally need to know which port Amd will listen on. π₯print_pid(boolean, default=no) β same as the-poption to Amd. If"yes", Amd prints its process ID upon starting. Simple. Clean. πprint_version(boolean, default=no) β same as the-voption to Amd, except the version prints and Amd continues to run. If"yes", Amd prints its version information string, which includes some configuration and compilation values. πrestart_mounts(boolean, default=no) β same as the-roption to Amd. If"yes", Amd scans the mount table to figure out which file systems are currently mounted, and whenever one of those would have been auto-mounted, Amd inherits it. πshow_statfs_entries(boolean, default=no) β if"yes", then all maps which are browsable will also show the number of entries (keys) they have when"df"runs. (This is accomplished by returning non-zero values to thestatfs(2)system call.) Ngl, kind of a flex. πtruncate_log(boolean, default=no) β if"yes", then the log file (if it is a regular file) will be truncated upon startup. Fresh start energy. π§unmount_on_exit(boolean, default=no) β if"yes", then Amd will attempt to unmount all file systems which it knows about. Normally Amd leaves all (esp. NFS) mounted file systems intact. Careful tho β Amd does not know about file systems mounted before it starts up, unless therestart_mountsoption or-rflag are used. πuse_tcpwrappers(boolean, default=yes) β if"yes", then Amd will use thetcpd/librwaptcpwrappers library (if available) to control access to Amd via the/etc/hosts.allowand/etc/hosts.denyfiles. Gatekeeping, but make it config files. πͺvendor(string, default to compiled in value) β the name of the vendor of the operating system. Overrides the compiled-in vendor name. Useful when the compiled-in name is not desired β for example, most Intel based systems set the vendor name tounknown'', but you can set it toredhat.'' Fr fr, rename yourself. π
π Parameters applicable to regular map sections π
map_name(string, must be specified) β name of the map where the keys are located. Required, no skipping. βtag(string, default no tag) β each map entry in the configuration file can be tagged. If no tag is specified, that map section will always be processed by Amd. If it is specified, then Amd will process the map if the-Toption was given to Amd, and the value given to that command-line option matches that in the map section. Matchy matchy. π
πΈ EXAMPLES πΈ
Here is a real Amd configuration file I use daily.
# GLOBAL OPTIONS SECTION
[ global ]
normalize_hostnames = no
print_pid = no
restart_mounts = yes
auto_dir = /n
log_file = /var/log/amd
log_options = all
#debug_options = all
plock = no
selectors_in_defaults = yes
# config.guess picks up "sunos5" and I don't want to edit my maps yet
os = sos5
# if you print_version after setting up "os," it will show it.
print_version = no
map_type = file
search_path = /etc/amdmaps:/usr/lib/amd:/usr/local/AMD/lib
browsable_dirs = yes
# DEFINE AN AMD MOUNT POINT
[ /u ]
map_name = amd.u
[ /proj ]
map_name = amd.proj
[ /src ]
map_name = amd.src
[ /misc ]
map_name = amd.misc
[ /import ]
map_name = amd.import
[ /tftpboot/.amd ]
tag = tftpboot
map_name = amd.tftpboot
β¨ SEE ALSO β¨
amd(8),amq(8),ctl-amd(8),automount(8),hosts_access(5).- ``am-utils''
info(1)entry. π - Linux NFS and Automounter Administration by Erez Zadok, ISBN
0-7821-2739-8, (Sybex, 2001). http://www.am-utils.orgπ- Amd - The 4.4 BSD Automounter
π AUTHORS π
Erez Zadok <ezk@cs.sunysb.edu>, Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
Other authors and contributors to am-utils are listed in the AUTHORS file distributed with am-utils. π«Ά
And that's the whole page, bestie β this version's from 7 August 1997, page AMD.CONF(5). Go forth and automount, you absolute main character. ππ¦
π¦ where this page comes from
- fedora 43: am-utils 5:6.2.0-61.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: am-utils 5:6.2.0-61.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: am-utils 5:6.2.0-63.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: am-utils 5:6.2.0-63.fc44 Β· LicenseRef-Callaway-BSD
- Copyright (c) 1997-2014 Erez Zadok
- Copyright (c) 1990 Jan-Simon Pendry
- Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- Copyright (c) 1990 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms