Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm following: https://help.ubuntu.com/12.10/serverguide/openldap-server.html 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

1 Answer 1

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 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )  
olcObjectClasses: ( 1.3.6.1.4.1.1466.344 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

 
discard

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.