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

Re: No such object



Julian Sitkewich wrote:
> 
> Hopefully someone can help me with this problem. Here is what is happening:
> 
> I run 'ldif2ldbm' on slapd.conf and myldif files to convert them to a database.
> Next I start slapd service and start testing.

did you verify that the slapd database files are actually in the
/usr/tmp directory?

> 
> The first test is this:
> /usr/local/bin/ldapsearch -h 127.0.0.1 'objectclass=*'
> Yields this error:
> ldap_search: No such object

try starting slapd from a console, and turn on debugging, watch as it
comes up to see if it is reading anything.

> 
> Next when I run:
> ldapadd -D "cn=newuser dc=alservices, dc=com" -W < /usr/local/etc/openldap/myldif
> Yields this error:
> ldap_bind: No such object

This is correct. There is no cn=newuser in your ldif file, so you can't
bind, because cn=newuser does not exist.

try this: 
ldapadd -D "cn=root dc=alservices, dc=com" -w secret -f
/usr/local/etc/openldap/myldif

root is the administrative user for the directory, if you bind as that
user, you can add users. Otherwise, since your database contains no
entries that have adminstrative privileges, you can't add a user.

> 
> Thanks,
> 
> julian
> 
> My config files are below...
> 
> LDIF/CONFIG files
> 
> My ldbm definition (from slapd.conf) is as follows:
> ##################################################
> database        ldbm
> suffix          "dc=alservices, dc=com"
> directory       /usr/tmp
> rootdn          "cn=root, dc=alservices, dc=com"
> rootpw          secret
> # cleartext passwords, especially for the rootdn, should
> # be avoid.  See slapd.conf(5) for details.
> 
> Next ldif (myldif) file:
> ##################################################
> dn: dc=alservices, dc=com
> dc: alservices
> o: My Company
> objectclass: organization
> objectclass: dcObject
> 
> dn: cn=root, dc=alservices, dc=com
> cn: root
> sn: root
> objectclass: person
> 
>