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.
At 08:47 AM 7/18/2006, Dennis Misc wrote:
>I am testing out a new ldap installation by going through the examples given by:
>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
>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
>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.)
>suffix "dc=example, dc=com"
>rootdn "cn=jimbob, dc=example, dc=com"
>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>
>description: My wonderful company
>o: Example, Inc.
>dn: ou=people, dc=example,dc=com
>description: All people in organisation
>dn: cn=Robert Smith,ou=people,dc=example,dc=com
>cn: Robert Smith
>cn: Robert J Smith
>cn: bob smith
>carlicense: HISCAR 123
>description: swell guy
>ou: Human Resources