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

Re: Change directory base/ suffix dynamically?

On Mon, 10 Nov 2003, John C.Y. Lee wrote:

> If I got unknown number (probably up to 10,000 or more) of entries under
> a domain (say o=abc.com), and I want to change them to a different
> domain (say dc=abc,dc=com), what is the shortest (easiest) way to do so?
> Using alias will keep the original domain, which I don't intend to. The
> method "modrdn" can specify new superior, but can only modify rdn
> instead of dn. I could slapcat all entries, use sed to modify them, then
> slapadd back. But it really looks stupid.

Hmm.. I don't know why you think it's stupid: that's what I usually do for
bulk changes, since slapcat -> script-on-ldif -> slapadd is by far the
fastest and idiot-proof way (especially for 2.1.x or later, and
considering you have only around 10,000 entries).

[ http://sazli.surfopen.com     |    cd /open/source; make world ]
[ http://pgp.mit.edu:11371/pks/lookup?search=0x382141B4&op=index ]