Monday, August 5, 2013

Oracle Internet Directory (OID) is LDAP compliant directory server and stores its data ( schema -attributes/object class/access policy, users and groups) in RDBMS (Oracle Database) under schema ODS (Oracle Directory Store).

These are possible cases ODS account can be locked:
1) ods account logged frequently with wrong passwords (Once wrong password attempt count as per DB  configuration exceeds then acct gets locked)
2) ods account password expires
3) File system is full on OID app install host and when started the OID then few files might corrupt or deleted like ODS passwd stored wallet

Steps to reset the password or unlock the ODS DB account and reset the OID process:

1. set ORACLE_HOME & ORACLE_INSTANCE variables
2.Shutdown OID using opmnctl stopall
3. Login to OID database with sys or system account and change password
SQL> alter user ODS identified by New_PASSWORD;
4. Login to OID tier and move wallet file (password file to connect from OID tier to database) $ORACLE_INSTANCE/OID/admin/oidpwdXXXX
5. Recreate wallet using
$ORACLE_HOME/ldap/bin/oidpasswd connect=OIDDB create_wallet=true  (Set ORACLE_HOME to OID ORACLE_HOME mentioned above, set ORACLE_INSTANCE environment. Make sure TNS_ADMIN is not set . If this is set then set it to $ORACLE_INSTANCE/config)
6. If you have multiple OID instances (OID running on multiple PCs) then copy wallet files to all other OID instances $ORACLE_INSTANCE/OID/admin/oidpwdXXXX
or 
open a new command window and repeat the above steps from 1 to 5

7. start the OID using opmnctl startall

If you know ODS password and wish to change password then follow below process
1. Shutdown OID using opmnctl stopall
2. Login to OID tier and recreate database password for ODS schema
$ORACLE_HOME/ldap/bin/oidpasswd connect=OIDDB change_oiddb_pwd=true  (Set ORACLE_HOME to OID ORACLE_HOME mentioned above, set ORACLE_INSTANCE variable. Make sure TNS_ADMIN is not set . If this is set then set it to $ORACLE_INSTANCE/config). This command will update password in database and also in wallet (OID tier)
3.If you have multiple OID instances (OID running on multiple PCs) then copy wallet files to all other OID instances $ORACLE_INSTANCE/OID/admin/oidpwdXXXX


oidpasswd command syntax:

$ORACLE_HOME/ldap/bin/oidpasswd  
Usage: oidpasswd connect=<Net8 Connect Descriptor> [change_oiddb_pwd=true | create_wallet=true | unlock_su_acct=true| reset_su_password=true | manage_su_acl=true]
 connect: Database connect string
 change_oiddb_pwd: Change OID database password (default operation)
 create_wallet: Create LDAP and Replication server wallets
 unlock_su_acct: Unlock OID super user account
 reset_su_password: Reset OID super user password
 manage_su_acl: Manage super user restriced ACL
$ORACLE_HOME/bin/orapki  wallet display -wallet /u03/app/oracle/admin/oid_inst1/config/OPMN/opmn/wallet
Oracle PKI Tool : Version 11.1.1.6.0
Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
Requested Certificates:
User Certificates:
------
 Trusted Certificates:
 ----------

Ref:
http://orafapp.blogspot.com/2012/09/creating-wallet-with-oidpasswd-in-oid.html
http://onlineappsdba.com/index.php/2010/12/10/how-to-change-oid-11g-database-schema-ods-password/
http://onlineappsdba.com/index.php/2010/09/20/oid-11g-down-unable-to-start-oid-11g-using-opmn-ods-schema-locked-ora-28002/

support.oracle.com: 
What oidpasswd Utility Does and the Objects it Modifies (ODS and ODSCOMMON) (Doc ID 204900.1)