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

RE: ADD Succeeds, but I can't find the entry?



Hmmm,

With slapcat, the entry does indeed come out, and it looks fine to me:

dn: uid=JBloe,oc=OTHER,c=CA,ou=Users,o=CGDI
st: BC
title: Technical
mail: jdoyon@nrcan.gc.ca
userPassword:: MTIzNA==
cgdijunkmail: NO   
cgdiregistersecret: 26FD17AA25E3FCBE
objectClass: top
objectClass: person  
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: cgdiuser
cgdilanguage: en
cn: Joe Bloe
sn: Bloe
givenName: Joe  
businessCategory: Government - Municipal/Regional/County/City
cgdiauthno: 0
cgdiregfrom: Atlas
cgdiemail: Atlas-NO
creatorsName: cn=URDS,ou=Clients,o=CGDI
createTimestamp: 20010802140747Z
modifiersName: cn=URDS,ou=Clients,o=CGDI
modifyTimestamp: 20010802140747Z

My access stuff in slapd.conf looks like this:

defaultaccess none

access to *
        by anonymous auth
        by users read
        by self write
        by dn="cn=URDS,ou=Clients,o=CGDI" write

That last DN (URDS) is used to bind when adding entries, as you will note
from the creatorsName and modifiersName.

I've tried every way I know how to get ldapsearch to find uid=JBloe, but
without luck.  I even tried changing the defaultaccess to write and the
access to * by * write , without result.

I allways use a "base" of "o=CGDI", that's actually the highest level in my
hierarchy and the only "o" in the three, and you will note that JBloe falls
under it.

Could it be an indexing issue? Do I need to rebuild indexes when entries are
added?

Also the only difference between this entry and others is that:

- All others were imported via an LDIF
- This one has those last 4 attributes that all others don't (Weren't
migrated via the LDIF)

Also note that form what I see in the slapcat output, the filters used to
search *should* work, right?

Just in case this matters, this is how I configured it:

./configure  --enable-slapd --enable-crypt --enable-modules
--enable-wrappers --enable-dynamic --enable-ldap

Anybody????

Thanks again!
J.F.

> ----------
> From: 	Pierangelo Masarati[SMTP:masarati@aero.polimi.it]
> Sent: 	Thursday, August 02, 2001 1:24 PM
> To: 	Doyon, Jean-Francois
> Cc: 	'openldap-software@OpenLDAP.org'
> Subject: 	Re: ADD Succeeds, but I can't find the entry?
> 
> "Doyon, Jean-Francois" wrote:
> 
> > I'm running in to a very strange problem though:
> >
> > The application adds an entry to the directory, seemingly successfully
> ...
> > But then, I can't find it!
> 
> There are a number of possibilities:
> 1) ACLs (you can't find it because you're not allowed)
> 2) existence (you can't find it because it's not there)
> 3) attributes (you can't find it because it doesn't have
> the attributes you use in the filter)
> 4) more ...
> 
> 1) check you ACLs; try first to find the entry as the rootdn
> 2) try a slapcat and see if the entry is there
> 3) if you succeed with 2), look at the exact attrs/values the entry has
> 4) ... post again :)
> 
> >
> > Here's the log for the addition of the entry:
> >
> > Aug  2 10:07:47 grumbler slapd[16937]: daemon: conn=3 fd=9 connection
> from
> > IP=132.156.10.123:2641 (IP=0.0.0.0:31746) accepted.
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=0 BIND
> > dn="CN=URDS,OU=CLIENTS,O=CGDI" method=128
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=0 RESULT tag=97 err=0
> text=
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=1 SRCH
> > base="cn=Atlas,ou=Clients,o=CGDI" scope=0 filter="(objectClass=*)"
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=1 SEARCH RESULT tag=101
> > err=0 text=
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=2 SRCH
> > base="ou=Users,o=CGDI" scope=2
> filter="(&(objectClass=cgdiuser)(uid=JBloe))"
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=2 SEARCH RESULT tag=101
> > err=0 text=
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=3 ADD
> > dn="UID=JBLOE,OC=OTHER,C=CA,OU=USERS,O=CGDI"
> > Aug  2 10:07:47 grumbler slapd[16953]: conn=3 op=3 RESULT tag=105 err=0
> text=
> >
> > Aug  2 10:08:02 grumbler slapd[16953]: conn=3 op=4 UNBIND
> > Aug  2 10:08:02 grumbler slapd[16953]: conn=-1 fd=9 closed
> >
> > As you can see there's no error returned.
> >
> > But if I use ldapsearch to try and see the entry, no such luck.  Not to
> > mention the application itself can't see it either, 2 seconds after
> having
> > seemingly successfully added it! (This is a problem because the
> registration
> > process needs to lookk at the entry right after it was inserted, but is
> > failing because it can't find it).
> >
> > Even stranger, if I try to re-register the exact same person with the
> same
> > uid, 2 things happen:
> >
> > 1) I am given the same uid (The system generates one based on first/last
> > name), meaning it couldn't find a uid allready existing, which makes
> sense.
> > 2) BUT, whenit comes time ot insert the entry, I get an error 68,
> meaning
> > the entry allready exists!!! Lookie here:
> >
> > Aug  2 10:11:50 grumbler slapd[17019]: daemon: conn=6 fd=9 connection
> from
> > IP=132.156.10.123:2651 (IP=0.0.0.0:31746) accepted.
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=0 BIND
> > dn="CN=URDS,OU=CLIENTS,O=CGDI" method=128
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=0 RESULT tag=97 err=0
> text=
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=1 SRCH
> > base="cn=Atlas,ou=Clients,o=CGDI" scope=0 filter="(objectClass=*)"
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=1 SEARCH RESULT tag=101
> > err=0 text=
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=2 SRCH
> > base="ou=Users,o=CGDI" scope=2
> filter="(&(objectClass=cgdiuser)(uid=JBloe))"
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=2 SEARCH RESULT tag=101
> > err=0 text=
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=3 ADD
> > dn="UID=JBLOE,OC=OTHER,C=CA,OU=USERS,O=CGDI"
> > Aug  2 10:11:50 grumbler slapd[17023]: conn=6 op=3 RESULT tag=105 err=68
> > text=
> > Aug  2 10:11:51 grumbler slapd[17023]: conn=6 op=4 UNBIND Aug  2
> 10:11:51
> > grumbler slapd[17023]: conn=-1 fd=9 closed
> >
> > The searches the app performs look like this in the log:
> >
> > Aug  2 10:15:58 grumbler slapd[17019]: daemon: conn=8 fd=9 connection
> from
> > IP=132.156.10.123:2655 (IP=0.0.0.0:31746) accepted.
> > Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=0 BIND dn="" method=128
> > Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=0 RESULT tag=97 err=0
> text=
> > Aug  2 10:15:58 grumbler slapd[17023]: conn=8 op=1 SRCH
> > base="ou=Users,o=CGDI" scope=2
> filter="(&(objectClass=cgdiuser)(uid=JBloe))"
> 
> --
> Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
> Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
> Politecnico di Milano                 | mailto:masarati@aero.polimi.it
> via La Masa 34, 20156 Milano, Italy   |
> http://www.aero.polimi.it/~masarati
> 
> 
>