After a fresh installation of Redhat 6.2 I decided to try out ldap-abook. This seems like a nice
piece of software and I'm looking forward to trying it out.
However, it took a "while" to get it running, and the documentation really
need an upgrade. Here is the procedure I've used - hopefully it will save you some time.
Also note that this is not the most ideal configuration - maybe you want
to alter it to be more safe (no clear text passwords, and remember to at least change the password),
compatible with Outlook etc, but this should get you started.:
NB: I haven't gotten to the Outlook / Netscape part yet, so if anyone could explain what I
should do to enable both Outlook and Netscape Messenger ldap lookups, it could save
me some time. E.g. which objectclass files should I include ? etc.
After a fresh installation of Redhat 6.2 I decided to try out ldap-abook. This seems like a nice
piece of software and I'm looking forward to trying it out.
However, it took a "while" to get it running, and the documentation really
need an upgrade. Here is the procedure I've used - hopefully it will save you some time.
Also note that this is not the most ideal configuration - maybe you want
to alter it to be more safe (no clear text passwords, and remember to at least change the password),
compatible with Outlook etc, but this should get you started.:
NB: I haven't gotten to the Outlook / Netscape part yet, so if anyone could explain what I
should do to enable both Outlook and Netscape Messenger ldap lookups, it could save
me some time. E.g. which objectclass files should I include ? etc.
LDAP / ldap-abook installation procedure listed below:
0. Install openldap server
Assumes this is done from .rpm files available from Redhat.
1. Download and install perl source:
- most of the source below is available from http://www.perl.com
cd /pack
tar xzvf <package>.tar.gz
cd /pack/<package>
perl Makeperl.PL
make
make test
make install
for each of:
MIME-Base 64
URI-1.09
Convert-ASN1-0.07
perl-ldap-0.21
IN THE GIVEN ORDER!
2. Install LDIF files into LDBM database:
Create file called first.ldif:
dn: o=abook
cn: abook
objectClass: organization
and create initial ldbm database by running:
cd <where first.ldif file is placed>
ldif2ldbm -f /etc/openldap/slapd.conf -i first.ldif
3. Make sure that your TCP wrapper doesn't stop access to
the LDAP server.
Verify that /etc/hosts.allow and /etc/hosts.deny allows
access.
The best configuration IMHO is to include only the needed services,
and by default disallow everything else, e.g. by having:
/etc/hosts.allow:
in.ftpd:client.lan, server.lan, localhost
in.telnetd:client.lan, server.lan, localhost
sshd:client.lan, server.lan, localhost
slapd:client.lan, server.lan, localhost
/etc/hosts.deny:
ALL:ALL
This opens for connections to a FTP server, a telnet server,
a SSH server (if installed), and the LDAP server.
4. Configure LDAP server / client:
/etc/openldap/ldap.conf (client):
BASE o=abook
HOST 127.0.0.1
this saves a lot of typing on the terminal - e.g. when using
ldapsearch and ldapadd.
/etc/openldap/slapd.conf (server):
include /etc/openldap/slapd.at.conf
include /etc/openldap/slapd.oc.conf
schemacheck on
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
database ldbm
suffix "o=abook"
rootdn "cn=admin, o=abook"
rootpw secret
directory /usr/ldap/abook
index cn
See if this works:
ldapsearch "objectclass=*"
should return something like:
o=abook
cn=abook
objectclass=organization
5. Install ldap-abook:
cd /pack
tar xzvf ldap-abook<version>.tar.gz
cd /pack/ldap-abook<version>
perl Makeperl.PL
make
make test
make install
Copy ObjectClass definition file to /etc/openldap, and add an
include directive to the configuration file:
cp /pack/ldap-abook<version>/ldap/abookPerson.oc.conf /etc/openldap/
Add this line to /etc/openldap/slapd.conf, e.g. below the other include directives:
include /etc/openldap/abookPerson.oc.conf
6. Test if ldap-abook works:
6a - Add entries
Browse to abook.cgi - e.g. by entering
<ldapserver>/cgi-bin/abook.cgi
and enter data.
6b - Verify entries from LDAP clients:
ldapsearch "objectclass=*"