INSTALL.ldap revision bf49a52178db60df60f2316a3977b2249f7c0edb
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereThis is the INSTALL file for 0.3. See
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclerehttp://www.venaas.no/ldap/bind-sdb/ for updates or other information.
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere
0a05fab9aadd37834734ffe106fc8ad4488fb3e3rbowenBUILDING
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere
1a5a0356d04b1772b5a6b77c972774ab68832f81gryzorYou need the source for BIND 9.1.0 or newer (for zone transfers you
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclerewill need at least 9.1.1rc3 due to a bug). Basically you need to follow
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclerethe instructions in doc/misc/sdb, if my instructions doesn't make sense,
031b91a62d25106ae69d4693475c79618dd5e884fieldingplease have a look at that as well.
031b91a62d25106ae69d4693475c79618dd5e884fielding
031b91a62d25106ae69d4693475c79618dd5e884fieldingCopy ldapdb.c to bin/named and ldapdb.h to bin/named/include in the
031b91a62d25106ae69d4693475c79618dd5e884fieldingsource tree.
031b91a62d25106ae69d4693475c79618dd5e884fielding
031b91a62d25106ae69d4693475c79618dd5e884fieldingNext alter bin/named/Makefile.in. Add ldapdb.@O@ to DBDRIVER_OBJS and
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereldapdb.c to DBDRIVER_SRCS. You also need to add something like
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere-I/usr/local/include to DBDRIVER_INCLUDES and
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere-L/usr/local/lib -lldap -llber -lresolv to DBDRIVER_LIBS
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfcleredepending on what LDAP library you have and where you installed it.
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereFinally you need to edit bin/named/main.c. Below where it says
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere"#include "xxdb.h"", add the line "#include <ldapdb.h>". Below where
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereit says "xxdb_init();" add the line "ldapdb_init();", and finally
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclerebelow where it says "xxdb_clear();", add "ldapdb_clear();".
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereNow you should hopefully be able to build it.
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereCONFIGURING
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclere
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereBefore you do any configuring of LDAP stuff, please try to configure
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisand start bind as usual to see if things work.
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisTo do anything useful, you need to store a zone in some LDAP server.
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereIf you like, you could try to use my LDAP server as a test. To test,
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisadd the following to your named.conf:
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentiszone "ldap" {
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis type master;
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis database "ldap ldap://129.241.20.67/dc=venaas,dc=com,o=DNS,dc=venaas,dc=no 86400";
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis};
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisand then try to do for instance host www.ldap. localhost
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisThe LDAP URL consists of a hostport part and the base (the node above
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclerewhere the zone is stored). BIND will do a one-level search with this
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclerebase. Finally, the number 86400 is the TTL which will be used for all
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereentries that haven't got the dNSTTL attribute.
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisTo store data in your own LDAP server you can use the Cosine dNSDomain
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisclass, or even better dNSDomain2. Your LDAP server probably comes
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentiswith dNSDomain, you can find dNSDomain2 and further details on how
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisto store the data in your LDAP server at
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentishttp://www.venaas.no/ldap/bind-sdb/
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisYou can also see how I did it by searching in my LDAP server, the
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentisaddress and base is as in the LDAP URL above.
3670f762ba6e3c38c29ea8a90fcdd5281ab13d53lgentis
eec3a6d65a733157dc4cf3026abda13dcb90d0cfjfclereStig Venaas <venaas@uninett.no> 2001-03-03
e17a62ba3908de0d2a9907b8771dd53d9762b602gryzor