[7ef22cff] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[7ef22cff] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[d17b13d] | 6 |
|
---|
[8dfc5c3] | 7 | <!ENTITY autofs-download-http "&kernel-dl;/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.xz">
|
---|
[faa68e4a] | 8 | <!ENTITY autofs-download-ftp " ">
|
---|
[44fe948f] | 9 | <!ENTITY autofs-md5sum "b27ee7a1674ae1779aaf75c5e90b0f1e">
|
---|
[03b278dc] | 10 | <!ENTITY autofs-size "308 KB">
|
---|
[44fe948f] | 11 | <!ENTITY autofs-buildsize "8.5 MB">
|
---|
[5e7ffd30] | 12 | <!ENTITY autofs-time "0.1 SBU">
|
---|
[7ef22cff] | 13 | ]>
|
---|
| 14 |
|
---|
[32d0e29] | 15 | <sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
|
---|
[d3ad3271] | 16 | <?dbhtml filename="autofs.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[6d15c62] | 23 | <title>autofs-&autofs-version;</title>
|
---|
[d3ad3271] | 24 |
|
---|
| 25 | <indexterm zone="autofs">
|
---|
| 26 | <primary sortas="a-Autofs">Autofs</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Autofs</title>
|
---|
| 31 |
|
---|
[d17b13d] | 32 | <para>
|
---|
| 33 | <application>Autofs</application> controls the operation of the automount
|
---|
| 34 | daemons. The automount daemons automatically mount filesystems when they
|
---|
| 35 | are accessed and unmount them after a period of inactivity. This is done
|
---|
| 36 | based on a set of pre-configured maps.
|
---|
| 37 | </para>
|
---|
[47be189b] | 38 |
|
---|
[90c883f] | 39 | &lfs91_checked;
|
---|
[d3ad3271] | 40 |
|
---|
| 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
[b1532549] | 44 | <para>
|
---|
| 45 | Download (HTTP): <ulink url="&autofs-download-http;"/>
|
---|
| 46 | </para>
|
---|
[d3ad3271] | 47 | </listitem>
|
---|
| 48 | <listitem>
|
---|
[b1532549] | 49 | <para>
|
---|
| 50 | Download (FTP): <ulink url="&autofs-download-ftp;"/>
|
---|
| 51 | </para>
|
---|
[d3ad3271] | 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
[b1532549] | 54 | <para>
|
---|
| 55 | Download MD5 sum: &autofs-md5sum;
|
---|
| 56 | </para>
|
---|
[d3ad3271] | 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
[b1532549] | 59 | <para>
|
---|
| 60 | Download size: &autofs-size;
|
---|
| 61 | </para>
|
---|
[d3ad3271] | 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
[b1532549] | 64 | <para>
|
---|
| 65 | Estimated disk space required: &autofs-buildsize;
|
---|
| 66 | </para>
|
---|
[d3ad3271] | 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
[b1532549] | 69 | <para>
|
---|
| 70 | Estimated build time: &autofs-time;
|
---|
| 71 | </para>
|
---|
[d3ad3271] | 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
[fd7e0ed6] | 74 |
|
---|
[81066706] | 75 | <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
|
---|
[50d1a60] | 76 |
|
---|
[ad09e9f5] | 77 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 78 | <para role="required">
|
---|
[b08a9ed] | 79 | <xref linkend="libtirpc"/> and
|
---|
| 80 | <xref linkend="rpcsvc-proto"/>
|
---|
[ad09e9f5] | 81 | </para>
|
---|
| 82 |
|
---|
[d17b13d] | 83 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 84 | <para role="optional">
|
---|
| 85 | <xref linkend="nfs-utils"/>,
|
---|
| 86 | <xref linkend="libxml2"/>,
|
---|
| 87 | <xref linkend="mitkrb"/>,
|
---|
| 88 | <xref linkend="openldap"/> (client only), and
|
---|
| 89 | <xref linkend="cyrus-sasl"/>
|
---|
| 90 | </para>
|
---|
[50d1a60] | 91 |
|
---|
[3597eb6] | 92 | <para condition="html" role="usernotes">User Notes:
|
---|
| 93 | <ulink url="&blfs-wiki;/autofs"/></para>
|
---|
| 94 |
|
---|
[d3ad3271] | 95 | </sect2>
|
---|
| 96 |
|
---|
| 97 | <sect2 role="kernel" id="autofs-kernel">
|
---|
| 98 | <title>Kernel Configuration</title>
|
---|
| 99 |
|
---|
| 100 | <indexterm zone="autofs autofs-kernel">
|
---|
| 101 | <primary sortas="d-Automounter">Automounter</primary>
|
---|
| 102 | </indexterm>
|
---|
| 103 |
|
---|
[d17b13d] | 104 | <para>
|
---|
| 105 | Verify that automounter kernel support has been enabled:
|
---|
| 106 | </para>
|
---|
| 107 |
|
---|
| 108 | <screen><literal>File systems --->
|
---|
[38155d1] | 109 | <*/M> Kernel automounter version 4 support (also supports v3) [CONFIG_AUTOFS4_FS]</literal></screen>
|
---|
[d17b13d] | 110 |
|
---|
| 111 | <para>
|
---|
| 112 | Optionally, enable the following options in the kernel configuration:
|
---|
| 113 | </para>
|
---|
[d3ad3271] | 114 |
|
---|
[d17b13d] | 115 | <screen><literal>File systems --->
|
---|
[38155d1] | 116 | [*] Network File Systems ---> [CONFIG_NETWORK_FILESYSTEMS]
|
---|
| 117 | <*/M> NFS client support [CONFIG_NFS_FS]
|
---|
| 118 | <*/M> CIFS support (advanced network filesystem, SMBFS successor) [CONFIG_CIFS]</literal></screen>
|
---|
[d612b9f] | 119 |
|
---|
[b1532549] | 120 | <para>
|
---|
| 121 | Recompile and install the new kernel, if necessary.
|
---|
| 122 | </para>
|
---|
[7ef22cff] | 123 |
|
---|
[d3ad3271] | 124 | </sect2>
|
---|
[0290a023] | 125 |
|
---|
[d3ad3271] | 126 | <sect2 role="installation">
|
---|
[d612b9f] | 127 |
|
---|
[d3ad3271] | 128 | <title>Installation of Autofs</title>
|
---|
| 129 |
|
---|
[b1532549] | 130 | <para>
|
---|
| 131 | Install <application>Autofs</application> by running the following
|
---|
| 132 | commands:
|
---|
| 133 | </para>
|
---|
[d17b13d] | 134 |
|
---|
[d5497a2e] | 135 | <screen revision="sysv"><userinput>./configure --prefix=/ \
|
---|
[a65876c] | 136 | --with-libtirpc \
|
---|
[d5497a2e] | 137 | --without-openldap \
|
---|
| 138 | --mandir=/usr/share/man &&
|
---|
| 139 | make</userinput></screen>
|
---|
| 140 |
|
---|
| 141 | <screen revision="systemd"><userinput>./configure --prefix=/ \
|
---|
[a65876c] | 142 | --with-libtirpc \
|
---|
[ecf6154] | 143 | --with-systemd \
|
---|
[73b53eb] | 144 | --without-openldap \
|
---|
| 145 | --mandir=/usr/share/man &&
|
---|
[ad09e9f5] | 146 |
|
---|
[a65876c] | 147 | make</userinput></screen>
|
---|
[d3ad3271] | 148 |
|
---|
[b1532549] | 149 | <para>
|
---|
| 150 | This package does not come with a test suite.
|
---|
| 151 | </para>
|
---|
[d4bf650a] | 152 |
|
---|
[b1532549] | 153 | <para>
|
---|
| 154 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 155 | </para>
|
---|
[d3ad3271] | 156 |
|
---|
[47be189b] | 157 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[d3ad3271] | 158 |
|
---|
[51797c8] | 159 | <!-- As of version 5.1.5, the configuration files are not installed anymore -->
|
---|
| 160 | <caution>
|
---|
| 161 | <para>
|
---|
| 162 | If <application>autofs</application> is already installed on your
|
---|
| 163 | system, be sure to backup your configuration files. They'll be
|
---|
| 164 | overwritten by the following command.
|
---|
| 165 | </para>
|
---|
| 166 | </caution>
|
---|
| 167 |
|
---|
| 168 | <para>
|
---|
| 169 | Install the default configuration files, still as the
|
---|
| 170 | <systemitem class="username">root</systemitem> user:
|
---|
| 171 | </para>
|
---|
| 172 |
|
---|
| 173 | <screen role="root"><userinput>make install_samples</userinput></screen>
|
---|
| 174 |
|
---|
[d3ad3271] | 175 | </sect2>
|
---|
[d17b13d] | 176 |
|
---|
[d3ad3271] | 177 | <sect2 role="commands">
|
---|
| 178 | <title>Command Explanations</title>
|
---|
| 179 |
|
---|
[a65876c] | 180 | <para>
|
---|
| 181 | <parameter>--with-libtirpc</parameter>: This switch forces the package to
|
---|
| 182 | use libtirpc for RPC functionality instead of relying on implementation
|
---|
| 183 | from Glibc, which was removed in LFS 8.1.
|
---|
| 184 | </para>
|
---|
| 185 |
|
---|
[d5497a2e] | 186 | <para revision="systemd">
|
---|
| 187 | <parameter>--with-systemd</parameter>: This switch enables installation
|
---|
| 188 | of the bundled systemd units.
|
---|
| 189 | </para>
|
---|
| 190 |
|
---|
[d17b13d] | 191 | <para>
|
---|
[f1d7196] | 192 | <parameter>--without-openldap</parameter>: This switch disables openldap
|
---|
| 193 | if found. If openldap is desired, omit this switch. Note that openldap
|
---|
| 194 | support in autofs requires <xref linkend="mitkrb"/>.
|
---|
[d17b13d] | 195 | </para>
|
---|
[d260aaf4] | 196 |
|
---|
[d3ad3271] | 197 | </sect2>
|
---|
[d17b13d] | 198 |
|
---|
[d3ad3271] | 199 | <sect2 role="configuration">
|
---|
| 200 | <title>Configuring Autofs</title>
|
---|
[7ef22cff] | 201 |
|
---|
[d3ad3271] | 202 | <sect3 id="autofs-config">
|
---|
| 203 | <title>Config Files</title>
|
---|
[7ef22cff] | 204 |
|
---|
[b1532549] | 205 | <para>
|
---|
| 206 | <filename>/etc/sysconfig/autofs.conf</filename>,
|
---|
| 207 | <filename>/etc/auto.master</filename>,
|
---|
| 208 | <filename>/etc/auto.misc</filename>, and
|
---|
| 209 | <filename>/etc/auto.net</filename>
|
---|
| 210 | </para>
|
---|
[7ef22cff] | 211 |
|
---|
[d3ad3271] | 212 | <indexterm zone="autofs autofs-config" >
|
---|
| 213 | <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
---|
| 214 | </indexterm>
|
---|
[7ef22cff] | 215 |
|
---|
[d3ad3271] | 216 | <indexterm zone="autofs autofs-config">
|
---|
| 217 | <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
|
---|
| 218 | </indexterm>
|
---|
[7ef22cff] | 219 |
|
---|
[d3ad3271] | 220 | <indexterm zone="autofs autofs-config">
|
---|
| 221 | <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
|
---|
| 222 | </indexterm>
|
---|
[7ef22cff] | 223 |
|
---|
[d3ad3271] | 224 | <indexterm zone="autofs autofs-config">
|
---|
| 225 | <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
|
---|
| 226 | </indexterm>
|
---|
[7ef22cff] | 227 |
|
---|
[d3ad3271] | 228 | </sect3>
|
---|
[7ef22cff] | 229 |
|
---|
[d3ad3271] | 230 | <sect3>
|
---|
| 231 | <title>Configuration Information</title>
|
---|
[7ef22cff] | 232 |
|
---|
[b1532549] | 233 | <para>
|
---|
| 234 | The installation process creates <filename>auto.master</filename>,
|
---|
| 235 | <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
|
---|
| 236 | <filename>auto.net</filename>. Replace the
|
---|
| 237 | <filename>auto.master</filename> file with the following commands
|
---|
| 238 | as the <systemitem class="username">root</systemitem> user:
|
---|
| 239 | </para>
|
---|
[d3ad3271] | 240 |
|
---|
| 241 | <screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &&
|
---|
| 242 | cat > /etc/auto.master << "EOF"
|
---|
| 243 | <literal># Begin /etc/auto.master
|
---|
[7ef22cff] | 244 |
|
---|
[9415459] | 245 | /media/auto /etc/auto.misc --ghost
|
---|
| 246 | #/home /etc/auto.home
|
---|
[7ef22cff] | 247 |
|
---|
[d3ad3271] | 248 | # End /etc/auto.master</literal>
|
---|
| 249 | EOF</userinput></screen>
|
---|
| 250 |
|
---|
[b1532549] | 251 | <para>
|
---|
| 252 | This file creates a new media directory,
|
---|
| 253 | <filename>/media/auto</filename> that will overlay any existing
|
---|
| 254 | directory of the same name. In this example, the file,
|
---|
| 255 | <filename>/etc/auto.misc</filename>, has a line:
|
---|
| 256 | </para>
|
---|
[9415459] | 257 |
|
---|
| 258 | <screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
|
---|
| 259 |
|
---|
[b1532549] | 260 | <para>
|
---|
| 261 | that will mount a cdrom as <filename>/media/auto/cd</filename> if
|
---|
| 262 | that directory is accessed. The <option>--ghost</option> option tells
|
---|
| 263 | the automounter to create <quote>ghost</quote> versions (i.e. empty
|
---|
| 264 | directories) of all the mount points listed in the configuration file
|
---|
| 265 | regardless whether any of the file systems are actually mounted or not.
|
---|
| 266 | This is very convenient and highly recommended, because it will show
|
---|
| 267 | you the available auto-mountable file systems as existing directories,
|
---|
| 268 | even when their file systems aren't currently mounted. Without the
|
---|
| 269 | <option>--ghost</option> option, you'll have to remember the names of
|
---|
| 270 | the directories. As soon as you try to access one of them, the
|
---|
| 271 | directory will be created and the file system will be mounted. When
|
---|
| 272 | the file system gets unmounted again, the directory is destroyed too,
|
---|
| 273 | unless the <option>--ghost</option> option was given.
|
---|
| 274 | </para>
|
---|
[9415459] | 275 |
|
---|
[d3ad3271] | 276 | <note>
|
---|
[b1532549] | 277 | <para>
|
---|
| 278 | An alternative method would be to specify another automount
|
---|
| 279 | location such as <filename
|
---|
| 280 | class='directory'>/var/lib/auto/cdrom</filename> and create a
|
---|
| 281 | symbolic link from <filename
|
---|
| 282 | class='directory'>/media/cdrom</filename> to the automount location.
|
---|
| 283 | </para>
|
---|
[d612b9f] | 284 | </note>
|
---|
[d3ad3271] | 285 |
|
---|
[b1532549] | 286 | <para>
|
---|
| 287 | The <filename>auto.misc</filename> file must be configured to your
|
---|
| 288 | working hardware. The loaded configuration file should load your cdrom
|
---|
| 289 | if <filename>/dev/cdrom</filename> is active or it can be edited to
|
---|
| 290 | match your device setup. Examples for floppies are available in the
|
---|
| 291 | file and easily activated. Documentation for this file is available
|
---|
| 292 | using the <command>man 5 autofs</command> command.
|
---|
| 293 | </para>
|
---|
[d3ad3271] | 294 |
|
---|
[b1532549] | 295 | <para>
|
---|
| 296 | In the second line, if enabled, a user's home directory would be
|
---|
| 297 | mounted via NFS upon login. The <filename>/etc/home.auto</filename>
|
---|
| 298 | would need to exist and have an entry similar to:
|
---|
| 299 | </para>
|
---|
[9415459] | 300 |
|
---|
| 301 | <screen>joe example.org:/export/home/joe</screen>
|
---|
| 302 |
|
---|
[b1532549] | 303 | <para>
|
---|
| 304 | where the directory <filename>/export/home/joe</filename> is
|
---|
| 305 | exported via NFS from the system example.org. NFS shares
|
---|
| 306 | are covered on the next page.
|
---|
| 307 | </para>
|
---|
[9415459] | 308 |
|
---|
[b1532549] | 309 | <para>
|
---|
| 310 | This package could also be used to mount SMB shares, however that
|
---|
| 311 | feature is not configured in these instructions. For additional
|
---|
| 312 | configuration information, see the man pages for auto.master(5). There
|
---|
| 313 | are also web resources such as this <ulink
|
---|
| 314 | url='http://wiki.gentoo.org/wiki/AutoFS'>AUTOFS
|
---|
| 315 | HOWTO</ulink> available.
|
---|
| 316 | </para>
|
---|
[9415459] | 317 |
|
---|
[d3ad3271] | 318 | </sect3>
|
---|
[32d0e29] | 319 |
|
---|
[d3ad3271] | 320 | <sect3 id="autofs-init">
|
---|
[d5497a2e] | 321 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 322 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
| 323 |
|
---|
[b1532549] | 324 | <para revision="sysv">
|
---|
| 325 | <application>autofs</application> installs its own
|
---|
| 326 | boot script, but it has no capability for logging or visual conformance
|
---|
| 327 | with other BLFS scripts.
|
---|
| 328 | </para>
|
---|
[d3ad3271] | 329 |
|
---|
[b1532549] | 330 | <para revision="sysv">
|
---|
| 331 | Install the <filename>/etc/init.d/autofs</filename>
|
---|
| 332 | mount script included with the <xref linkend="bootscripts"/>
|
---|
| 333 | package.
|
---|
| 334 | </para>
|
---|
[d3ad3271] | 335 |
|
---|
[d5497a2e] | 336 | <para revision="systemd">
|
---|
| 337 | To start <application>Autofs</application> at boot, enable the
|
---|
| 338 | previously installed systemd unit by running the following command as
|
---|
| 339 | the <systemitem class="username">root</systemitem> user:
|
---|
| 340 | </para>
|
---|
[d3ad3271] | 341 |
|
---|
| 342 | <indexterm zone="autofs autofs-init">
|
---|
| 343 | <primary sortas="f-autofs-init">autofs</primary>
|
---|
| 344 | </indexterm>
|
---|
| 345 |
|
---|
[d5497a2e] | 346 | <screen role="root" revision="sysv"><userinput>make install-autofs</userinput></screen>
|
---|
| 347 |
|
---|
| 348 | <screen role="root" revision="systemd"><userinput>systemctl enable autofs</userinput></screen>
|
---|
[d3ad3271] | 349 |
|
---|
[b1532549] | 350 | <para revision="sysv">
|
---|
| 351 | The time-out variable is set in
|
---|
| 352 | <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
|
---|
| 353 | a default of 60 seconds of inactivity before unmounting the device. A
|
---|
| 354 | much shorter time may be necessary to protect buffer writing to a floppy
|
---|
| 355 | if users tend to remove the media prior to the timeout setting.
|
---|
| 356 | </para>
|
---|
[d3ad3271] | 357 |
|
---|
[d5497a2e] | 358 | <note revision="systemd">
|
---|
| 359 | <para>
|
---|
| 360 | You can also specify <envar>OPTIONS</envar> variable in the
|
---|
| 361 | <filename>/etc/sysconfig/autofs</filename> file with any additional
|
---|
| 362 | parameters that you might want to pass to the automount daemon.
|
---|
| 363 | </para>
|
---|
| 364 | </note>
|
---|
| 365 |
|
---|
[d3ad3271] | 366 | </sect3>
|
---|
[32d0e29] | 367 |
|
---|
[d3ad3271] | 368 | </sect2>
|
---|
| 369 |
|
---|
| 370 | <sect2 role="content">
|
---|
| 371 | <title>Contents</title>
|
---|
| 372 |
|
---|
| 373 | <segmentedlist>
|
---|
| 374 | <segtitle>Installed Program</segtitle>
|
---|
| 375 | <segtitle>Installed Libraries</segtitle>
|
---|
| 376 | <segtitle>Installed Directories</segtitle>
|
---|
| 377 |
|
---|
| 378 | <seglistitem>
|
---|
| 379 | <seg>automount</seg>
|
---|
[9fe905c] | 380 | <seg>
|
---|
| 381 | lookup_dir.so, lookup_file.so, lookup_files.so, lookup_hosts.so,
|
---|
| 382 | lookup_ldap.so, lookup_multi.so, lookup_nis.so, lookup_nisplus.so,
|
---|
| 383 | lookup_program.so, lookup_userhome.so, lookup_yp.so, mount_afs.so,
|
---|
| 384 | mount_autofs.so, mount_bind.so, mount_changer.so, mount_ext2.so,
|
---|
| 385 | mount_ext3.so, mount_ext4.so, mount_generic.so, mount_nfs.so,
|
---|
| 386 | mount_nfs4.so, parse_amd.so, and parse_sun.so
|
---|
| 387 | </seg>
|
---|
[47be189b] | 388 | <seg>/lib/autofs</seg>
|
---|
[d3ad3271] | 389 | </seglistitem>
|
---|
| 390 | </segmentedlist>
|
---|
| 391 |
|
---|
| 392 | <variablelist>
|
---|
| 393 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 394 | <?dbfo list-presentation="list"?>
|
---|
| 395 | <?dbhtml list-presentation="table"?>
|
---|
| 396 |
|
---|
| 397 | <varlistentry id="automount">
|
---|
| 398 | <term><command>automount</command></term>
|
---|
| 399 | <listitem>
|
---|
[b1532549] | 400 | <para>
|
---|
| 401 | is the daemon that performs the mounting when a request is
|
---|
| 402 | made for the device.
|
---|
| 403 | </para>
|
---|
[d3ad3271] | 404 | <indexterm zone="autofs automount">
|
---|
| 405 | <primary sortas="b-automount">automount</primary>
|
---|
| 406 | </indexterm>
|
---|
| 407 | </listitem>
|
---|
| 408 | </varlistentry>
|
---|
| 409 |
|
---|
| 410 | </variablelist>
|
---|
| 411 |
|
---|
| 412 | </sect2>
|
---|
[7ef22cff] | 413 |
|
---|
| 414 | </sect1>
|
---|