how to configure isc-dhcp-server-ldap + slapd?

Asked by Ulf Mehlig

I've installed standard isc-dhcp-server, isc-dhcp-server-ldap and slapd packages on Ubuntu 11.04. My dhcpd.conf contains

  ldap-server "localhost";
  ldap-port 389;
  ldap-base-dn "ou=dhcp,dc=test,dc=local";
  ldap-method dynamic;

ldap queries can be sent by any user on localhost, so I did not use ldap-username + ldap-password. I converted the dhcp.schema from /usr/share/doc/isc-dhcp-server-ldap/dhcp.schema.gz with slaptest, hand-edited the file (changing first two and deleting the last 7 lines, using the .ldif files in /etc/ldap/schema as template) and imported it with ldapadd -Y EXTERNAL -H ldapi:/// -f dhcp.ldif.

Afterwards, I made dhcpServer and dhcpService entries in the LDAP database (via LAM, the following output is from ldapsearch):

  dn: ou=dhcp,dc=test,dc=local
  ou: dhcp
  objectClass: top
  objectClass: organizationalUnit

  dn: cn=my-server,ou=dhcp,dc=test,dc=local
  cn: my-server
  objectClass: dhcpServer
  objectClass: top
  dhcpServiceDN: cn=dhcpConfig,ou=dhcp,dc=test,dc=local

  dn: cn=dhcpConfig,ou=dhcp,dc=test,dc=local
  cn: dhcpConfig
  objectClass: dhcpService
  objectClass: top
  objectClass: dhcpOptions
  dhcpOption: routers 192.168.92.254

  dn: cn=192.168.92.0,cn=dhcpConfig,ou=dhcp,dc=test,dc=local
  cn: 192.168.92.0
  dhcpNetMask: 24
  dhcpOption: domain-name-servers 192.168.92.232
  dhcpOption: subnet-mask 255.255.255.0
  dhcpOption: broadcast-address 192.168.92.255
  objectClass: dhcpSubnet
  objectClass: top

Unfortunately, dhcpd has difficulties with this configuration:

 # dhcpd -d
 Error: Cannot find dhcpService DN 'cn=dhcpConfig,ou=dhcp,dc=campus-braganca,dc=ufpa,dc=local' with server reference. Please update the LDAP server entry 'cn=my-server,ou=dhcp,dc=campus-braganca,dc=ufpa,dc=local'
 Configuration file errors encountered -- exiting

Any help to fix this problem is much appreciated!
Ulf

Question information

Language:
French Edit question
Status:
Solved
For:
Ubuntu isc-dhcp Edit question
Assignee:
No assignee Edit question
Solved by:
Ulf Mehlig
Solved:
Last query:
Last reply:
Revision history for this message
Ulf Mehlig (umehlig) said :
#1

ups -- that was easy: I forgot to specify dhcpPrimaryDN with the dn of thte DHCP server ...

Revision history for this message
Ulf Mehlig (umehlig) said :
#2

ups -- that was easy: I forgot to specify dhcpPrimaryDN with the dn of thte DHCP server ...

Revision history for this message
Ulf Mehlig (umehlig) said :
#3

ups -- that was easy: I forgot to specify dhcpPrimaryDN with the dn of the DHCP server ...