Skip to main content
Home
badllama.com
  • Search
  • Log In

Encrypting tomcat-users.xml Passwords

jblocker's picture

Wed, 12/14/2011 - 14:44 by jblocker

How to encrypt passwords in tomcat-users.xml

    1. 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.
    2. Execute the following to generate the HASH of the password:
      $CATALINE_HOME/bin/digest.sh -a HASH_TYPE PASSWORD
    3. Replace the password for the user in question in the $CATALINA_HOME/conf/tomcat_users.xml file
    4. Restart Tomcat
Powered by Backdrop CMS