Monday, December 17, 2012

How to migrate users/groups from one OID instance to the other

Requirement: Migrate users/groups from source OID to target OID instance.
How To:
Source:
  • Export ORACLE_HOME env variable of OID instance.
  • Run ldapsearch command for exporting users as shown below.
$ORACLE_HOME/bin/ldapsearch -x -h OID_HOST -p OID_PORT -D cn=orcladmin -w password -L -b "USERS_DN" -s one "objectclass=*" dn cn givenname ....... sn telephonenumber userpassword > oid_filteruser.txt
  •  Run ldapsearch command for exporting groups as shown below.
$ORACLE_HOME/bin/ldapsearch -x -h oidserver.corp.company.com -p 389 -D cn=orcladmin -w password -L -b "GROUPS_DN" -s one "objectclass=*" > oid_filtergroup.txt

NOTE: For exporting users, specify the attributes to be exported either mandatory/optional.

Copy the files  oid_filteruser.txt and oid_filtergroup.txt to the target OID instance at location say /oracle/db/oid_files.

Destination:
  •  Export ORACLE_HOME env variable of OID instance.
  • Stop OID server.
  • Goto $ORACLE_HOME/ldap/bin 
  • Run ldapsearch command for importing users as shown below. 
 ./bulkload connect="OID_SCHEMA_NAME" generate=true load=true file="/oracle/db/oid_files/oid_filteruser.txt"
  • To get the OID_SCHEMA_NAME, refer the tnsnames.ora file of OID environment. 
  • It will prompt for OID schema password.
  • Run ldapsearch command for importing groups as shown below.
./bulkload connect="OID_SCHEMA_NAME" generate=true load=true file="/oracle/db/oid_files/oid_filtergroup.txt"
  •  It will prompt for OID schema password.
  • Start OID server.
  • Login to OID console to see the changes.


Tuesday, December 11, 2012

How to start sshd service in linux during server bootup

Hi All,

This may be trivial but believe it to be useful too. This post explains how to start sshd service in Linux OS during server bootup so that there is no need to start sshd service explicitly.

  1. Login as root user.
  2. chkconfig --level 2345 sshd on
  3. service sshd restart
  4. chkconfig sshd --list
  5. service sshd status
  6. Reboot Linux OS.
  7. Run the command service sshd status and verify if the sshd is running.
Hope this helps.