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

Re: ldapadd problem: no DN specified



Thanks Kurt,

As you suggested, the problem was due to malformed LDIF file.  Looks
like there were some extra spaces at the end of the lines.  After I
removed them, it worked fine.

If I have to provide an LDIF file again, I'll be sure to make it
available on a website instead.

Dmisc

On 7/19/06, Kurt D. Zeilenga <Kurt@openldap.org> wrote:
This message generally indicates that the LDIF input is
malformed.  Given no other error messages are printed,
you can assume ldapadd(1) is having trouble picking out
the first "dn:".  This commonly occurs due to garbage
in the file and/or inappropriate indentation (there
should be none here).

Beyond this, I note that many LDIF examples are provided
in OpenLDAP documentation, the FAQ, and, in particular,
the test suite.  You likely can find the problem with
your input file simply by comparing it to known good input
files in the test suite.

Beyond that, you could seek help from the general LDAP
list... LDIF is a standardized format.   In asking questions
in regards to a particular LDIF file, I suggest you provide
the file either as an attachment or via a (http/ftp) URL
to avoid cut-n-paste and other mangling.

Kurt

At 08:47 AM 7/18/2006, Dennis Misc wrote:
>Hi,
>
>I am testing out a new ldap installation by going through the examples given by:
>http://www.zytrax.com/books/ldap/ch5/#step1
>and I am getting this error:
>
>$bash> ldapadd -x -D "cn=jimbob, dc=example, dc=com" -f
>sample-1-people.txt -w dirtysecret
>ldapadd: no DN specified
>
>I've verified that slapd is running.
>root@fdTest1 /home/dshim/Migration/ldap/zytrax> ps -ef |grep slapd
>ldap      5134     1  0 Jul17 ?        00:00:00 /usr/sbin/slapd -h
>ldap:/// -u ldap
>
>It's probably something silly, but if you could point it out, I'd
>appreciate it.
>
>By the way, zytrax's tutorial/book has been very helpful in trying to
>learn how ldap/openldap works. I've learned a lot through that site,
>and it looks like I still have a LONG way to go.  If you could also
>point out other resources (other than www.openldap.org, which btw has
>been fantastic), please let me know. Recommended books, websites, etc.
>  Thank you for your help, openldap community, and google search of
>course..
>
>Dmisc
>
>p.s.
>I am using zytrax's given example slapd.conf
>(modified a little to reflect the newer version of slapd that I am
>running (openldap-2.3.24-2)  on Fedora 5.  It's an rpm package
>available under the development tree.)
>
>--------------------------
>include         /etc/openldap/schema/core.schema
>include         /etc/openldap/schema/cosine.schema
>include         /etc/openldap/schema/inetorgperson.schema
>pidfile           /var/run/openldap/slapd.pid
>loglevel        -1
>
>database bdb
>suffix "dc=example, dc=com"
>
>rootdn "cn=jimbob, dc=example, dc=com"
>rootpw dirtysecret
>directory       /var/lib/ldapindex   uid     eq
>index   cn,gn,mail eq,sub
>index sn eq,sub
>index ou eq
>index default eq,sub
>index telephonenumbercachesize 10000
>checkpoint 128 15
>
>---------------------------------------------
>Following is the content of the ldif file: <sample-1-people.txt>
>
>version: 1
>
>dn: dc=example,dc=com
>dc: example
>description: My wonderful company
>objectClass: dcObject
>objectClass: organization
>o: Example, Inc.
>
>dn: ou=people, dc=example,dc=com
>ou: people
>description: All people in organisation
>objectclass: organizationalunit
>
>dn: cn=Robert Smith,ou=people,dc=example,dc=com
>objectclass: inetOrgPerson
>cn: Robert Smith
>cn: Robert J Smith
>cn: bob  smith
>sn: smith
>uid: rjsmith
>userpassword: rJsmitH
>carlicense: HISCAR 123
>homephone: 555-111-2222
>mail: r.smith@example.com
>mail: rsmith@example.com
>mail: bob.smith@example.com
>description: swell guy
>ou: Human Resources