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

Re: ldapmodify (and ldapadd) fails



> Good evening all.
>
> I have a scenario where I do need to add and modify some attributes
> after the initial creation of an entry.
>
> tkelev:~/ldap # ldapmodify -D "cn=Manager,dc=tysvernett,dc=no" -W -v -x
> -f mod2
> ldap_initialize( <DEFAULT> )
> add sn:
>         Etternavn
> adding new entry "uid=test10,ou=People,dc=tysvernett,dc=no"
> modify complete
> ldap_add: Already exists (68)
>         additional info: ¸ßØU©@
>
> This seems like gibberish to me.
>
>
> The file mod2 looks like this:
> dn: uid=test10,ou=People,dc=tysvernett,dc=no
> changeType: add
> sn: Etternavn
>
> -
>
> changeType: add
> givenName: Fornavn
>
> -
>
> changeType: modify
> replace: cn
> cn: Fornavn Etternavn
>
> -
>
> changeType: add
> mail: test10@tysvernett.no
>
>
> Why this does not work seems like a mystery to me. None of the added
> attributes already exists,
> so I can't understand why i get the "Already exists".
>

I believe you have the wrong changetype:

instead of
changetype: add
mail: whatever

it should be

changetype: modify
add: mail
mail: whatever