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

Re: Simple LDAP db help



Keith Conger wrote:
> 
> Hi,
> 
> Thanks again for your help. I tried adding what you gave me and now I get:
> 
> [root@test openldap]# ldapadd -x -D "cn=John
> Doe,dc=appliedtheory,dc=com" -W -f test3.ldif
> Enter LDAP Password:
> adding new entry "dc=appliedtheory,dc=com"
> ldap_add: Object class violation
> 
> ldif_record() = 65
> 
> I have also included test3.ldif.
> 
> Thanks Again!
> 
> +-------------------------+
> |Keith Conger
> |Unix Engineer
> |AppliedTheory
> |(315)453-2912 x5813
> |kconger@appliedtheory.com
> +-------------------------+
> +------+System Info+------+
> SunOS metroid 5.8 sun4u
>   2:40pm  up 12 day(s),  6:25,  1 user,  load average: 0.41, 0.47, 0.52
> 
> On Tue, 28 Aug 2001, Bob Wilkinson wrote:
> 
> > On Tue, Aug 28, 2001 at 11:57:31AM -0400, Keith Conger wrote:
> > > Hi,
> > >
> > > Would this be a second *.ldif file? Or appended to the current one?
> > >
> >
> > I think that it should work either way, providing the data is
> > imported first. If it were in the same ldif file, I'd put it
> > contextually before your current data, i.e. prepend, rather than
> > append. A separate ldif file should be imported first, too.
> >
> > > Thanks for your help!
> >
> > Let us know if these suggestions worked for you... I *think* that is
> > what I had to do.
> >
> > >
> > > +-------------------------+
> > > |Keith Conger
> > > |Unix Engineer
> > > |AppliedTheory
> > > |(315)453-2912 x5813
> > > |kconger@appliedtheory.com
> > > +-------------------------+
> > > +------+System Info+------+
> > > SunOS metroid 5.8 sun4u
> > >  11:50am  up 12 day(s),  3:35,  1 user,  load average: 0.59, 0.53, 0.47
> > >
> > > On Tue, 28 Aug 2001, Bob Wilkinson wrote:
> > >
> > > > On Tue, Aug 28, 2001 at 11:27:05AM -0400, Keith Conger wrote:
> > > > > Hi,
> > > > >
> > > > > Ihave included my slapd.conf and my test.ldif file I'm using. Can anyone
> > > > > take a quick glance and see if something stands out.
> > > > >
> > > > > I can start openldap but when I add the test.ldif it says:
> > > > > [root@test openldap]# ldapadd -x -D "cn=John
> > > > > Doe,dc=appliedtheory,dc=com" -W -f test.ldif
> > > > > Enter LDAP Password:
> > > > > adding new entry "uid=jdoe, dc=appliedtheory, dc=com"
> > > > > ldap_add: No such object
> > > > >
> > > > > ldif_record() = 32
> > > > >
> > > > > Thanks in Advance,
> > > > >
> > > >
> > > > I think that you need to explicitly add a record for
> > > > "dc=appliedtheory, dc=com" before you add one for
> > > > "uid=jdoe, dc=appliedtheory, dc=com"
> > > >
> > > > Bob
> > > >
> > > > e.g.
> > > >
> > > > dn:  dc=appliedtheory, dc=com
> > > > dc:  appliedtheory
> > > > dc:  com
> > > > objectclass: top
> > > > objectclass: account
> > > > objectclass: posixAccount
> > > >
> >
> > If all of these objectclasses are relevant. Probably need at least
> > objectclass: top - I doubt the others are necessary.
> >
> > Bob
> >
> 
>   ------------------------------------------------------------------------
>                  Name: test3.ldif
>    test3.ldif    Type: Plain Text (TEXT/PLAIN)
>              Encoding: BASE64

Your logs should show something to the effect that there are missing
required attributes for the account and posixaccount objectclasses - but
you shouldn't be specifying these objectclasses anyway! You're trying to
add an entry for the domain, so your first LDIF entry should look
something like this ...

dn: dc=appliedtheory,dc=com
objectclass: top
objectclass: domain
dc: appliedtheory

As far as I can see the LDIF entry describing
uid=jdoe,dc=appliedtheory,dc=com looks OK. Have a look at the following
site for a description of predefined objectclasses and attributes.

http://www-eleves.int-evry.fr/~deckmyn/docs/LDAP-ObjectClasses.html
 
Dave
--
Dave Lewney
Principal Systems Programmer, Computing Service
University of Sussex, Brighton BN1 9QJ. Tel: 01273 678354 Fax: 01273
271956