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

searching OpenLDAP



Is there a way to search OpenLDAP for address book
ALL entries using a wildcard "*" ?

If anyone has anything going can they please
post a sample ldif?

Thank you


On Wed, 21 Nov 2001 00:44, OpenLDAP Mailing List wrote:
> I have found that the following works reliably:
>
> 1. stop ldap server
>
> Then,
>
> # slapindex -f /path/to/slapd.conf
> # slapcat -f /path/to/slapd.conf > foo.ldif
>
> To load back,
> # rm /var/ldap/*.dbb (or where your dbm files are)
> # slapadd -f /path/to/slapd.conf -c < foo.ldif
> # slapindex -f /path/to/slapd.conf
>
> start ldap server
>
> Notice the slapindex and the -c in slapadd.
>
> Kevin
>
> > -----Original Message-----
> > From: Darren Gamble [mailto:Darren.Gamble@sjrb.ca]
> > Sent: Tuesday, November 20, 2001 3:52 PM
> > To: 'Peter W'; openldap-software@OpenLDAP.org
> > Subject: RE: slapadd, No such object (?)
> >
> >
> > Good day,
> >
> > Thanks for your reply.
> >
> > I've noticed (and fixed) that, but that was just an attempt
> > to troubleshoot
> > the problem.  It doesn't explain the initial problem with
> > importing the data
> > exported by slapcat.  I should have included this in the
> > original message;
> > sorry.  I'll do this now.
> >
> > Is slapadd supposed to be compatible with the files slapcat
> > outputs?  The
> > output that slapcat gives me has the higher level objects
> > later in the ldif-
> > is this OK?  Do I have to massage the data outputted by slapcat before
> > slapadd can use it?  Regardless, if I import this data, I
> > can't query it (it
> > imports without errors, though).
> >
> > BTW the plain password is just for testing; the "real"
> > programs using it
> > will be PHP and will use a CRYPT'ed password.  This just makes testing
> > easier.
> >
> > Here's the whole ldif.
> >
> >
> >
> > dn: uid=dgamble,ou=Users,o=Shawtest,dc=shaw,dc=ca
> > objectClass: inetOrgPerson
> > objectClass: person
> > objectClass: top
> > uid: dgamble
> > cn: Darren Gamble
> > sn: Gamble
> > ou: All Users
> > ou: Administrators
> > creatorsName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > createTimestamp: 20011116213120Z
> > userPassword:: dGVzdHBhc3M=
> > modifiersName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > modifyTimestamp: 20011116213355Z
> >
> > dn: ou=All Users,ou=Users,o=Shawtest,dc=shaw,dc=ca
> > objectClass: organizationalUnit
> > ou: All Users
> > description: All Users
> > creatorsName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > createTimestamp: 20011116205421Z
> > modifiersName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > modifyTimestamp: 20011116205421Z
> >
> > dn: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > objectClass: organizationalRole
> > cn: Manager
> > description: Directory Manager
> > creatorsName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > createTimestamp: 20011116205421Z
> > modifiersName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > modifyTimestamp: 20011116205421Z
> >
> > dn: ou=Administrators,ou=Users,o=Shawtest,dc=shaw,dc=ca
> > objectClass: organizationalUnit
> > ou: All Users
> > description: All Users
> > creatorsName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > createTimestamp: 20011116205422Z
> > modifiersName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > modifyTimestamp: 20011116205422Z
> >
> > dn: ou=Users,o=Shawtest,dc=shaw,dc=ca
> > objectClass: organizationalUnit
> > ou: Users
> > description: LDAP Users and Groups
> > creatorsName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > createTimestamp: 20011116205421Z
> > modifiersName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > modifyTimestamp: 20011116205421Z
> >
> > dn: o=Shawtest,dc=shaw,dc=ca
> > objectClass: organization
> > o: Shawtest
> > description: Encompassing group for test server
> > creatorsName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > createTimestamp: 20011116205421Z
> > modifiersName: cn=Manager,o=Shawtest,dc=shaw,dc=ca
> > modifyTimestamp: 20011116205421Z
> >
> >
> > ============================
> > Darren Gamble
> > Planner, Regional Services
> > Shaw Cablesystems GP
> > 630 - 3rd Avenue SW
> > Calgary, Alberta, Canada
> > T2P 4L4
> > (403) 781-4948
> >
> >
> > -----Original Message-----
> > From: Peter W [mailto:peterw@usa.net]
> > Sent: Tuesday, November 20, 2001 2:48 PM
> > To: Darren Gamble
> > Cc: openldap-software@OpenLDAP.org
> > Subject: Re: slapadd, No such object (?)
> >
> > On Tue, Nov 20, 2001 at 10:56:46AM -0700, Darren Gamble wrote:
> > > suffix          "o=Shawtest,dc=shaw,dc=ca"
> > > rootdn          "cn=Manager,o=Shawtest,dc=shaw,dc=ca"
> > >
> > > === Sample input ldif (shawtest1.ldif)
> > >
> > > dn: uid=dgamble,ou=Users,o=Shawtest,dc=shaw,dc=ca
> > >
> > > === Sample command and output
> > >
> > > $ ldapadd -h localhost -f shawtest1.ldif -x -D
> > > "cn=Manager,o=Shawtest,dc=shaw,dc=ca" -w "d8bxl3"
> > > adding new entry "uid=dgamble,ou=Users,o=Shawtest,dc=shaw,dc=ca"
> > > ldap_add: No such object
> >
> > Trying to add "uid=dgamble" before adding "ou=Users" is like trying
> > to put passengers on a train when all you've done is lay the track.
> > All the "higher" obects must exist before an LDAP add operation can
> > work. Add your "Users" org unit & try again.
> >
> > -Peter
> >
> > P.S. I've always preferred "-W" to "-w secret" but that's your call.
> > The -w stuff ends up in history files, and also is generally (on most
> > platforms) visible to any other user/process running on the
> > same system.

-- 

Steve Simeonidis
Network Engineer, Spherion Education
Spherion Group Ltd

1st Floor, 493 St. Kilda Rd, Melbourne VIC 3004, Australia
Phone:  +61 3 9243 2382    Fax:    +61 3 9820 2010
Email: stevesimeonidis@spherion.com