如何让 ldapmodify 更改 OpenLDAP 中的索引属性?

How do I get `ldapmodify` to change an indexed attribute in OpenLDAP?

我正在尝试使用 cn=config(或 olc)方法设置 OpenLDAP 目录。我的目录中有一个如下所示的条目:

dn: cn=entry,...
olcAttr: {0}first value...
olcAttr: {1}second value...
olcAttr: {2}third value...

我想使用 ldapmodify 将属性 {0}first value... 更改为其他内容,但保持相同的索引({0} - “索引”是正确的术语吗?)。

我尝试使用以下

dn: cn=entry,...
changetype: modify
replace: olcAttr{0}
olcAttr: {0}new value...

和这个主题的各种变体,但没有任何效果。我已经用谷歌搜索了(网络,实际上是 duckducked),但我什至不知道我要找的东西叫什么,这不会让事情变得更容易。谁能给我一些指导吗?

史蒂夫

这个问题的简单答案是替换所有属性,因此:

dn: cn=entry,...
changetype: modify
replace: olcAttr
olcAttr: {0}NEW value...
olcAttr: {1}second value...
olcAttr: {2}third value...

肯定有更好的方法吧?