Wednesday, December 23, 2015

Migrate users from OID to OID using bulkload utility

In this post we shall see how to migrate users from one OID to another OID using bulkload utility

Step 1) Export Users from source OID :

export ORACLE_HOME=/u02/oracle/devoraidm/Oracle_IDM1
export ORACLE_INSTANCE=/u02/oracle/devoraidm/asinst_1
export TNS_ADMIN=$ORACLE_INSTANCE/config 

$ cd $ORACLE_HOME/bin
$ ldapsearch -h Hostname -p OIDPort -D "cn=orcladmin" -w Weblogic1 -L -s one -b "cn=Users,dc=*****,dc=****,dc=**" "(objectclass=*)" "*" > usersDEC23.ldif


Note: 

Prior to bulkload, edit the LDIF file to remove all lines where authpassword or orclpassword appears at the beginning of that line. For example

dn: cn=testuser,cn=users,dc=us,dc=oracle,dc=com
cn: testuser
uid: testuser
userpassword: {SHA}41vs5sXm4OhspR0EQOkigqnWrIo=
orclpassword={x- orcldbpwd}1.0:1772AD7C11B4F110
   <=== REMOVE
authpassword;orclcommonpwd={X- ORCLNTV}A3A685F89364D4A5182B028FBE79AC38
<=== REMOVE
authpassword;orclcommonpwd={X- ORCLLMV}C23413A8A1E7665FC2265B23734E0DAC
<=== REMOVE
authpassword;orclcommonpwd={MD5}IB8AtcpdZaHBGOXjJDFRTA== 
<=== REMOVE 

Step 2) Move usersDEC23.ldif to destination OID server
Copy the usersDEC23.ldif file to $ORACLE_HOME/ldap/bin location 

Step 3) On Destination Server, set all environment variables
export ORACLE_HOME=/u02/oracle/devoraidm/Oracle_IDM1
export ORACLE_INSTANCE=/u02/oracle/devoraidm/asinst_1
export TNS_ADMIN=$ORACLE_INSTANCE/config 

Step 4) Take backup of application and database. 

Step 5) Stop OID process on destination OID Server:

$ cd $ORACLE_INSTANCE/bin
$./opmnctl stopall

 Step 6) Navigate to below location and run bulkload utility
$ cd $ORACLE_HOME/ldap/bin
$ ./bulkload connect=OIDDB check=true generate=true file=usersDEC23.ldif

Once the command completes successfully run the below command 

$ ./bulkload connect=OIDDB load=true 

Step 7) Start OID process on destination OID Server:

$ cd $ORACLE_INSTANCE/bin
$./opmnctl startall

All the users will be migrated to destination OID Server.

Use ldap modify command to bring passwords of users to new OID:

$ ldapmodify -h Hostname -p OIDPort -D “cn=orcladmin” -w Weblogic1 -f ./pwdout.ldif

where pwdout.ldif file is below:
<<
dn: cn=ucm_user1,cn=Users,dc=*****,dc=***,dc=**
changetype: modify
replace: userPassword
userPassword: abc123

dn: cn=ucm_user1,cn=Users,dc=*****,dc=***,dc=**
changetype: modify
replace: userPassword
userPassword: abc123
>>

No comments:

Post a Comment

Other Posts