Sunday, September 9, 2012

Reset Super User cn=orcladmin when ODS's Password Has Been Forgotten

Reset Super User cn=orcladmin when ODS's Password Has Been Forgotten

If we had forgotten the ODS' schema password which is in the OID database then we need to reset the password of the ODS schema in the database and and update in the wallet 

Step 1
set the env variables 

[oracle@fah ~]$ export ORACLE_INSTANCE=/u03/app/oracle/admin/oid_inst1
[oracle@fah ~]$ export ORACLE_HOME=/u03/app/oracle/product/fmw/idm
[oracle@fah ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@fah ~]$ export PATH=$ORACLE_HOME/ldap/bin:$PATH
[oracle@fah ~]$ export PATH=/u03/app/oracle/product/fmw/idm/opmn/bin:$PATH

Step 2
Check the Process and stop all the OID process which Runns under the opmnctl

[oracle@fah ~]$ ps -ef | grep -i odisrv
oracle    9744 28191  0 21:49 pts/6    00:00:00 grep -i odisrv
[oracle@fah ~]$ ps -ef | grep -i oidmon
oracle   10075 28191  0 21:49 pts/6    00:00:00 grep -i oidmon
[oracle@fah ~]$ ps -ef | grep -i oidldapd
oracle   11822 28191  0 21:50 pts/6    00:00:00 grep -i oidldapd
If any OID process runs the stop in the process

Step3

If you are using the 11g OID the password files will be in the ORACLE_INSTACNE/OID/admin

cd $ORACLE_INSTANCE/OID/admin
[oracle@fah admin]$ ll
-rw-r----- 1 oracle oinstall  327 Feb 28  2012 oidpwdroidm
-rw-r----- 1 oracle oinstall  327 Feb 28  2012 oidpwdrOIDM
drwxr-x--- 2 oracle oinstall 4096 Feb 28  2012 wallet
[
oracle@fah admin]$ mv oidpwdroidm oidpwdroidm_backup
[oracle@fah admin]$ mv oidpwdrOIDM oidpwdrOIDM_backup

Step4

Connect to the database  as the system or sys and change the password for the ODS user

[oraidm@fah ~]$ sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Sun Sep 9 17:29:34 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter user-name: sys as sysdba
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options

SQL> alter user ODS identified by <password>;
User altered.

SQL> alter user ODS account Unlock;
User altered.

Step5

Go the the user which the idm had been installed check the database connectivity by using the new password

[oracle@fahadmin]$ sqlplus ods/<password>@OIDDB

SQL*Plus: Release 11.1.0.7.0 - Production on Sun Sep 9 23:41:13 2012

Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options

SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      OIDM
SQL> exit

Step6
 Create A new wallet for storing the new password in this wallet we need to give the passwod which we have generate now at Step4

[oracle@fahadmin]$ $ORACLE_HOME/ldap/bin/oidpasswd connect=OIDDB create_wallet=true                                                                                     
password:
confirm password:
password set

A new walled had been create and the two new files will be created to store the password of the ODS schema in the $ORACLE_INSTANCE/OID/admin

[oracle@fahadmin]$ ls oidpwd*
oidpwdlldap1  oidpwdroidm  oidpwdroidm_backup  oidpwdrOIDM_backup

Step7
Bind the ldap user to find the user is active and the password is unlocked

[oracle@fah admin]$ $ORACLE_HOME/bin/ldapbind -p 389 -D cn=orcladmin <password>
bind successful

If the Bind was not Success full then we need to unlock the orcladmin account and if need we can create the new passwod

For Unlocking the orcladmin we need  to run the 

Syntax oidpasswd connect=<database_connection_string> unlock_su_acct=true

oidpasswd connect=OIDDB unlock_su_acct=true
OID DB user password: <password created at step4 >
OID super user account unlocked successfully.

For reset the  orcladmin password

Syntax oidpasswd connect<database_connection_string> reset_su_password=true

oidpasswd connect=asdb reset_su_password=true
OID DB user password: <password created at step4 >
new password: <password>
confirm password: < password >
password set

start the opmn 
opmnctl startproc ias-component=OID
if you had stopped all the components then issue startall

[oracle@fah admin]$ /u03/app/oracle/admin/oid_inst1/bin/opmnctl status -l

Processes in Instance: oid_inst1
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component                    | process-type       |     pid | status   |        uid |  memused |    uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
oid1                             | oidldapd           |   18193 | Alive    |         18 |   783240 |   0:00:18 | N/A
oid1                             | oidldapd           |   18187 | Alive    |         17 |   782424 |   0:00:23 | N/A
oid1                             | oidldapd           |   18175 | Alive    |         16 |   783672 |   0:00:23 | N/A
oid1                             | oidldapd           |   18058 | Alive    |         15 |   845628 |   0:00:24 | N/A
oid1                             | oidldapd           |   18033 | Alive    |         14 |   374692 |   0:00:24 | N/A
oid1                             | oidmon             |   17861 | Alive    |         13 |   364084 |   0:00:26 | LDAPS:636,LDAP:389
EMAGENT               | EMAGENT     |   17860 | Alive    |         12 |    63836 |   0:00:26  | N/A









No comments:

Post a Comment