1 This is the INSTALL file for 1.0-beta. See
2 http://www.venaas.no/ldap/bind-sdb/ for updates or other information.
6 You need the source for BIND 9.1.0 or newer (for zone transfers you
7 will need at least 9.1.1rc3 due to a bug). Basically you need to follow
8 the instructions in doc/misc/sdb, if my instructions don't make sense,
9 please have a look at those as well.
11 Copy ldapdb.c to bin/named and ldapdb.h to bin/named/include in the
14 Next alter bin/named/Makefile.in. Add ldapdb.@O@ to DBDRIVER_OBJS and
15 ldapdb.c to DBDRIVER_SRCS. You also need to add something like
16 -I/usr/local/include to DBDRIVER_INCLUDES and
17 -L/usr/local/lib -lldap -llber -lresolv to DBDRIVER_LIBS
18 depending on what LDAP library you have and where you installed it.
20 Finally you need to edit bin/named/main.c. Below where it says
21 "#include "xxdb.h"", add the line "#include <ldapdb.h>". Below where
22 it says "xxdb_init();" add the line "ldapdb_init();", and finally
23 below where it says "xxdb_clear();", add "ldapdb_clear();".
25 Now you should hopefully be able to build as usual; first configure
26 and then make. If you get an error message about ldap_memfree() not
27 being defined, you're probably using an LDAP library with the
28 interface defined in RFC 1823. To build, uncomment the "#define
29 LDAPDB_RFC1823API" line near the top of ldapdb.c.
31 Also, if you're using an LDAPv2 only server, you need to change
32 the line "#define LDAPDB_LDAP_VERSION 3" in ldapdb.c. Simply
33 replace 3 with 2. Instead of editing the file, you may define
34 LDAPDB_LDAP_VERSION yourself.
36 If you want to use TLS, you need to uncommed the #define LDAPDB_TLS"
37 line near the top of ldapdb.c.
41 Before you do any configuring of LDAP stuff, please try to configure
42 and start bind as usual to see if things work.
44 To do anything useful, you need to store a zone in some LDAP server.
45 You must use a schema called dNSZone. Note that it relies on some
46 attribute definitions in the Cosine schema, so that must be included
47 as well. The Cosine schema probably comes with your LDAP server. You
48 can find dNSZone and further details on how to store the data in your
49 LDAP server at http://www.venaas.no/ldap/bind-sdb/
51 To make BIND use a zone stored in LDAP, you will have to put something
52 like this in named.conf:
56 database "ldap ldap://158.38.160.245/dc=venaas,dc=com,o=DNS,dc=venaas,dc=no 172800";
59 When doing lookups BIND will do a sub-tree search below the base in the
60 URL. The number 172800 is the TTL which will be used for all entries that
61 haven't got the dNSTTL attribute. It is also possible to add a filter to
62 the URL, say "ldap://host/base???(o=internal)".
64 Version 1.0 also has support for simple LDAP bind, that is, binding to
65 LDAP using plain text authentication. The bind dn and password is coded
66 into the URL as extensions, according to RFC 2255. If you want simple
67 bind with say dn "cn=Manager,dc=venaas,dc=no" and password "secret", the
68 URL will be something like this:
70 ldap://158.38.160.245/dc=venaas,dc=com,o=DNS,dc=venaas,dc=no????!bindname=cn=Manager%2cdc=venaas%2cdc=no,!x-bindpw=secret
72 This URL may also include a filter part if you need it. Note that in
73 the bind dn, "," is hex-escaped as "%2c". This is necessary since ","
74 is the separator between the extension elements. The "!" in front of
75 "bindname" and "x-bindpw" can be omitted if you prefer. "x-bindpw" is
76 not standardized, but it's used by several other LDAP applications. See
79 Finally, if you enabled TLS when compiling, you can also use TLS if
80 you like. To do this you use the extension "x-tls", e.g.
81 ldap://158.38.160.245/dc=venaas,dc=com,o=DNS,dc=venaas,dc=no????!bindname=cn=Manager%2cdc=venaas%2cdc=no,!x-bindpw=secret,x-tls
83 Stig Venaas <venaas@uninett.no> 2004-08-15