1AUTOFS(5)                     File Formats Manual                    AUTOFS(5)
2
3
4
5AUTOFS(5)                     File Formats Manual                    AUTOFS(5)
6
7
8

NAME

10       autofs - Format of the automounter maps
11

DESCRIPTION

13       The automounter maps are FILE, NIS, NISPLUS or LDAP maps referred to by
14       the master map of the automounter  (see  auto.master(5)).   These  maps
15       describe  how  file  systems below the mount point of the map (given in
16       the master map) are to be mounted.  This page  describes  the  sun  map
17       format; if another map format is specified (e.g. hesiod), this documen‐
18       tation does not apply.
19
20       Indirect maps can be changed on the fly and the automouter will  recog‐
21       nize  those  changes  on  the  next  operation it performs on that map.
22       Direct maps require a HUP signal be sent to the daemon to refresh their
23       contents as does the master map.
24

FORMAT

26       This is a description of the text file format.  Other methods of speci‐
27       fying these files may exist.  All empty lines or lines beginning with #
28       are ignored. The basic format of one line in such maps is:
29
30       key [-options] location
31
32
33   key
34       For indirect mounts this is the part of the path name between the mount
35       point and the path into the filesystem when it is mounted. Usually  you
36       can  think  about the key as a sub-directory name below the autofs man‐
37       aged mount point.
38
39       For direct mounts this is the full path of each mount point.  This  map
40       is always associated with the /- mount point in the master map.
41
42
43   options
44       Zero  or  more  options may be given.  Options can also be given in the
45       auto.master file in which case both values are cumulative  (this  is  a
46       difference  from  SunOS).   The  options  are a list of comma separated
47       options as customary for the mount(8) command. There  are  two  special
48       options -fstype= used to specify a filesystem type if the filesystem is
49       not of the default NFS type.  This option is  processed  by  the  auto‐
50       mounter  and not by the mount command.  -strict is used to treat errors
51       when mounting file systems as fatal. This is  important  when  multiple
52       file  systems  should  be  mounted  (`multi-mounts'). If this option is
53       given, no file system is mounted at all if at  least  one  file  system
54       can't be mounted.
55
56
57   location
58       The location specifies from where the file system is to be mounted.  In
59       the most cases this will be  an  NFS  volume  and  the  usual  notation
60       host:pathname  is used to indicate the remote filesystem and path to be
61       mounted.  If the filesystem to be mounted begins  with  a  /  (such  as
62       local  /dev  entries  or  smbfs  shares) a : needs to be prefixed (e.g.
63       :/dev/sda1).
64

EXAMPLE

66       Indirect map:
67
68         kernel    -ro,soft,intr       ftp.kernel.org:/pub/linux
69         boot      -fstype=ext2        :/dev/hda1
70         windoze   -fstype=smbfs       ://windoze/c
71         removable -fstype=ext2        :/dev/hdd
72         cd        -fstype=iso9660,ro  :/dev/hdc
73         floppy    -fstype=auto        :/dev/fd0
74         server    -rw,hard,intr       / -ro myserver.me.org:/ \
75                                       /usr myserver.me.org:/usr \
76                                       /home myserver.me.org:/home
77
78       In the first line we have a NFS remote mount of the kernel directory on
79       ftp.kernel.org.   This is mounted read-only.  The second line mounts an
80       ext2 volume from a local ide drive.  The third makes a  share  exported
81       from  a Windows machine available for automounting.  The rest should be
82       fairly self-explanatory. The last entry (the last three  lines)  is  an
83       example of a multi-map (see below).
84
85       If  you use the automounter for a filesystem without access permissions
86       (like vfat), users usually can't write on such a filesystem because  it
87       is  mounted  as  user  root.  You can solve this problem by passing the
88       option gid=<gid>, e.g. gid=floppy. The filesystem is  then  mounted  as
89       group floppy instead of root. Then you can add the users to this group,
90       and they can write to the filesystem. Here's an example  entry  for  an
91       autofs map:
92
93         floppy-vfat  -fstype=vfat,sync,gid=floppy,umask=002  :/dev/fd0
94
95       Direct map:
96
97         /nfs/apps/mozilla             bogus:/usr/local/moxill
98         /nfs/data/budgets             tiger:/usr/local/budgets
99         /tst/sbin                     bogus:/usr/sbin
100
101

FEATURES

103   Map Key Substitution
104       An  &  character  in  the  location is expanded to the value of the key
105       field that matched the line (which probably only makes  sense  together
106       with a wildcard key).
107
108   Wildcard Key
109       A  map  key  of * denotes a wild-card entry. This entry is consulted if
110       the specified key does not exist in the map.  A typical wild-card entry
111       looks like this:
112
113         *         server:i/export/home/&
114
115       The special character '&' will be replaced by the provided key.  So, in
116       the example above, a lookup for the key 'foo' would yield  a  mount  of
117       server:/export/home/foo.
118
119   Variable Substitution
120       The  following  special  variables  will  be substituted in the key and
121       location fields of an automounter map if prefixed with $  as  customary
122       from  shell  scripts  (Curly  braces  can be used to separate the field
123       name):
124
125         ARCH           Architecture (uname -m)
126         CPU            Processor Type
127         HOST           Hostname (uname -n)
128         OSNAME         Operating System (uname -s)
129         OSREL          Release of OS (uname -r)
130         OSVERS         Version of OS (uname -v)
131
132       autofs provides additional variables that are set  based  on  the  user
133       requesting the mount:
134
135         USER           The user login name
136         UID            The user login ID
137         GROUP          The user group name
138         GID            The user group ID
139         HOME           The user home directory
140         HOST           Hostname (uname -n)
141
142       Additional  entries can be defined with the -Dvariable=Value map-option
143       to automount(8).
144
145   Executable Maps
146       A map can be marked as executable. A program map will  be  called  with
147       the key as an argument.  It may return no lines of output if there's an
148       error, or one or more lines containing a map entry (with \ quoting line
149       breaks).  The map entry corresponds to what would normally follow a map
150       key.
151
152       An executable map can return an error code to indicate the  failure  in
153       addition to no output at all.  All output sent to stderr is logged into
154       the system logs.
155
156   Multiple Mounts
157       A multi-mount map can be used to name multiple  filesystems  to  mount.
158       It takes the form:
159
160         key [-options] [mount-point [-options] location...]...
161
162
163       This  may extend over multiple lines, quoting the line-breaks with `\´.
164       If present,  the  per-mountpoint  mount-options  are  appended  to  the
165       default mount-options.
166
167   Replicated Server
168         Multiple replicated hosts, same path:
169         <path> host1,host2,hostn:/path/path
170
171         Multiple hosts, some with same path, some with another
172         <path> host1,host2:/blah host3:/some/other/path
173
174         Multiple replicated hosts, different (potentially) paths:
175         <path> host1:/path/pathA host2:/path/pathB
176
177         Mutliple weighted, replicated hosts same path:
178         <path> host1(5),host2(6),host3(1):/path/path
179
180         Multiple weighted, replicated hosts different (potentially) paths:
181         <path> host1(3):/path/pathA host2(5):/path/pathB
182
183         Anything else is questionable and unsupported, but these variations will also work:
184         <path> host1(3),host:/blah
185
186

UNSUPPORTED

188       This  version  of  the automounter supports direct maps stored in FILE,
189       NIS, NISPLUS and LDAP only.
190

SEE ALSO

192       automount(8), auto.master(5), autofs(8), mount(8).
193

AUTHOR

195       This manual page was written by Christoph  Lameter  <chris@waterf.org>,
196       for  the Debian GNU/Linux system.  Edited by H. Peter Avian <hpa@trans‐
197       meta.com>,  Jeremy  Fitzhardinge   <jeremy@goop.org>   and   Ian   Kent
198       <raven@themaw.net>.
199
200
201
202                                  14 Jan 2000                        AUTOFS(5)
Impressum