20070926 copying oid users from another oid - plembo/onemoretech GitHub Wiki

title: Copying OID Users from Another OID link: https://onemoretech.wordpress.com/2007/09/26/copying-oid-users-from-another-oid/ author: lembobro description: post_id: 632 created: 2007/09/26 18:18:51 created_gmt: 2007/09/26 18:18:51 comment_status: open post_name: copying-oid-users-from-another-oid status: publish post_type: post

Copying OID Users from Another OID

There is a best way to do this. What I’m presenting here is a quick-and-dirty solution that I just used and want to document.

First do an LDIF dump of your users using either ldapsearch or Oracle’s ldifwrite. I prefer the latter because it gives me the orclguid attribute and value (which is normally hidden from ldapsearch unless you specify it on the command line).

Go into your LDIF file and remove the entries for the default accounts, orcladmin and PUBLIC. If you did a dump of “cn=Users,dc=example,dc=com”, also remove the container entry for “cn=Users” from the file. This will all make debugging any issues you have easier later on.

Once you’ve done that, you need to edit the file a little more to remove the following attributes that OID will not let you import.

`

authpassword;oid
orclpassword
orclnormdn
pwchangedtime
modifytimestamp
modifiersname
createtimestamp
creatorsname

`

One way to this is by using Perl as a text editor. That’s right. Perl as a text editor.

`

perl -pi -e 's/^orclpassword.+n$//' users.ldif

`

You saw it here first.

Finally, just import the file using ldapadd or ldapmodify.

Copyright 2004-2019 Phil Lembo