2011/12/29 Graham Leggett <minfrin(a)sharp.fm>
I'm trying to add an index, and am currently epically failing at doing so.
The only documentation I can find is the obsolete Redhat Directory Server
linked to from the 389-ds documentation website.
The docs recommend I use the db2index.pl script, which doesn't work for
/usr/lib64/dirsrv/slapd-myinstance/db2index.pl -D "cn=Directory Manager"
-w `cat /etc/ldap.secret` -n myinstance -t myattribute
adding new entry cn=db2index_2011_12_28_14_49_34, cn=index, cn=tasks,
ldap_add: No such object
-n "myinstance' is this case should be your database name , Which is
generally userRoot. If your database name userRoot in this case ?
if you are not sure what is your database used for storing your Directory
Information Tree, you can look to dse.ldif file
Example, if i have dc=example,dc=com , then
/etc/dirsrv/slapd-<instance-name>/dse.ldif would have an entry like below:
dn: cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
nsslapd-backend: userRoot <=======================
In the above case i am using "userRoot" as my backend for
Also you check through Console.
1. open Director Server console.
2. Click on Configuration
3. Expand your suffix
4. select Databases, to see what is the name of the database being used.
A look at the error log reveals this error:
[28/Dec/2011:14:50:35 -0600] - can't import to nonexistent backend
I am completely stumped. If my backend isn't called "myinstance" then I
have no idea what it's referring to. Given there is only one instance on
the server, I have no idea why 389ds can't figure this out for itself. In
fact, I can't understand why 389ds didn't just handle indexes all on its
The docs suggest doing this:
db2index.pl-D "cn=Directory Manager" -w secret -n ExampleServer -t sn
No idea where "ExampleServer" comes from, and no idea why it's not the
same as "instance_name".
Instance name and Database name are different.
Instance name is name of slapd instance, Database Name is the Name of the
databases which stores your DIT(directory information tree).
I also find a shell script called db2index, as well as the perl script
called db2index.pl. Any idea why there are two scripts that in theory do
the same thing?
Is there an up to date recipe somewhere that explains how to add an index
389 users mailing list