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

Re: Problems in finding entries with openldap (ITS#1492)



Note that this is a software use question; you should address it
to the openldap-software mailing list.

massimiliano.pullo@edspa.it wrote:
> 
> Full_Name: Massimiliano Pullo
> Version: 2.0.7
> OS: Red Hat Linux release 7.1 (Seawolf)
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (213.175.2.50)
> 
> I'm trying to replicate the directory structure I already have using Netscape
> directory Server 3.0, using "c=it" as unique suffix for all the organizations we
> serve.
> I'm trying to configure the first organization (o=edspa, c=it) by editing the
> slapd.conf file as follows:
> 
> database        ldbm
> suffix          "o=edspa,c=it"
> rootdn          "cn=Manager, o=edspa, c=it"
> rootpw          secret
> directory       /var/lib/ldap
> index   objectClass,uid,uidNumber,gidNumber     eq,pres
> index   cn,mail,givenname,sn                    eq,subinitial,pres,sub
> 
> Then I've created the following ldif file to initialize db:
> 
> dn: o=edspa, c=it
> objectClass: organization
> o: rupa
> 
> dn: cn=Manager, o=edspa, c=it
> objectclass: person
> cn: Manager
> sn: Manager

You don't need this, BTW.

> 
> dn: cn=Claudio Baiocchi,o=edspa, c=it
> objectClass: person
> objectClass: organizationalperson
> objectClass: inetorgperson
> objectClass: newPilotPerson
> givenName: Claudio
> telephoneNumber: 06.22739.208
> mail: claudio.baiocchi@edspa.it
> sn: Baiocchi
> cn: Claudio Baiocchi
> street: Via Atanasio Soldati 80 (La Rustica)
> l: Roma
> facsimileTelephoneNumber: 06.22739.233
> postalCode: 00155
> mobile: 335.5776013
> 
> Initializing the db with slapadd, I have the following output:
> 
> added: "o=edspa, c=it" (00000001)
> added: "cn=Manager, o=edspa, c=it" (00000002)
> added: "cn=Claudio Baiocchi,o=edspa, c=it" (00000003)
> 
> Then, after starting the slapd daemon, I can't find anything using ldapsearch:
> 
> [root@cauwb002 openldap]# ldapsearch -x

You need to specify a base for the search, e.g.

ldapsearch -x -b 'o=edspa, c=it'

otherwise you can use the "defaultSearchBase" directive
in slapd.conf:

defaultSearchBase	"o=edspa, c=it"

or, finally, in your database:

suffixAlias	"" "o=edspa, c=it"
suffix   	"o=edspa, c=it"
suffix		""

the last two solutions force an empty "" base search
to resolve in your naming context.

Pierangelo.

-- 
Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 |
mailto:pierangelo.masarati@polimi.it
via La Masa 34, 20156 Milano, Italy   |
http://www.aero.polimi.it/~masarati