Enabling digest password on Tomcat

By default the OnTime Group Calendar for Microsoft bootstrap, administator, password is saved in clear text. If you wish you may enable digest passwords so passwords are not stored in clear text. To enable this feature follow the below steps on your OnTime Group Calendar for Microsoft server:

  1. Open a Command Prompt
  2. Navigate to the directory where you installed OnTime Group Calendar for Microsoft e.g. "C:\Program Files\IntraVision\OnTimeMS-"
  3. List the files using the "dir" command and note the name of the Java runtime directory (e.g. "otd-jdk1.8.0_25") and the Tomcat directory ("otd-apache-tomcat-8.0.14")
  4. Set the JAVA_HOME variable by running the following commands using the Java runtime directory name from above:
    SET JAVA_HOME=C:\Program Files\IntraVision\OnTimeMS-\otd-jdk1.8.0_25
  5. Change into the Apache Tomcat bin-directory using the Tomcat directory from above:
    cd otd-apache-tomcat-8.0.14\bin
  6. Execute the digest.bat file specifying the administrator password of your choosing on the command line like so:

    digest.bat -a sha-256 <password>
    digest.bat -a sha-256 MyFunkyPassword

    The command returns the plaintext password and the digest password separated by a colon as shown below. Note the value returned and copy the returned value after the colon.
  7. Navigate to the conf-directory
  8. cd ..\conf
  9. Edit the tomcat-users.xml file
    notepad tomcat-users.xml
  10. Replace the value of the password attribute for the admin-user with the digest password you copied above. Save and close the file.
  11. Edit the server.xmlfile
    notepad server.xml
  12. Locate the Realm-tag referencing "UserDatabase" and change it from

    <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" />


    <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" digest="sha-256" />

  13. Save and close the file.
  14. Restart the Apache Tomcat service.

You should now be able to login using the chosen password without the password being stored as plaintext.


Friday, 08 April 2016 Posted in Administration