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

Re: Problem getting started with openLDAP



Matt,
I ran in to these and other messages that I attributed to whitespaces at
the end of each line.Seems like the whitespaces cause syntax errors.
Check your ldif file for whitespaces.


On Wed, 2003-10-29 at 04:30, Matthew Shaylor wrote:
> Hi,
> 
> I hope someone can help me.  I'm trying to get openLDAP up and running under solaris.  I've built everything ok - or at least I think I have and I'm trying to follow the example in the queick start guide to add a record into the LDAP database.
> 
> Some of the parameters in the guide don't work so here is what I type and the error I get:
> 
> % ldapadd -D "cn=Manager,dc=example,dc=com" -f ex.ldiff -v
> Bind Password:
> add objectclass:
>         dcObject
>         organization
> add o:
>         Example Company
> add dc:
>         example
> adding new entry dc=example,dc=com
> ldap_add_s: Invalid syntax
> 
> ...and here is my ex.ldiff:
> 
> -------- ex.ldiff ---------
> dn: dc=example,dc=com
> objectclass: dcObject
> objectclass: organization
> o: Example Company
> dc: example
> 
> dn: cn=Manager,dc=example,dc=com
> objectclass: organizationalRole
> cn: Manager
> ---------------------
> 
> ...and here is the config file I am using to test with:
> 
> -------- slapd.conf ----------
> # $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.23.2.8 2003/05/24 23:19:14 kurt Exp $
> #
> # See slapd.conf(5) for details on configuration options.
> # This file should NOT be world readable.
> #
> include         /usr/local/etc/openldap/schema/core.schema
> 
> pidfile         /usr/local/var/slapd.pid
> argsfile        /usr/local/var/slapd.args
> 
> access to * by * write
> 
> #######################################################################
> # ldbm database definitions
> #######################################################################
> 
> database        bdb
> suffix          "dc=example,dc=com"
> rootdn          "cn=Manager,dc=example,dc=com"
> rootpw          secret
> 
> directory       /usr/local/var/openldap-data
> 
> index   objectClass     eq
> -----------------------
> 
> This is all the standard stuff and I have no idea why its not working.  I've run slapd with a high debug level and I think the following is the important part of the logs:
> 
> conn=0 op=1 ADD dn="dc=example,dc=com"
> bdb_dn2entry_rw("dc=example,dc=com")
> => bdb_dn2id_matched( "dc=example,dc=com" )
> <= bdb_dn2id_matched: no match
> send_ldap_result: conn=0 op=1 p=3
> send_ldap_result: err=21 matched="" text="objectclass: value #0 invalid per syntax"
> send_ldap_response: msgid=2 tag=105 err=21
> 
> In particular the "objectclass: value #0 invalid per syntax" would imply that my "objectclass:" as defined in my .ldiff file was incorrect but it looks ok to me!  I'm new to all this ldap stuff so it doesn't really mean much and I'm just guessing.  I would be very greatful if someone could tell me what is wrong here or point me in the right direction!
> 
> Thanks in advance,
> Matthew
-- 
Kent L. Nasveschuk <kent@wareham.k12.ma.us>