2 .\" Copyright (c) 1997-2014 Erez Zadok
3 .\" Copyright (c) 1990 Jan-Simon Pendry
4 .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 .\" Copyright (c) 1990 The Regents of the University of California.
6 .\" All rights reserved.
8 .\" This code is derived from software contributed to Berkeley by
9 .\" Jan-Simon Pendry at Imperial College, London.
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\" notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\" notice, this list of conditions and the following disclaimer in the
18 .\" documentation and/or other materials provided with the distribution.
19 .\" 3. Neither the name of the University nor the names of its contributors
20 .\" may be used to endorse or promote products derived from this software
21 .\" without specific prior written permission.
23 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .\" File: am-utils/scripts/amd.conf.5
52 file is the configuration file for
54 as part of the am-utils suite.
59 contains runtime configuration information for the
63 The file consists of sections and parameters.
64 A section begins with the
65 name of the section in square brackets and continues until the next section
66 begins or the end of the file is reached.
67 Sections contain parameters of the
69 .Dq Ar name No = Ar value .
71 The file is line-based \[em] that is, each newline-terminated line represents
72 either a comment, a section name or a parameter.
76 Section, parameter names and their values are case sensitive.
78 Only the first equals sign in a parameter is significant.
80 or after the first equals sign is discarded.
82 internal whitespace in section and parameter names is irrelevant.
84 and trailing whitespace in a parameter value is discarded.
86 whitespace within a parameter value is not allowed, unless the whole
87 parameter value is quoted with double quotes as in
88 .Dq Ar name No = Qq Li "some\ value" .
90 Any line beginning with a pound sign (#) is ignored, as are lines containing
93 The values following the equals sign in parameters are all either a string
94 (no quotes needed if string does not include spaces) or a boolean, which may
97 Case is significant in all values.
99 cache timeouts are numeric.
101 .Ss "The [global] section"
102 Parameters in this section either apply to
104 as a whole, or to all other
105 regular map sections which follow.
106 There should be only one global section
107 defined in one configuration file.
109 It is highly recommended that this section be specified first in the
111 If it is not, then regular map sections which precede
112 it will not use global values defined later.
113 .Ss "Regular [/map] sections"
114 Parameters in regular (non-global) sections apply to a single map entry.
115 For example, if the map section
117 is defined, then all parameters following it will be applied to the
120 -managed mount point.
122 .Ss "Parameters common to all sections"
123 These parameters can be specified either in the global or a map specific
125 Entries specified in a map-specific section override the default
126 value or one defined in the global section.
127 If such a common parameter is
128 specified only in the global section, it is applicable to all regular map
129 sections that follow.
131 .It Va browsable_dirs Pq string, default=no
136 top-level mount points will be browsable to
139 This means you could run for example
141 and see what keys are available to mount in that directory.
147 entry, wildcard entries, and those with a
149 in them are not included.
152 to this option, all but
155 Note that if you run a command which will attempt to
157 the entries, such as often done by
162 will attempt to mount
165 This is often called a
167 .It Va map_defaults Pq string, default no empty
168 This option sets a string to be used as the map's /defaults entry,
169 overriding any /defaults specified in the map.
170 This allows local users to
171 override map defaults without modifying maps globally.
172 .It Va map_options Pq string, default no options
173 This option is the same as specifying map options on the command line to
176 .Dq Li "cache:=all" .
177 .It Va map_type Pq string, default search all map types
180 will initialize the map only for the type given.
182 useful to avoid the default map search type used by
185 and can have undesired side-effects such as initializing
191 .Bl -tag -width ".Cm nisplus" -compact
197 Hesiod name service from MIT
199 Lightweight Directory Access Protocol
201 (New) dbm style hash files
203 Network Information Services (version 2)
205 Network Information Services Plus (version 3)
211 .It Va mount_type Pq string, default=nfs
214 mount types default to
221 map mount points, for the local host it is running on.
226 will be an autofs server for those mount points.
227 .It Va autofs_use_lofs Pq string, default=yes
232 will use lofs-type (loopback) mounts
233 for type:=link mounts.
234 This has the advantage of mounting in place, and
235 users get to the see the same pathname that they chdir'ed into.
241 will use symlinks instead: that code is more
242 tested, but negates autofs's big advantage of in-place mounts.
243 .It Va search_path Pq string, default no search path
244 This provides a (colon-delimited) search path for file maps.
246 path, sites can allow for local map customizations and overrides, and can
248 distributed maps in several locations as needed.
249 .It Va selectors_in_defaults Pq boolean, default=no
252 then the /defaults entry of maps will search for and process any
253 selectors before setting defaults for all other keys in that map.
255 when you want to set different options for a complete map based on some
257 For example, you may want to better the NFS performance over
258 slow slip-based networks as follows:
261 wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \\
262 wire!=slip-net;opts:=intr,rsize=8192,wsize=8192
264 Deprecated form: selectors_on_default
266 .BR sun_map_syntax " (boolean, default=no)"
267 If "yes," then Amd will parse the map according to the Sun Automount syntax.
269 .\" **************************************************************************
271 .Ss "Parameters applicable to the global section only"
274 .It Va arch Pq string, default to compiled in value
279 Allows you to override the value of the
283 .It Va auto_attrcache Pq numeric, default=0
284 Specify in seconds (or units of 0.1 seconds, depending on the OS), what is
285 the (kernel-side) NFS attribute cache timeout for
289 A value of 0 is supposed to turn off attribute caching, meaning
292 will be consulted via a kernel-RPC each time someone stat()'s
293 the mount point (which could be abused as a denial-of-service attack).
294 Warning: some OSs are incapable of turning off the NFS attribute cache
298 may not work reliably under heavy load.
302 document in the Am-utils distribution for more details.
303 .It Va auto_dir Pq string, default= Ns Pa /a
308 This sets the private directory where
311 sub-directories for its real mount points.
312 .It Va cache_duration Pq numeric, default=300
317 Sets the duration in seconds that looked-up or mounted map
318 entries remain in the cache.
319 .It Va cluster Pq string, default no cluster
324 Specifies the alternate
327 .It Va debug_mtab_file Pq string, default= Ns Pa /tmp/mnttab
328 Path to mtab file that is used by
330 to store a list of mounted
331 file systems during debug-mtab mode.
332 This option only applies
333 to systems that store mtab information on disk.
334 .It Va debug_options Pq string, default no debug options
339 Specify any debugging options for
343 am-utils was configured for debugging using the
348 option, as well as all other options, can be turned on via
349 .Fl Fl enable-debug Ns = Ns Cm mem .
350 Otherwise debugging options are ignored.
352 comma delimited, and can be preceded by the string
356 You can get the list of supported debugging options by running
360 .Bl -tag -width ".Cm xdrtrace" -compact
362 all options (excludes hrtime and mtab)
364 "sensible" default options (all--excluding hrtime, mtab, and xdrtrace)
375 print high resolution time stamps (only if syslog(3) is not used)
377 info service specific debugging
380 trace memory allocations
385 \fBreaddir\fR show browsable_dirs progress
389 full debug options plus mtab,nodaemon,nofork,noamq
391 trace protocol and NFS mount arguments
394 .BR dismount_interval " (numeric, default=120)"
396 .It Va dismount_interval Pq numeric, default=120
401 Specify, in seconds, the time between attempts to dismount
402 file systems that have exceeded their cached times.
403 .It Va domain_strip Pq boolean, default=yes
407 name part referred to by ${rhost} is stripped off.
409 useful to keep logs and smaller.
413 part is left changed.
414 This is useful when using multiple domains with
415 the same maps (as you may have hosts whose domain-stripped name is
417 .It Va exec_map_timeout Pq numeric, default=10
418 The timeout in seconds that
420 will wait for an executable map program before an answer is returned from
421 that program (or script).
422 This value should be set to as small as possible
423 while still allowing normal replies to be returned before the timer expires,
424 because during the time that the executable map program is queried,
426 is essentially waiting and is thus not responding to any other queries.
427 .It Va forced_unmounts Pq boolean, default=no
430 and the client OS supports forced or lazy unmounts, then
432 will attempt to use them if it gets any of three serious error conditions
433 when trying to unmount an existing mount point or mount on top of one:
438 This could be useful to recover from serious conditions such as hardware
439 failure of mounted disks, or NFS servers which are down permanently, were
440 migrated, or changed their IP address.
445 are forcibly unmounted using this option, which is useful to recover
448 .It Va full_os Pq string, default to compiled in value
449 The full name of the operating system, along with its version.
451 to override the compiled-in full name and version of the operating system.
452 Useful when the compiled-in name is not desired.
453 For example, the full
454 operating system name on Linux comes up as
456 but you can override it to
458 .It Va fully_qualified_hosts Pq string, default=no
462 will perform RPC authentication using fully-qualified host names.
464 necessary for some systems, and especially when performing cross-domain
466 For this function to work, the
468 variable ${hostd} is used, requiring that ${domain} not be null.
469 .It Va hesiod_base Pq string, default=automount
470 Specify the base name for hesiod maps.
471 .It Va karch Pq string, default to karch of the system
476 Allows you to override the kernel-architecture of your
478 Useful for example on Sun (Sparc) machines, where you can build one
480 binary and run it on multiple machines, yet you want each one to get
483 variable set (for example, sun4c, sun4m, sun4u, etc.)
489 to figure out the kernel architecture of
491 .It Va ldap_base Pq string, default not set
492 Specify the base name for LDAP.
493 This often includes LDAP-specific
494 values such as country and organization.
495 .It Va ldap_cache_maxmem Pq numeric, default=131072
496 Specify the maximum memory
498 should use to cache LDAP entries.
499 .It Va ldap_cache_seconds Pq numeric, default=0
500 Specify the number of seconds to keep entries in the cache.
501 .It Va ldap_hostports Pq string, default not set
502 Specify the LDAP host and port values.
503 .It Va ldap_proto_version Pq numeric, default=2
504 Specify the version of the LDAP protocol to use.
505 .It Va local_domain Pq string, default no sub-domain
510 Specify the local domain name.
511 If this option is not given
512 the domain name is determined from the hostname by removing the first
513 component of the fully-qualified host name.
514 .It Va localhost_address Pq string, default to localhost or 127.0.0.1
515 Specify the name or IP address for
517 to use when connecting the sockets
518 for the local NFS server and the RPC server.
519 This defaults to 127.0.0.1 or
520 whatever the host reports as its local address.
521 This parameter is useful on
522 hosts with multiple addresses where you want to force
526 .It Va log_file Pq string, default= Ns Pa /dev/stderr
531 Specify a file name to log
538 will send its events to the standard error file descriptor.
543 will record its events with the system logger
545 The default syslog facility used is
548 wish to change it, append its name to the log file name, delimited by a
556 will log messages via
560 facility (if it exists on the system).
561 .It Va log_options Pq string, default no logging options
566 Specify any logging options for
569 delimited, and can be preceded by the string
571 to negate their meaning.
574 logging option is only available if am-utils was configured with
575 .Fl Fl enable-debug .
576 You can get the list of supported debugging and logging
581 .Bl -tag -width ".Cm warning" -compact
585 default messages (fatal,error,user,warning,info)
589 non-fatal system errors (cannot be turned off)
591 fatal errors (cannot be turned off)
597 additional statistical information
599 non-fatal user errors
602 \fBwarning\fR warnings
606 .It Va map_reload_interval Pq numeric, default=3600
607 The number of seconds that
609 will wait before it checks to see if any maps
610 have changed at their source (NIS servers, LDAP servers, files, etc.).
612 will reload only those maps that have changed.
613 .It Va nfs_allow_any_interface Pq string, default=no
616 accepts local NFS packets only from 127.0.0.1.
622 will accept local NFS packets from any
623 local interface; this is useful on hosts that may have multiple interfaces
624 where the system is forced to send all outgoing packets (even those bound to
625 the same host) via an address other than 127.0.0.1.
626 .It Va nfs_allow_insecure_port Pq string, default=no
629 will refuse requests coming from unprivileged ports (i.e.\&
630 ports >= 1024 on Unix systems), so that only privileged users and the kernel
631 can send NFS requests to it.
632 However, some kernels (certain versions of
633 Darwin, MacOS X, and Linux) have bugs that cause them to use unprivileged
634 ports in certain situations, which causes
636 to stop dead in its tracks.
637 This parameter allows
639 to operate normally even on such systems, at the
640 expense of a slight decrease in the security of its operations.
643 .Dq Li "ignoring request from foo:1234, port not reserved"
646 log, try enabling this parameter and give it another go.
647 .It Va nfs_proto Pq string, default to trying version tcp then udp
650 tries TCP and then UDP.
651 This option forces the overall
653 protocol used to TCP or UDP.
654 It overrides what is in the
659 is compiled with NFSv3 support that may not be stable.
661 this option you can turn off the complete usage of NFSv3 dynamically
662 (without having to recompile
664 until such time as NFSv3 support is
666 .It Va nfs_retransmit_counter Pq numeric, default=11
671 .Fl t Ar timeout.retransmit
674 Specifies the number of NFS retransmissions that the kernel will use to
677 .It Va nfs_retransmit_counter_udp Pq numeric, default=11
679 .Va nfs_retransmit_counter
680 option, but for all UDP mounts only.
681 .It Va nfs_retransmit_counter_tcp Pq numeric, default=11
683 .Va nfs_retransmit_counter
684 option, but for all TCP mounts only.
685 .It Va nfs_retransmit_counter_toplvl Pq numeric, default=11
687 .Va nfs_retransmit_counter
690 top-level UDP mounts.
691 .It Va nfs_retry_interval Pq numeric, default=8
696 .Fl t Ar timeout.retransmit
703 of seconds, between NFS/RPC retries (for UDP and TCP).
704 This is the value that the kernel will use to
709 relies on the kernel RPC retransmit mechanism to trigger mount retries.
711 .Va nfs_retransmit_counter
713 .Va nfs_retry_interval
714 parameters change the overall retry interval.
715 Too long an interval gives
716 poor interactive response; too short an interval causes excessive retries.
717 .It Va nfs_retry_interval_udp Pq numeric, default=8
719 .Va nfs_retry_interval
720 option, but for all UDP mounts only.
721 .It Va nfs_retry_interval_tcp Pq numeric, default=8
723 .It nfs_retry_interval
724 option, but for all TCP mounts only.
725 .It Va nfs_retry_interval_toplvl Pq numeric, default=8
727 .It nfs_retry_interval
730 top-level UDP mounts.
731 .It Va nfs_vers Pq numeric, default to trying version 3 then 2
734 tries version 3 and then version 2.
735 This option forces the
738 protocol used to version 3 or 2.
739 It overrides what is in the
741 maps, and is useful when
743 is compiled with NFSv3 support that may not
745 With this option you can turn off the complete usage of NFSv3
746 dynamically (without having to recompile
748 until such time as NFSv3
749 support is desired again.
750 .It Va nis_domain Pq string, default to local Tn NIS domain name
755 Specify an alternative
757 domain from which to fetch the
760 The default is the system domain name.
761 This option is ignored if
763 support is not available.
764 .It Va normalize_hostnames Pq boolean, default=no
771 then the name referred to by
773 is normalized relative to the host database before being used.
775 to translate aliases into
778 .It Va normalize_slashes Pq boolean, default=yes
783 will condense all multiple
785 (slash) characters into
786 one and remove all trailing slashes.
792 strings that may contain repeated or trailing slashes.
794 sometimes useful with SMB mounts, which often require multiple slash
795 characters in pathnames.
796 .It Va os Pq string, default to compiled in value
801 Allows you to override the compiled-in name of the operating
803 Useful when the built-in name is not desired for backward
804 compatibility reasons.
805 For example, if the build in name is
807 you can override it to
809 and use older maps which were written with the
811 .It Va osver Pq string, default to compiled in value
816 Overrides the compiled-in version number of the operating
818 Useful when the built in version is not desired for backward
819 compatibility reasons.
820 For example, if the build in version is
822 you can override it to
824 and use older maps that were written with
826 .It Va pid_file Pq string, default= Ns Pa /dev/stdout
827 Specify a file to store the process ID of the running daemon into.
831 will print its process ID onto the standard output.
836 Note that the PID of a running
839 also be retrieved via
841 This file is used only if the
844 .It Va plock Pq boolean, default=yes
851 lock the running executable pages of
856 performance, systems that support the
863 This way there is less chance that
864 the operating system will schedule, page out, and swap the
869 performance, at the cost of reserving the
872 process (making it unavailable for other processes).
873 .It Va portmap_program Pq numeric, default=300019
874 Specify an alternate Port-mapper RPC program number, other than the official
876 This is useful when running multiple
884 mode, without affecting the primary
887 For safety reasons, the alternate program numbers that
888 can be specified must be in the range 300019-300029, inclusive.
894 which can be used to specify an alternate program number of an
899 can fully control any number of
901 processes running on the same host.
902 .It Va preferred_amq_port Pq numeric, default=0
903 Specify an alternate Port-mapper RPC port number for
907 This is used for both UDP and TCP.
908 Setting this value to 0 (or
909 not defining it) will cause
911 to select an arbitrary port number.
914 RPC service port to a specific number is useful in firewalled or NAT'ed
915 environments, where you need to know which port
918 .It Va print_pid Pq boolean, default=no
926 will print its process ID upon starting.
927 .It Va print_version Pq boolean, default=no
932 but the version prints and
938 will print its version information string, which includes some
939 configuration and compilation values.
940 .It Va restart_mounts Pq boolean, default=no
948 will scan the mount table to determine which file systems are currently
950 Whenever one of these would have been auto-mounted,
953 .It Va show_statfs_entries Pq boolean, default=no
956 then all maps which are browsable will also show the number of
957 entries (keys) they have when
960 (This is accomplished by returning
961 non-zero values to the
964 .It Va truncate_log Pq boolean, default=no
967 then the log file (if it is a regular file), will be truncated
969 .It Va unmount_on_exit Pq boolean, default=no
974 will attempt to unmount all file systems which it knows
981 mounted file systems intact.
984 does not know about file systems mounted before it starts up,
990 .It Va use_tcpwrappers Pq boolean, default=yes
995 will use the tcpd/libwrap tcpwrappers library
996 (if available) to control
1000 .Pa /etc/hosts.allow
1004 .It Va vendor Pq string, default to compiled in value
1005 The name of the vendor of the operating system.
1006 Overrides the compiled-in
1008 Useful when the compiled-in name is not desired.
1010 most Intel based systems set the vendor name to
1012 but you can set it to
1015 .Ss "Parameters applicable to regular map sections"
1017 .It Va map_name Pq string, must be specified
1018 Name of the map where the keys are located.
1019 .It Va tag Pq string, default no tag
1020 Each map entry in the configuration file can be tagged.
1022 specified, that map section will always be processed by
1027 will process the map if the
1031 and the value given to that command-line option
1032 matches that in the map section.
1037 configuration I use daily.
1039 # GLOBAL OPTIONS SECTION
1041 normalize_hostnames = no
1043 restart_mounts = yes
1045 log_file = /var/log/amd
1047 #debug_options = all
1049 selectors_in_defaults = yes
1050 # config.guess picks up "sunos5" and I don't want to edit my maps yet
1052 # if you print_version after setting up "os", it will show it.
1055 search_path = /etc/amdmaps:/usr/lib/amd:/usr/local/AMD/lib
1056 browsable_dirs = yes
1058 # DEFINE AN AMD MOUNT POINT
1072 map_name = amd.import
1076 map_name = amd.tftpboot
1079 .Xr hosts_access 5 ,
1090 .%B "Linux NFS and Automounter Administration"
1091 .%O ISBN 0-7821-2739-8
1096 .Pa http://www.am-utils.org/
1098 .%T Amd \- The 4.4 BSD Automounter
1103 utility first appeared in
1106 .An Erez Zadok Aq ezk@cs.sunysb.edu ,
1107 Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
1109 Other authors and contributors to am-utils are listed in the
1111 file distributed with am-utils.