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

Re: Newbie's problem on ldapadd- Operations error (1)



Jon,

Thank you very much for the help. Unfortunately, with your method I still can not get it work.

[root@kxielinux root]# ldapadd -f ldapexample.ldif
adding new entry "cn=kaiduan xie,dc=goodstart,dc=com"
ldap_add: Operations error (1)

[root@kxielinux root]# more ldapexample.ldif
dn: cn=kaiduan xie,dc=goodstart,dc=com
objectclass: top
objectclass: person
sn: xie
cn: kaiduan xie

This time the space after each colon was added.

This is my first touch on LDAP. (editing the /etc/openldap/sldap.conf, running it with service start ldap, and then ldapadd -f ldapexample.ldif).

Any further comments?

kaiduan
From: Jon Roberts <jon@jonanddeb.net>
Reply-To: man@mentata.com
To: kaiduan xie <kaiduanx@hotmail.com>
CC: OpenLDAP-software@OpenLDAP.org
Subject: Re: Newbie's problem on ldapadd- Operations error (1)
Date: Wed, 02 Feb 2005 00:20:51 -0600

kaiduan xie wrote:
[root@kxielinux root]# ldapadd -f ldapnewentry
adding new entry "cn=kaiduan xie,dc=goodstart,dc=com"
ldap_add: Operations error (1)

The content of ldapnewentry is shown below:

[root@kxielinux root]# more ldapnewentry
dn:cn=kaiduan xie,dc=goodstart,dc=com
objectClass:person
sn:xie

You can look in /etc/openldap/schema/core.schema to find:

objectclass ( 2.5.6.6 NAME 'person'
    DESC 'RFC2256: a person'
    SUP top STRUCTURAL
    MUST ( sn $ cn )
    MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) )

Which means you need an sn and cn value. Even though cn is in your dn, you need to set it explicitly, too. Assuming you aren't missing something else, try:

dn: cn=kaiduan xie,dc=goodstart,dc=com
objectClass: top
objectClass: person
sn: xie
cn: kaiduan xie

Note the space after each colons, which I believe is also necessary.

Jon Roberts
www.mentata.com

_________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound e-mail and attachments. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.