Hello everyone. After months of working with ADF Essentials, I needed to log in to the Console application of the integrated Weblogic Server that comes with JDeveloper 11.1.2.3 (Weblogic Server 10.3.5) and then I realized that I have forgotten the password of the weblogic user... So I started looking and found two solutions:
- Solution 1: Remove the default domain folder created by the Integrated Weblogic Server.
- Solution 2: Generate a new password for the weblogic user.
What's the difference between solution 1 and 2?
In solution 1, you will lose any configuration you have made to your integrated weblogic server, this includes: data sources, security configuration, etc.
In solution 2, you will lose only security configurations you have made. For example, if you have created more users, or groups, or configured access to an external LDAP service, but will keep everything else. I have to say that this solution is more difficult than solution 1.
If you have not made any configurations to your integrated Weblogic server, I suggest you to go with solution 1.
In solution 1, you will lose any configuration you have made to your integrated weblogic server, this includes: data sources, security configuration, etc.
In solution 2, you will lose only security configurations you have made. For example, if you have created more users, or groups, or configured access to an external LDAP service, but will keep everything else. I have to say that this solution is more difficult than solution 1.
If you have not made any configurations to your integrated Weblogic server, I suggest you to go with solution 1.
Before we continue with the solutions, we first need to find the IDE system directory. In order to do that, open JDeveloper, go to the Help menu and select the About option. A popup shows up, select the Properties tab and scroll down until you find any of these: ide.pref.dir or ide.system.dir or ide.user.dir
In a Linux environment, you may find something like this:
In a windows environment, you may find something like this:
Actually, the dir we are looking for is the ide.system.dir so lets write it down so we can use it later:
Linux (my case, yours may be different)
SYS_DIR=/home/aalopez/.jdeveloper/system.11.1.2.3.39.62.76.1
Windows (my case, yours may be different)
SYS_DIR=C:\Users\CVDESA\AppData\Roaming\JDeveloper\system11.1.2.3.39.62.76.1
Make sure Weblogic server is shut down before you continue.
Solution 1: Removing the DefaultDomain folder
The first and easiest solution is to Remove the following folder (DefaultDomain):
The folder will get re-created for you the next time you start the Weblogic server. The problem is that you will lose any configuration you may have done including: users, passwords, datasources, etc. All of it.
Once you remove the folder, open JDeveloper go to the Run menu, and select the Start Server Instance (IntegratedWeblogicServer) option. A popup shows up asking you to set the weblogic user credentials. That's it!
SYS_DIR/DefaultDomain
The folder will get re-created for you the next time you start the Weblogic server. The problem is that you will lose any configuration you may have done including: users, passwords, datasources, etc. All of it.
Once you remove the folder, open JDeveloper go to the Run menu, and select the Start Server Instance (IntegratedWeblogicServer) option. A popup shows up asking you to set the weblogic user credentials. That's it!
Solution 2: Reset the weblogic user password
Please follow the next steps in order reset the password in a Linux system (Ubuntu 12.1), steps for Windows system are also presented:
Linux
- Go to this path: SYS_DIR/DefaultDomain/bin, where SYS_DIR is the path we defined above.
- Execute the setDomainEnvironment.sh
- Go to this path: SYS_DIR/DefaultDomain/security
- Rename the DefaultAuthenticatorInit.ldift file to something like oldDefaultAuthenticatorInit.ldift
- Export the weblogic.jar file to the classpath, so we can create a new password for the weblogic user (in my case, the installation directory of JDeveloper is /home/aalopez/Oracle):
- Execute the following command in order to create the new password. Notice that the command has a dot at the end, this is necessary so the new password is created in the current directory. Change NEW_PASSSWORD for the new password of the weblogic user:
- Go to this path: SYS_DIR/DefaultDomain/servers/DefaultServer
- Rename the data directory to something like data_old
- Go to this path: SYS_DIR/DefaultDomain/servers/DefaultServer/security
- Rename the boot.properties file to something like oldboot.properties
- Create a new boot.properties file in the same directory. This is necessary if you want autologin when launching the Weblogic server from within JDeveloper. The content of the file should be something like the following (change NEW_PASSWORD for the password you defined in previous steps):
- It's time to test our changes. Go to this path: SYS_DIR/DefaultDomain/bin
- Execute the startWeblogic.sh file and verify that Weblogic server starts without exceptions.
- Open a new browser and enter the following URL (the port may be different for you):
- The Weblogic server console application should display and you can login with your new credentials.
- When you are ready to stop the Weblogic server, go to this path: SYS_DIR/DefaultDomain/bin
- Execute the stopWeblogic.sh file in order to stop the server.
export CLASSPATH=$CLASSPATH:/home/aalopez/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar
java weblogic.security.utils.AdminAccount weblogic NEW_PASSWORD .
username=weblogic password=NEW_PASSWORD
http://localhost:7101/console
There's one extra step that we'll cover after we check the Windows steps:
Windows
- Go to this path: SYS_DIR\DefaultDomain\bin, where SYS_DIR is the path we defined above.
- Execute the setDomainEnvironment.cmd
- Go to this path: SYS_DIR\DefaultDomain\security
- Rename the DefaultAuthenticatorInit.ldift file to something like oldDefaultAuthenticatorInit.ldift
- Execute the following command in order to create the new password. Notice that the command has a dot at the end, this is necessary so the new password is created in the current directory. Change NEW_PASSSWORD for the new password of the weblogic user:
- Go to this path: SYS_DIR\DefaultDomain\servers\DefaultServer
- Rename the data directory to something like data_old
- Go to this path: SYS_DIR\DefaultDomain\servers\DefaultServer\security
- Rename the boot.properties file to something like oldboot.properties
- Create a new boot.properties file in the same directory. This is necessary if you want autologin when launching the Weblogic server from within JDeveloper. The content of the file should be something like the following (change NEW_PASSWORD for the password you defined in previous steps):
- It's time to test our changes. Go to this path: SYS_DIR\DefaultDomain\bin
- Execute the startWeblogic.cmd file and verify that Weblogic server starts without exceptions.
- Open a new browser and enter the following URL (the port may be different for you):
- The Weblogic server console application should display and you can login with your new credentials.
- When you are ready to stop the Weblogic server, go to this path: SYS_DIR\DefaultDomain\bin
- Execute the stopWeblogic.cmd file in order to stop the server.
java weblogic.security.utils.AdminAccount weblogic NEW_PASSWORD .
username=weblogic password=NEW_PASSWORD
http://localhost:7101/console
Once you have changed and tested the new password for the weblogic user, is time to update the information in JDeveloper. Open JDeveloper and go to the Resource Palette, if you can't find it, go to the View menu and select the Resource Palette option:
There, select the Application Server category and the IntegratedWebLogicServer. Right click and select the Properties option. A new popup shows up, select the Authentication tab:
There you can set the new weblogic user password that you just defined steps above. Apply changes and that's it!
see ya,
References:
Reset lost weblogic admin password | Beyond Oracle. João Oliveira [online].
Available on Internet: http://www.beyondoracle.com/2010/08/30/reset-lost-weblogic-admin-password/
[accessed on March 02 2013].
Available on Internet: http://www.beyondoracle.com/2010/08/30/reset-lost-weblogic-admin-password/
[accessed on March 02 2013].
Enabling Auto Login by Using the Boot Identity File. Oracle [online].
Available on Internet: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/10g/r3/installconfig/enable...
[accessed on March 02 2013].
Available on Internet: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/10g/r3/installconfig/enable...
[accessed on March 02 2013].
Changing DefaultServer's Password running in JDeveloper. Brenda [online].
Available on Internet: http://newsoalife.blogspot.com/2011/07/changing-defaultservers-password.html
[accessed on March 04 2013].
Available on Internet: http://newsoalife.blogspot.com/2011/07/changing-defaultservers-password.html
[accessed on March 04 2013].
OTN Discussion Forums. Oracle [online].
Available on Internet: https://forums.oracle.com/forums/thread.jspa?threadID=2285290
[accessed on March 07 2013].
Available on Internet: https://forums.oracle.com/forums/thread.jspa?threadID=2285290
[accessed on March 07 2013].
I found it quiet interesting ,Thank you for posting the great content…I was looking for something like this…, hopefully you will keep posting such blogs…
ReplyDeleteThanks for this blog!!! Oracle Support couldn't tell me how to reset my password without blowing away my whole domain, and with your instructions, I had it done in 30 minutes (Solution 2).
ReplyDeleteThanks again!!!
Great! Thanks for the comment.
DeleteOr you can just decrypt the password from boot.properties using the following recipie:
ReplyDeleteRead the password from boot.properties in {AES}xyz format.
Run the following commands:
>cd %DOMAIN_HOME%\bin
>setDomainEnv.cmd
>java weblogic.WLST
wls:/offline> es=weblogic.security.internal.SerializedSystemIni.getEncryptionService('.')
wls:/offline> ces=weblogic.security.internal.encryption.ClearOrEncryptedService(es)
wls:/offline> ces.decrypt('{AES}zeTbHXcvIYmloXKvZgpjf3858ebqi2GN6LrwKto/rbM=')
'weblogic1'