ldapmodify to add OU failed, and led to "ldap_search: Operations error"
ldapmodify to add OU failed, and led to "ldap_search: Operations
I set up a directory and am feeling my way towards making it
live by doing one thing at a time. I successfully added quite a
large number of users using ldapmodify, and could retrieve them
with ldapsearch and db2ldif.
Then I tried to add some new OUs in order to copy a subset of
the OU hierarchy we have on Windows. But when I ran the
ldapmodify it failed.
From that moment on, every ldapsearch I tried resulted in:
ldap_search: Operations error
I stopped and restarted the ldap daemon and now every search I
ldap_search: No such object
The database looks as if it is empty
What did I do wrong? Can a botched modify so easily wipe out
what is already there? Or are they secretly hiding somewhere? Is
there a utility that can show me what is actually in the
database even if I don't know what its root name is? (I thought
db2ldif might do that and it shows nothing now)
I know I can wipe this database entirely (it looks like I
already have!) and re-install. BUT I want to know what I did
wrong so I don't do it again. The LDIFs to be imported into the
directory will come from a program I wrote (it gathers
information from various sources such as an SQL database, WAD,
/etc/passwd...) and I really don't want to risk repeating my
mistake in batch runs at 2am after we've gone live and coming in
to find no-one can use the directory.
Examples of what I did:
Command used to import LDIF to define an OU
ldapmodify -a -B "dc=bbk,dc=ac,dc=uk" -D "cn=directory manager"
the LDIF that was used:
Error log from ldapmodify:
[09/Jun/2008:19:54:47 +0100] - WARNING: Import is running with
nsslapd-db-private-import-mem on; No other process is
allowed to access the database
[09/Jun/2008:19:54:47 +0100] - Bulk import: begin import on
[09/Jun/2008:19:54:56 +0100] - import userRoot: WARNING:
Skipping entry "ou=students,ou=people,dc=bbk,dc=ac,dc=uk" which
has no parent, ending at line 0 of file "(bulk import)"
[09/Jun/2008:19:55:05 +0100] - import userRoot: Workers
finished; cleaning up...
[09/Jun/2008:19:55:05 +0100] - import userRoot: Workers cleaned up.
[09/Jun/2008:19:55:05 +0100] - import userRoot: Indexing
[09/Jun/2008:19:55:05 +0100] - Nothing to do to build ancestorid