I don't know much about cn=monitor,cn=config, but I would first look at the format of your LDIF file.

You only use a dash (-) to separate multiple changes on the same previously defined DN (dn: cn=module,cn=config).

If you change the target of modifications to a different DN (dn: olcDatabase=monitor,cn=config) then you separate it by a blank line, not a dash.

You seem to be doing parts of both. Try removing the dash or remove the blank line, the "dn: olcDatabase=monitor,cn=config" and the "changetype: add" lines, depending on what you were trying to do.

An example of multiple DN targets within one LDIF file can be found in provider_sync.ldif listed in the LDAP Replication section of https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html

Bob


From: Craig White <craig.white@ttiltd.com>
To: openldap-technical@openldap.org
Sent: Friday, 14 October 2011 1:30 AM
Subject: adding monitor to cn=config on already running slapd

The openldap guide suggests that the configuration for dynamic configuration is yet to be written and it seems it is probably easy to get configured from the start but not intuitive enough for me to add to an already running server.

(this is my consumer if that makes a difference)

# cat monitor-add.ldif
# Load dynamic backend modules
dn: cn=module,cn=config
changetype: add
add: module
olcModuleload: back_monitor
-

# http://www.openldap.org/doc/admin24/monitoringslapd.html
dn: olcDatabase=monitor,cn=config
#objectClass: olcDatabaseConfig
changetype: add
add: olcDatabase
olcDatabase: {2}monitor

# ./monitor-add.sh
Enter LDAP Password:
adding new entry "cn=module,cn=config"
ldapmodify: update failed: cn=module,cn=config
ldap_add: Bad parameter to an ldap routine (-9)

I can't seem to find the right ldif combination to add monitor
(Ubuntu Lucid / slapd 2.4.21-0ubuntu5.5)

# grep ModulePath /etc/ldap/slapd.d/cn\=config/cn\=module\{0\}.ldif
olcModulePath: /usr/lib/ldap

--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

Need help communicating between generations at work to achieve your desired success? Let us help!