Recovering Password From WAS 6.1

Whenever you forgot your password for WAS login, don't get upset, WAS stores password in encoded form in its configuration file named security.xml which is located at 
<was_root>\AppServer\profiles\<default_profile>\config\cells\<nodename>\security.xml

From that security.xml note down the encoded form of your password which will be in the form {xor}LD08LTor 

now from command prompt browse to the following directory 
<was_root>\AppServer\bin\ProfileManagement\plugins\com.ibm.websphere.v61_6.1.0<something>\
after reaching in that directory run the following command
>c:\..\..\was_root\AppServer\java\bin\java.exe -cp ws_runtime.jar com.ibm.ws.security.util.PasswordDecoder <encodedPasswordFromSecurity.xml>

We can also use this ws_runtime.jar from different location mentioned as follows
<was_root>\AppServer\deploytool\itp\plugins\com.ibm.websphere.v61_6.1\

Same procedure can be repeated for producing a new encoded password with which you can alter the security.xml but in this case at the end of command we'll use PasswordEncoder <password>
so the command becomes
>c:\..\..\was_root\AppServer\java\bin\java.exe -cp ws_runtime.jar com.ibm.ws.security.util.PasswordEncoder wasadmin
[wasadmin is the password to be encoded here]

Note: This procedure applies to WAS v6.1. Method varies for other versions.

0 nhận xét:

Đăng nhận xét