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

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



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