Diff for "AutofsLDAP"


Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2006-04-30 23:06:17
Size: 2959
Editor: ip-128
Comment: initial page creation
Revision 3 as of 2006-05-24 09:34:33
Size: 2988
Editor: 10
Comment: removing apt-get install instruction
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
First of all, automount is composed of two parts : kernel module and user land utilities. Kernels in modern GNU/Linux distributions are compiled with support for automount. You just have to install user land utilities : First of all, automount is composed of two parts : kernel module and user land utilities. Kernels in modern GNU/Linux distributions are compiled with support for automount. You just have to install user land utilities : install the following packages {{{autofs-ldap ldap-utils}}} (see InstallingSoftware).
Line 11: Line 11:
{{{
sudo apt-get install autofs-ldap ldap-utils
}}}

{{{autofs-ldap}}} have been installed, so we can configure our automount in LDAP. If you plan to only use flat files configuration, you do not need to install the {{{autofs-ldap }}} package: installation is described in ["AutoFS"] howto.
{{{autofs-ldap}}} have been installed, so we can configure our automount in LDAP. If you plan to only use flat files configuration, you do not need to install the {{{autofs-ldap }}} package: installation is described in ["Autofs"] howto.

Introduction

Automount is the modern way to mount directories over a network. It is far much easier to manage and are more economic in bandwith.

In this howto, autofs will be configured through LDAP directory: in that way, we have a centralised configuration and we use a maximum the LDAP that has been setup. Great, isn't it ?

Installation

First of all, automount is composed of two parts : kernel module and user land utilities. Kernels in modern GNU/Linux distributions are compiled with support for automount. You just have to install user land utilities : install the following packages autofs-ldap ldap-utils (see InstallingSoftware).

autofs-ldap have been installed, so we can configure our automount in LDAP. If you plan to only use flat files configuration, you do not need to install the autofs-ldap  package: installation is described in ["Autofs"] howto.

Configuration

Configuring LDAP automount consists of several parts:

  • entering LDAP entries for defining mountpoints
  • entering LDAP entries for defining directories
  • defining on the client to use LDAP for automount configuration

Populating LDAP

In the LDAP directory, you have to enter two kind of entries:

  • entries that defines the mountpoint
  • entries that defines the directory under a mountpoint

Here is an example of LDAP entries based on the ["OpenLDAPServer"] installation.

dn: ou=admin,dc=example,dc=com
ou: admin
objectClass: top
objectClass: organizationalUnit

dn: ou=automount,ou=admin,dc=example,dc=com
ou: automount
objectClass: top
objectClass: organizationalUnit

dn: ou=auto.master,ou=automount,ou=admin,dc=example,dc=com
ou: auto.master
objectClass: top
objectClass: automountMap
  
dn: cn=/home,ou=auto.master,ou=automount,ou=admin,dc=example,dc=com
cn: /home
objectClass: top
objectClass: automount
automountInformation: ldap:ou=auto.home,ou=automount,ou=admin,o=alveonet --timeout=60 --ghost

dn: cn=lionel,ou=auto.home,ou=automount,ou=admin,dc=example,dc=com
cn: lionel
objectClass: top
objectClass: automount
automountInformation: -fstype=nfs,rw,hard,intr,nodev,exec,nosuid,rsize=8192,wsize=8192  nfs.example.com:/export/home/lionel

On the client

On the client, you only have to add LDAP map to the automount entry of /etc/nsswitch.conf. Edit you /etc/nsswitch.conf and add the line:

automount:      files ldap

The package ldap-utils have to be configured. Edit /etc/ldap/ldap.conf:

BASE    dc=example,dc=com
URI     ldap://ldap.example.com

Launch

autofs look in the LDAP directory for automountMap. You just have to launch autofs:

sudo /etc/init.d/autofs start

Test

Just check with a mount that automount is well launched:

mount | grep automount
automount(pid5058) on /home type autofs (rw,fd=4,pgrp=5058,minproto=2,maxproto=4)


CategoryDocumentation

AutofsLDAP (last edited 2013-01-21 03:30:49 by 184-78-162-53)