May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Password Decoder for WebSphere

Did you happen to have too much configuration and want to recover password from WebSphere Configuration, if yes then following program can help you. I happen to forgot my application database password and didn’t wanted to get into hassle of resetting it from the Administration Support Group ( you know it can be time consuming and slow route). First of all, you would need to know the configuration file where your password is stored by WebSphere in its configuration ( of course its encrypted). You can find security.xml at following location :

/config/cells//security.xml

Now to be on safe side, copy this file at different location and open in it in an editor, I used notepad++ as its xml file. Use token ‘ to find all JAAS Authentication alias you created for storing credentials. One of the sample entry I am pasting below :

From here we need to copy content of attribute password and replace it in the following Java Program and run it. It will have your password printed on console. Make sure you create a Java Project in Rational Development IDEs (RAD/RSA) and WebSphere Runtime as server library to it. (PasswordUtil class is part of WebSphere Runtime environment and it has lot of dependency on the other JAR file. To keep the effort minimal, use this code on IDE otherwise you may end-up manually editing classpath entries for so many other JAR files).

import com.ibm.ISecurityUtilityImpl.PasswordUtil;

public class Decoder {
public static void main(String[] args){
String encoded_password = ““;

String decoded_password = PasswordUtil.passwordDecode(encoded_password);

if (decoded_password == null){
System.out.println(“ERROR: invalid password decoding exception”);
System.exit(1);
}

if (decoded_password.equals(encoded_password)){
System.out.println(“ERROR: specified password \”” + encoded_password + “\” is decoded”);
System.exit(1);
}

System.out.println(“encoded password == \”” + encoded_password + “\”, decoded password == \”” + decoded_password + “\””);
System.exit(0);
}
}

HTH-

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>