[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
How to modify a single attribute from multiple list of attributes
How do I modify/delete a single attribute from the directory when I have
multiple attributes of the same name.
For example, given the following ldif:
dn: cn=config,o=dhcp
cn: config
objectClass: top
objectClass: dhcpService
objectClass: dhcpOptions
dhcpPrimaryDN: cn=server1,o=dhcp
dhcpStatements: default-lease-time 600
dhcpStatements: max-lease-time 1200
dhcpStatements: ddns-update-style none
dhcpStatements: boot-unknown-clients on
dhcpStatements: log-facility local7
How would I modify just one of the dhcpStatements: attributes, for
example, change 'dhcpStatements: log-facility local7' to
'dhcpStatements: log-facility local3'?
I've tried an ldif with:
dn: cn=config,o=dhcp
changetype: modify
replace: dhcpStatements log-facility local7
dhcpStatements: log-facility local3
But that just gave me an error:
ldapmodify: Undefined attribute type (17) additional info:
dhcpStatements log-facility local7: AttributeDescription
contains inappropriate characters.
I've also tried:
dn: cn=config,o=dhcp
changetype: modify
replace: dhcpStatements
dhcpStatements: log-facility local3
But that just gave me an error:
replace modify:
dhcpStatements
replace dhcpStatements:
log-facility local3
modifying entry "cn=config,o=dhcp"
modify complete
ldapmodify: Undefined attribute type (17)
additional info: modify: attribute type undefined
I can use 'delete: dhcpStatements' but that deletes all of the
dhcpStatements and then I have to add all of them back with the
modification to the one that's needed.
So, what ldapmodify/ldif syntax is needed to specify which of multiple
attributes should be modified?
Thanks!
Tom Leach