Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm following: and when I get to the part that says

ldapsearch -x -LLL -H ldap:/// -b dc=example,dc=com dn

I get:

Invalid DN syntax (34)
Additional information: invalid DN

I noticed:

sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config dn
dn: cn=config
dn: cn=schema,cn=config
dn: olcDatabase={-1}frontend,cn=config
dn: olcDatabase={0}config,cn=config

Thanks for any help

share|improve this question

You have no schema defined. In order to perform your example search you need a schema with something close to the following definitions which are taken from core.schema.

olcAttributeTypes: ( 0.9.2342.19200300.100.1.25 NAME ( 'dc' 'domainComponent' ) DESC 'RFC1274/2247: domain component' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX SINGLE-VALUE )  
olcObjectClasses: ( NAME 'dcObject' DESC 'RFC2247: domain component object' SUP top AUXILIARY MUST dc )

In fact, you should probably just add core.schema to your slapd, ubuntu-12.10 uses slapd-config so, you'll actually be adding a .ldif file.

sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/core.ldif

Depending on what you're doing you'll probably also want:

  • cosine (required for inetorgperson)
  • inetorgperson
  • nis (I recommend rfc2307bis, but you'd have to take it from elsewhere.)
  • misc (mail routing)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.