[Date Prev][Date Next]
Re: Deleting certain attribute in all entries
At 06:00 AM 5/15/00 -0700, Kurt D. Zeilenga wrote:
>At 09:06 AM 5/15/00 +0200, Jan-Piet Mens wrote:
>>Something like this works for me:
>> ldapsearch attribute=* dn |
>Technically, dn is not an attribute (though our server treats
>it as such). I recommend this instead requesting attribute
> ldapsearch "(attribute=*)" 1.1
>As no attribute type has the OID 1.1, the following will
>only return the entry without any attributes.
>> grep -v '^$' |
>> while read dn
>> echo "dn: $dn"
> echo "changetype: delete"
>> echo "delete: attribute"
>> echo ""
>You can also use replace:
> echo "dn: $dn"
> echo "changetype: modify"
> echo "replace: attribute"
> echo "-"
> echo ""
>Replacing the attribute with no values also deletes the
>attribute and should be successful even where the attribute
>does not exist.
>For details see slapd.replog(5) and ldapmodify(1).
>> done | ldapmodify -D "cn=manager,o=xx" -w secret
>>On Sun, 14 May 2000, Marian Steinbach wrote:
>>> I would like to know the easiest way to erase one atribute,
>>> disregarding it´s value, from all directory entries that have
>>> this attribute.