How to Decrypt a Sun IDM Password

Sun IDM 5.x

It is sometimess useful to get a user's password or a resource's password from Sun IDM. The following JavaScript tool decodes such passwords.

Source Code

Save the following code in a file, say "idmdecrypt.js":

/* EncryptedData resides in package 
 * com.waveset.security.authn (IDM 4.x)
 * com.waveset.waveset.util (IDM 5.x) 
 */
importPackage(Packages.com.waveset.util);

print("Encrypted = " + arguments[0]);

var epwd = new EncryptedData();
epwd.fromString(arguments[0]);

print("Decrypted = " + epwd.decryptToString());

Usage

Then run the script with the IDM lh command to decrypt a pasword. The password is taken from the object's XML.

Don't forget to put the password in double-quotes to prevent any shell interpretation. For example:

C:\idm50>bin\lh js idmdecrypt.js "4F3/ozyg8DY="
Encrypted = 4F3/ozyg8DY=
Decrypted = pass1234

C:\idm50>


Vinh-An Trinh
vinhant@zerointech.com