Вы находитесь на странице: 1из 2

OpenLDAP Integration — Cynapse Community http://www.cynapse.com/community/home/cyn.

in-users/openldap-integration/view

Debian 5.0.4 (Lenny)


The follow instructions let you to install OpenLDAP on Debian Lenny

By the system will be called mycompany.net and have an IP address of 127.0.0.1. Both the server and the client will be installed on the same
machine. However, to differentiate between client and server roles where relevant, the client will be referred to as mycompany.net and the
server as ldap.mycompany.net. The following addition will be made to /etc/hosts to completely support this scheme:

Define the host configurations


Edit the hosts file

# vim /etc/hosts

And adds the follow line:

127.0.0.1 mycompany.net ldap.mycompany.net

Install a OpenLDAP server

# aptitude install slapd ldap-utils libldap-2.4-2 libdb4.6

Configure LDAP server


Later reconfigure LDAP to meet your requirement, following the commnad line

# dpkg-reconfigure slapd

Then you must answer the debconf questions according to the following answers below:

Omit OpenLDAP server configuration? no


DNS domain name: mycompany.net
Organization name: mycompany.net
Administrator password: password
Confirm password: password
Database backend to use: BDB
Do you want your database to be removed when slapd is purged? no
Allow LDAPv2 protocol? no

So finality you need restart the LDAP server:

# /etc/init.d/slapd restart

Initial configuration
The OpenLDAP server is already running, so let's first configure /etc/ldap/ldap.conf, a common configuration file for all LDAP clients. This will
allow us to run ldapsearch and other other commands without having to list all the basic parameters by hand each time. Enable the following two
lines in /etc/ldap/ldap.conf, creating the file if necessary:

BASE dc=mycompany.net,dc=net
URI ldap://127.0.0.1/

Then, let's edit the server's configuration file, /etc/ldap/slapd.conf, to fine-tune its behavior.

Make sure all the schema files are enabled:

include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema

Change the verbosity level from 0 or "none" to 256:

loglevel 256
1 of 2 16/03/11 09:10
OpenLDAP Integration — Cynapse Community http://www.cynapse.com/community/home/cyn.in-users/openldap-integration/view
Change the verbosity level from 0 or "none" to 256:

loglevel 256

Search for line "index objectClass eq" and add another search index. In particular combinations, it may be possible to receive no results when the
searched entries are not indexed, so this step is important:

index objectClass eq
index uid eq

To make the new index option apply, run the following three commands.

sudo invoke-rc.d slapd stop


sudo slapindex
sudo chown openldap:openldap /var/lib/ldap/*
sudo invoke-rc.d slapd start

Enable the value rootdn and add the value rootpw as the following commands:

rootdn "cn=admin,dc=mycompany,dc=net"
rootpw secret

Install a OpenLDAP client


For doing this with OpenLDAP specifically, I recommend the phpLDAPadmin , is a Web client to LDAP
servers.

# aptitude install phpldapadmin

By default the Debian way's installation configures the phpLDAPadmin virtualhost automatically, but if you want something, for example, to change
the Default Apache Alias to www.mycompany.net/ldap, edit /etc/phpldapadmin/apache.conf and change Alias /phpldapadmin to /ldap.

The file with all phpLDAPadmin configuration is on /etc/phpldapadmin/config.php

Now open in your Web browser http://localhost/phpldapadmin to view your phpLDAPadmin client,by
default Debian will assign username admin to manage your ldap and this is how you login:

cn=admin,dc=mycompany.net,dc=net

2 of 2 16/03/11 09:10

Вам также может понравиться