How do I rename my base dn due to my domain name change? I'm using the latest openldap run time configuraiton.
--On Friday, December 03, 2010 3:33 PM -0800 Anton Chu anton.chu@telecommand.com wrote:
How do I rename my base dn due to my domain name change? I'm using the latest openldap run time configuraiton.
A modrdn operation, if you are using back-hdb.
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Quanah Gibson-Mount wrote:
--On Friday, December 03, 2010 3:33 PM -0800 Anton Chu anton.chu@telecommand.com wrote:
How do I rename my base dn due to my domain name change? I'm using the latest openldap run time configuraiton.
A modrdn operation, if you are using back-hdb.
Quanah, if we are talking about changing the base DN referenced by 'suffix' in a database section of slapd.conf I have some doubts that a simple ModRDN request will work:
- the old or the new database suffix is not already there and data across database cannot be moved
- DN references within the data will have to be updated ( e.g. groupOfNames/member)
- And also changing the config is needed whereever the base DN is referenced (ACLs etc.)
Ciao, Michael.
El 04/12/10 00:33, Anton Chu escribió:
How do I rename my base dn due to my domain name change? I'm using the latest openldap run time configuraiton.
Maybe the hard solution:
* make a backup of the entire directory with slapcat * edit the resulting ldif with an text editor and replace old ocurrences of old suffix with the new one * create the new directory with slapadd
Angel L. Mateo wrote:
El 04/12/10 00:33, Anton Chu escribió:
How do I rename my base dn due to my domain name change? I'm using the latest openldap run time configuraiton.
Maybe the hard solution:
- make a backup of the entire directory with slapcat
Yes.
- edit the resulting ldif with an text editor and replace old ocurrences
of old suffix with the new one
Bear in mind:
1. If at least one attribute value in the DN contains non-ASCII chars the LDIF contains base64-encoded DN values which you can't easily search&replace with a text editor.
2. Also long DN values might be split over two or more lines (line continuations) in the LDIF file. This also makes simple search&replace nearly unfeasible.
So in general the safest approach is to write a small script using your favourite scripting language and a decent LDIF reader/writer module and rewrite all DN values therein.
- create the new directory with slapadd
Yes.
Ciao, Michael.
openldap-technical@openldap.org