Public bug reported:

Binary package hint: ldapscripts

steps to reproduce:
 - install slapd
 - install and configure ldapscripts
 - execute _ldapinit

detailed info:

when you install slapd debconf creates two objects, root organization
and admin user:

dn: dc=nodomain
objectClass: top
objectClass: dcObject
objectClass: organization
o: nodomain
dc: nodomain

dn: cn=admin,dc=nodomain
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator


_ldapinit is intented to initially populate ldap with basic entries but it 
fails with default slapd configuration:

# _ldapinit 
Error initializing LDAP tree

tail /var/log/ldapscripts.log
>> 07/18/07 - 15:02 : Command : /usr/bin/_ldapinit 
ldap_add: Already exists (68)
Error initializing LDAP tree


to avoid this error there's two options:
  1- stop the slapd server, remove the BDB files on /var/lib/ldap/*, start 
slapd again, execute _ldapinit
  2- modify _ldapinit to avoid conflicts with pre-populated slapd

i think second approach is better and i recommend a new file
(_ldapinit.debian). this is a diff against _ldapinit and
_ldapinit.debian (a copy of the first) that solves the problem:

diff -u _ldapinit _ldapinit.debian 
--- _ldapinit   2007-07-18 14:59:28.000000000 +0200
+++ _ldapinit.debian    2007-07-18 15:04:32.000000000 +0200
@@ -35,13 +35,6 @@
 end_ok "Successfully initialized LDAP tree"
 
 # Ldif info ##################################
-##dn: <suffix>
-##objectClass: dcObject
-##objectClass: organization
-##dc: <_suffix>
-##o: <_suffix>
-##description: <_suffix>
-##
 ##dn: <usuffix>,<suffix>
 ##objectClass: top
 ##objectClass: organizationalUnit


as you can see, is enough with removing the root object to avoid errors.

instead of creating a file called _ldapinit.debian we could rename the
original to something like _ldapinit.flat and keep modified one as
_ldapinit


related info:
lsb_release --all
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 7.04
Release:        7.04
Codename:       feisty

Package: ldapscripts
Priority: optional
Section: universe/admin
Installed-Size: 216
Maintainer: Pierre Habouzit <[EMAIL PROTECTED]>
Architecture: all
Version: 1.4-2

** Affects: ldapscripts (Ubuntu)
     Importance: Undecided
         Status: New

-- 
_ldapinit doesn't work with default slapd configuration
https://bugs.launchpad.net/bugs/126759
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to