OID – Sample LDIF

$ cat firstrun.ldif
dn:dc=com
objectclass: top
objectclass: domain
dc:com

dn:dc=oracle,dc=com
objectclass: top
objectclass: domain
dc:oracle

dn:dc=us,dc=oracle,dc=com
objectclass: top
objectclass: domain
dc:us

dn:cn=Users,dc=us,dc=oracle,dc=com
objectclass: top
objectclass: orclContainer
cn:Users

dn: cn=oiduser1,cn=users,dc=us,dc=oracle,dc=com
description: test user
sn: snoiduser1
uid: uidoiduser1
objectclass: top
objectclass: inetorgperson
objectclass: orcluser
objectclass: orcluserv2
cn: oiduser1
userpassword: welcome1

dn: cn=oiduser2,cn=users,dc=us,dc=oracle,dc=com
description: test user
sn: snoiduser2
uid: uidoiduser2
objectclass: top
objectclass: inetorgperson
objectclass: orcluser
objectclass: orcluserv2
cn: oiduser2

RCU OID Silent Creation

# RCU Silent for creating OID Schema

# Pre-requisite:

SQL> GRANT EXECUTE ON sys.dbms_job TO PUBLIC;
SQL> GRANT EXECUTE ON dbms_reputil TO PUBLIC;

$ /scratch/binaries/rcu/rcu_11.1.2.1.0/rcuHome/bin/rcu -silent -createRepository -databaseType ORACLE -connectString localhost:1521:orcl1 -dbUser SYS -dbRole SYSDBA -component OID -f < ~/passwordfile.txt

$ cat passwordfile.txt
Welcome1
Welcome1

$ /scratch/binaries/rcu/rcu_11.1.2.1.0/rcuHome/bin/rcu -silent -dropRepository -databaseType ORACLE -connectString localhost:1521:orcl1 -dbUser SYS -dbRole SYSDBA -component OID -f < ~/passwordfile.txt

OID – Custom Schema

# Add attribute – llcSecretAttr :

cat > ~/add_attr1_to_schema.ldif

dn: cn=subschemasubentry
changetype: modify
add: attributetypes
attributetypes: ( 99.99.99.99.98 NAME ‘llcSecretAttr’ EQUALITY caseIgnoreMatch SYNTAX ‘1.3.6.1.4.1.1466.115.121.1.44’ )

$ ldapmodify -h llcau3.oracle.com -p 3060 -D cn=orcladmin -w mypasswd -v -f ~/add_attr1_to_schema.ldif
# Add attribute to an objectclass

cat > ~/add_obj1_to_schema.ldif

dn: cn=subschemasubentry
changetype: modify
add: objectclasses
objectclasses: ( 99.99.99.99.99 NAME ‘llcTestObj’ SUP top STRUCTURAL MAY llcSecretAttr )
$ ldapmodify -h llcau3.oracle.com -p 3060 -D cn=orcladmin -w mypasswd -v -f ~/add_obj1_to_schema.ldif

OID – How to perform filesystem backup

# File system backup of IDM Home

cd $MW_HOME
tar -cvf OracleIDM1_bkp.tar Oracle_IDM1

# File system backup of Instance Home

cd /u01/app/mwhome/
tar -cvf oid_asinst_1_bkp.tar asinst_1

#Complete backup / snapshot of database
#LDIF back up all your base domain using LDIFWRITE. You can import back the base domain using bulkload.sh script.

$ ldifwrite -connect connect_string  -b base_domain -f backup.ldif