Encoding passwords with WebSphere Application Server

If you must change a user name and password in a properties file after installation, use these steps to encode the new password.

About this task

To prevent the password from being stored in clear text in your properties file, you can use WebSphere® Application Server to encode the password.


  1. Create a text file called mypassword.txt.
  2. Add this line to the file: mypassword=user_password and save the file.
  3. Run the following command to encode the password value:
    • For Microsoft Windows: $NODE_HOME\bin\PropFilePasswordEncoder.bat path\mypassword.txt mypassword
    • For Linux® and UNIX: $NODE_HOME/bin/PropFilePasswordEncoder.sh path/mypassword.txt mypassword

    Where $NODE_HOME represents the home directory of the WebSphere Application Server node and path represents the directory location of the mypassword.txt file.

  4. Open the mypassword.txt file and copy the encoded password value to the password field in your properties file.