Wednesday, November 23, 2011

ldapbind on 636 ssl port using oracle wallet

ldapbind -h -p -D -w -U 2 -W "file: " -P

How to get orasso password from oid

ldapsearch -h -p -D "cn=orcladmin" -w "*****" -s sub "orclResourceName=orasso" orclpasswordattribute

Doing bulk delete from oid

1)Take backup of OID

2)Disable sync profile

$ dipassistant mp -host -port 389 -passwd ***** -profile ActiveChgImp odip.profile.status=DISABLE
Profile successfully modified.

Note: For security reasons it is not recommended to provide a password on the command line, unless you're being prompted for it.

3)Stop DIP process

oidctl connect=oid server=ODISRV instance=2 configset=1 flags="host=oid01.oracle.net grpid=configset1 port=389 " stop
NLS_LANG not set in environment
Setting NLS_LANG to AMERICAN_AMERICA.AL32UTF8
oidctl:Waiting for oidmon to stop ODISRV (instance=2) pid=10157
oidctl:Waiting for oidmon to stop ODISRV (instance=2) pid=10157
oidctl:Stopped ODISRV (instance=2) successfully

4)Get list of all users to be deleted
ldapsearch -h oid01.oracle.net -p 389 -D "cn=orcladmin" -w **** -s sub -b "cn=Users,dc=com" "(objectclass=*)" dc >> \tmp\test.ldif

5)Delete following from the user list created in step 4, as we want to retain these contianers

vi \tmp\test.ldif
cn=Users, dc=com
cn=orcladmin, cn=Users, dc=com
cn=PUBLIC, cn=Users, dc=com

6)Do bulk delete

ldapdelete -h oid01.oracle.net -p 389 -D "cn=orcladmin" -w ***** -c -v -f \tmp\test.ldif

ssl certificate conversion to oracle wallet

Source your env and use below tool and syntax to do this .Make sure you have all 3 files (certificate, key, root certificate available before starting .)

$ORACLE_HOME/Apache/Apache/bin/ssl2ossl -cert $ORACLE_HOME/Apache/Apache/conf/ssl.wlt/default/certs/server.crt -key $ORACLE_HOME Apache/Apache/conf/ssl.wlt/default/certs/server.key -cafile $ORACLE_HOME Apache/Apache/conf/ssl.wlt/default/certs/ca.crt -wallet $ORACLE_HOME/Apache/Apache/conf/ssl.wlt/default/cbeytest -ssowallet yes
Enter wallet password:
Verifying password - Enter wallet password:
SUCCESS