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

Re: Problem to replace directory entries with ldapmodify



On 10/17/07, Gessy <gessycaetano@gmail.com> wrote:
> Hi,
>
> I have tried replace entries on ldap directory with ldapmodify, my server is
> a gentoo linux running a OpenLDAP 2.3.35, but i realized a strange behavior.
>
> When I try  replace a entry with follow LDIF:
>
>  # Test.ldif - test10
> dn: uid=test10,ou=people,dc=ufmg,dc=br
> objectClass: top
>  objectClass: person
>  objectClass: organizationalPerson
>  objectClass: inetOrgPerson
>  objectClass: eduPerson
>  objectClass: brEduPerson
>  objectClass: posixAccount
>  objectClass: shadowAccount
>  objectClass: ufmgEduPerson
>  objectClass: SIPIdentity
>  eduPersonOrgDN: o=UFMG
>  eduPersonOrgUnitDN: ou=LCC
>  eduPersonAffiliation: employee
>  eduPersonPrimaryAffiliation: employee
>  cn: Test10
>  givenName: Test
>  sn: 10
>  mail: test10@ufmg.br
>  gecos: CN=Test 10
>  uidNumber: 136617
>  gidNumber: 100
>  homeDirectory: /home/ufmg/test10
>  loginShell: /bin/bash
>  uid: test10
>
> ldapmodify -x -D"cn=manager,dc=ufmg,dc=br" -W -f test.ldif
>
> The LDIF above should replace fully a old entry that contains a SIP
> attributes with only attributes shown in test.ldif, but it update the entry
> and keep the SIP attributes. I don't understant. Can someone help me?
>
> ldapsearch -x uid=test10 -LLL
> dn: uid=test10,ou=people,dc=ufmg,dc=br
> SIPIdentitySIPURI: sip:xxxxx@aaa.bbb.br
> SIPIdentityServiceLevel: AR
> SIPIdentityUserName: 10811080
> SIPIdentityPassword: 8997e7a13ff2641ae6142f05b41efd6f
> objectClass: top
> objectClass: person
> objectClass: organizationalPerson
> objectClass: inetOrgPerson
> objectClass: eduPerson
> objectClass: brEduPerson
> objectClass: posixAccount
> objectClass: shadowAccount
> objectClass: ufmgEduPerson
> objectClass: SIPIdentity
> eduPersonOrgDN: o=UFMG
> eduPersonOrgUnitDN: ou=LCC
> eduPersonAffiliation: employee
> eduPersonPrimaryAffiliation: employee
> cn: Test10
> givenName: Test
> sn: 10
> mail: test10@ufmg.br
> gecos: CN=Test 10
> uidNumber: 136617
> gidNumber: 100
> homeDirectory: /home/ufmg/test10
> loginShell: /bin/bash
> uid: test10
>

Do you have a changetype defined somewhere that I'm missing?  It looks
like you want to do a changetype: modify, then add: someattribs, then
someattribs: somevalues, repeat.

http://tools.ietf.org/html/rfc2849  (see page 10 or so)