Download LDAP System Administration

Transcript
[ Team LiB ]
6.10 Automount Maps
In order to use the automount information stored in your directory, you must shift your focus to the automount
daemon itself, specifically Linux's kernel-based autofs. As it currently stands, autofs (v3.1.7 and the 4.0 preview
releases) supports the undocumented automount and automountMap object classes. However, Red Hat has
updated the package in its distribution (autofs-3.1.7-28) to look up mount points based on the nisObject and
nisMap classes described in RFC 2307 (and included in nis.schema). The LDAPbis workgroup's revisions to RFC
2307 will include new schema items for storing automount information, but for the moment, nisObject and
nisMap have the largest support base from Red Hat, Sun, and PADL. Figure 6-8 shows the required and optional
attributes for these two new object classes.
•
Table of Contents
•
Index
•
Reviews
•
Reader Reviews
•
Errata
Figure 6-8. nisObject and nisMap object classes
LDAP System Administration
By Gerald Carter
Publisher
: O'Reilly
Pub Date
: March 2003
ISBN
: 1-56592-491-6
Pages
: 308
Red Hat's automount patches can be obtained from either
http://people.redhat.com/nalin/autofs/ or in the latest autofs SRPM at
If you want to beftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/.
a master of your domain, LDAP System Administration will help you get up and running quickly
regardless of which LDAP version you use. After reading this book, even with no previous LDAP experience, you'll
be able to integrate a directory server into essential network services such as mail, DNS, HTTP, and SMB/CIFS.
PADL's migration tools include a script (migrate_automount.pl ) for converting an automount map to LDIF. Here,
[you
Team
LiB ] a single automount point in /opt to a directory entry. You can see from the /etc/auto.opt excerpt
will convert
that the LDIF entry contains all of the information needed for mounting /opt/src. This time, PADL's script does
create the top-level container (nisMapName=auto.opt) for you:
$ grep src /etc/auto.opt
src
-rw,hard,intr
queso.plainjoe.org:/export/u1/src
$ ./migrate_automount.pl /etc/auto.opt /tmp/auto.opt.ldif
$ cat /tmp/auto.opt.ldif
dn: nisMapName=auto.opt,dc=plainjoe,dc=org
objectClass: top
objectClass: nisMap
nisMapName: auto.opt
dn: cn=src,nisMapName=auto.opt,dc=plainjoe,dc=org
objectClass: nisObject
cn: src
nisMapEntry: -rw,hard,intr queso.plainjoe.org:/export/u1/src
nisMapName: auto.opt
After adding the new automount entries to the directory using ldapadd, the autofs server must be informed of
auto.opt's map location, the LDAP server's hostname, and the search base. The following line in /etc/auto.master
instructs the autofs package to look up mounts for /opt on the host ldap1 beneath
ou=auto.opt,dc=plainjoe,dc=org:
## Look up mounts for /opt in the LDAP directory.