How to encrypt passwords in tomcat-users.xml
- First edit the REALM in the $CATALINA_HOME/conf/server.xml. Add the attribute of digest="HASH_TYPE" The values for HASH_TYPE can be sha, md5 or md2.
- Execute the following to generate the HASH of the password:
$CATALINE_HOME/bin/digest.sh -a HASH_TYPE PASSWORD - Replace the password for the user in question in the $CATALINA_HOME/conf/tomcat_users.xml file
- Restart Tomcat