[Date Prev][Date Next] [Chronological] [Thread] [Top]

ever-mounting frustration



I honestly can't believe I still can't get this thing to search data. Maybe I
can't even get it to add data. Thanks for all of you who suggested that I
specify the base object in my ldapsearch query like this:

ldapsearch -b "o=Lerdorf, c=CA" objectclass=\*

However, I still get the exact same error: "No such object" !!!!!!!!!
Someone else suggested that I needed to edit my ldap.conf file to specify the
BASE. I did so, entering a line like:

BASE o=Lerdorf, c=CA

Still, the ldapsearch returned the same results. Now, I think I've successfully
added data because I found some files under /var/lib/ldap that are a bunch of
.dbb files. When I cat them, they contain a bunch of gibberish plus a Lerdorf
or two thrown in there. SO, I guess I must have input at least some data.
However, when I run the command:

ldapadd -w "secret" -D "cn=root, o=Lerdorf, c=CA" < test.ldif
I get the response:
adding new entry o=Lerdorf, c=CA
ldap_add: No such object

Damn that damn no such object message. Maybe I haven't added any data at all.

This is literally driving me crazy. It seems like it should be so simple. I've
followed a million tutorials and NEVER get the expected results. My OpenLdap
NEVER does what it is supposed to. Is there some wayt to get more verbose error
messages than "object not found"? because frankly, that doesn't help me too
much at all. I feel like there must be some key configuration issue that the
docs neglect, because they make it sound like "Set it up like this sample
configuration and it'll work!" Not for me it wont.

For anyone who isn't sick of trying to figure out why my setup won't work,
here's my slapd.conf:
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include		/etc/openldap/slapd.at.conf
include		/etc/openldap/slapd.oc.conf
schemacheck	off
#referral	ldap://root.openldap.org/

pidfile		/var/run/slapd.pid
argsfile	/var/run/slapd.args

#######################################################################
# ldbm database definitions
#######################################################################

database	ldbm
suffix		"o=Lerdorf, c=CA"
#suffix		"o=My Organization Name, c=US"
rootdn		"cn=root, o=Lerdorf, c=CA"
#rootdn		"cn=Manager, o=My Organization Name, c=US"
rootpw		secret
# cleartext passwords, especially for the rootdn, should
# be avoid.  See slapd.conf(5) for details.
directory	/var/lib/ldap

And here's the test.ldif file
dn: o=Lerdorf, c=CA 
o: Lerdorf 
objectclass: organization 

dn: ou=Friends, o=Lerdorf, c=CA 
ou: Friends objectclass: organizationalunit 

dn: ou=Colleagues, o=Lerdorf, c=CA 
ou: Colleagues 
objectclass: organizationalunit 

dn: ou=Misc, o=Lerdorf, c=CA 
ou: Misc 
objectclass: organizationalunit 

dn: cn=Rasmus Lerdorf, ou=Friends, o=Lerdorf, c=CA 
cn: Rasmus Lerdorf 
sn: Lerdorf 
mail: rasmus@lerdorf.on.ca 
mail: rasmus@php.net 
objectclass: person 

dn: cn=John Doe, ou=Misc, o=Lerdorf, c=CA 
cn: John Doe 
sn: Doe 
mail: test@address.com 
objectclass: person 

dangerously close to heaving the monitor out the window,
Gregg