Wednesday, May 23, 2007

Resetting a lost oc4jadmin password

A common question is how do I change the oc4jadmin password when I don't already know it? If you have access to the application owner's UNIX account its quite easy. But note that it does require a restart of the 10g application server. Since you've lost the password I'm hoping that you're on a development system, so restarting the application server shouldn't be a big deal for you.

  1. Start by locating the correct Oracle home, let's assume that it's .../10gas/10.1.3 for our example
  2. Do a quick check to see that it has the "home" OC4J instance running in it as shown here
    oracle@myhost > /oracle/10gas/10.1.3/opmn/bin/opmnctl status

    Processes in Instance: demo.myhost
    ias-component | process-type | pid | status
    OC4JGroup:default_group | OC4J:bixmlpserver | 17003 | Alive
    OC4JGroup:default_group | OC4J:bianalytics | 17002 | Alive
    OC4JGroup:default_group | OC4J:bijmx | 17001 | Alive
    OC4JGroup:default_group | OC4J:home | 17000 | Alive
    ASG | ASG | N/A | Down
    HTTP_Server | HTTP_Server | 16999 | Alive

  3. Now edit the .../10gas/10.1.3/j2ee/home/config/system-jazn-data.xml
  4. Search for the keyword "oc4jadmin" to locate the following stanza:
    <display-name>OC4J Administrator</display-name>
    <description>OC4J Administrator</description>

  5. Change the content of the credentials tag to something like this:
    Note the exclamation mark at the beginning of the new password. It marks the entry as a non-encrypted password value.
  6. Save the file

  7. Use .../10gas/10.1.3/opmn/bin/opmnctl to restart the OC4J apps server

  8. Login to the applications server as the oc4jadmin user to verify that your new password works
  9. If you check the system-jazn-data.xml file after the restart you should see that your edit has been replaced by an encrypted version of the password


Jessica said...

This worked perfectly - Thank you!

neelu said...

Many thanks for developing the effort to discuss this, I feel strongly about this and like studying a great deal more on this subject. If feasible, as you gain expertise, would you mind updating your webpage having a great deal much more info? It is very beneficial for me.
Hotels In Alicante

vishus said...

I am constantly searching for good info on this topic. It can be difficult to find sometimes. Thanks!. I will check back on your site from time to time for more information.
Hotels In Nice

Michelle said...

Will the solution solved if I'm maintaining Oracle Application Server 10g Release 3?
Insulation Types