[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP + autofs integration

What I did is created my own init script that would search underneath
"ou=Automount,o=domain.com" for any ou's (with a scope of one). I then
named that ou as the base path in which entries below it would mount. I.E.,
if I had an entry named "cn=tmaly,ou=home,ou=Automount,o=mvista.com", it
would mount the value of automountInformation under /home/tmaly. I'm
actually surprised to see this method. I might want to try it myself. The
question is, do I worry about propogating the init script to everyone (if
I go with my original idea) or do I go with this idea, and worry about
progating auto.master? Either way, something needs to be propogated. The
better choice is probably that which is more static. I might want to create
a new mount point for people to use. It's easier for people to simply make
the directory rather than make the directory and make sure that auto.master
is updated. You decide.

Gerald Carter wrote:

> On Sun, 1 Apr 2001, James Macnicol wrote:
> > Hello,
> >
> >       My apologies if this isn't *quite* on topic but I'm looking for
> > examples of how to use the LDAP integration in Linux's autofs
> > automounter (in this case with OpenLDAP as the server platform).
> > Documentation for this is *very* difficult to find.  I'd be interested
> > to know if you could, in fact, store the automount moint points in the
> > LDAP database as well so that in the case of your primary fileserver
> > failing it would be possible to switch all clients over to a backup by
> > modifying a single entry.
> >
> How how it goes...
> o  get autofs 3.1.5 or greater (make sure yo compile in LDAP support)
> o edit /etc/auto.master and define the DN used as the seach base
>   e.g. /home  ldap:ou=auto.home,dc=plainjoe,dc=org    --timeout 60
> o now add the following schema to OpenLDAP (you'll also need to
>   include the nis.schema file)
> attributetype ( NAME 'automountInformation'
>         DESC 'Automount information'
>         EQUALITY caseExactIA5Match
>         SUBSTR caseExactIA5SubstringsMatch
>         SYNTAX{1024} SINGLE-VALUE )
> objectclass ( NAME 'automount' SUP top STRUCTURAL
>         DESC 'Automount information'
>         MUST ( cn $ automountInformation )
>         MAY ( description ) )
> o use the padl migration tools to convert /etc/auto.home over to
>   LDIF (however you will need to change the reference to the
>   automountMap objectClass to an organizationalUnit).  Here's an
>   example
>   dn: ou=auto.opt,dc=plainjoe,dc=org
>   objectClass: top
>   objectClass: organizationalUnit
>   ou: auto.opt
>   dn: cn=applix, ou=auto.opt,dc=plainjoe,dc=org
>   objectClass: automount
>   automountInformation: -rw,hard,intr pogo:/export/applix
>   cn: applix
> o You will also need to define an ldap.conf for autofs to use.
>   I added these lines to the autofs startup script
>   ## These are needed to define the hostname used in
>   ## LDAP queries by autofs
>   LDAPCONF=/etc/ldap.autofs
>   export LDAPCONF
>   and created /etc/ldap.autofs
>   ## /etc/ldap.autofs
>   ## Define the hostname of the LDAP server used by autofs
>   HOST  tumnus.plainjoe.org
> This should be enough to get you going.  Let me know if you
> have any other questions.
> CHeers, jerry
> ----------------------------------------------------------------------
>    /\  Gerald (Jerry) Carter                     Professional Services
>  \/    http://www.valinux.com/  VA Linux Systems   gcarter@valinux.com
>        http://www.samba.org/       SAMBA Team          jerry@samba.org
>        http://www.plainjoe.org/                     jerry@plainjoe.org
>        "...a hundred billion castaways looking for a home."
>                                 - Sting "Message in a Bottle" ( 1979 )