How can I change the password for Tomcat and GlassFish?

You can change the password for Tomcat and GlassFish for the DITA CMS Web.

Symptom

For security reasons, we need to change the password for Tomcat and GlassFish.

Problem

I do not know how to change the password.

Solution

To change the GlassFish console admin password, perform the following:
  1. On the GlassFish server, in a browser window, type the following: http://localhost:4848
  2. Login with the current username and password.
  3. In the GlassFish Console - Common Tasks panel, under Administration, click Change Administrator Password.
  4. Enter the new password and click Save.
  5. Edit the %DITACMSWeb_install_dir%/properties.txt file and update the following entry with the new password:
    DOMAIN_NAME=cmsappserver
    ADMIN_USER=admin
    ADMIN_PASSWORD=admin
    ADMIN_PORT=4848
    HTTP_PORT=8081
    GLASSFISH_DISPLAY_NAME=Ixiasoft Glassfish4 CMS App Server
    GLASSFISH_SERVICE_NAME=Ixiasoft-Glassfish4
To change the Apache Tomcat Administration Console password, perform the following:
  1. Edit the %DITACMSWeb_install_dir%/apache-tomcat-7.0.75/conf/tomcat-users.xml file and update the password.
  2. Click Start > Administrative Tools > Services.
  3. In the Services window, right-click the Ixiasoft-Tomcat7 entry. Click Stop.
  4. In the Services window, right-click the Ixiasoft-Tomcat7 entry. Click Start.
  5. Edit the %DITACMSWeb_install_dir%/properties.txt file and update the following entry with the new password:
    TOMCAT_USER=admin
    TOMCAT_PASSWORD=admin
    TOMCAT_HTTP_PORT=8080
    SESSION_TIMEOUT=480
    TOMCAT_DISPLAY_NAME=Ixiasoft Tomcat7 DITA CMS
    TOMCAT_SERVICE_NAME=Ixiasoft-Tomcat7
  6. Edit the %DITACMSWeb_install_dir%/apache-tomcat-7.0.75/webapps/oxygen-webapp/WEB-INF/license.properties file and update the new password.
  7. Edit the %DITACMSWeb_install_dir%/oxygenworkspace/options/license.properties file and update the new password.
To update the password used by the CMS Application Server to log into TEXTML Server and the password used by DITA CMS Web to log into the CMS Application Server, perform the following:
  1. Update the password in your authentication system such as Active Directory.
  2. Edit the %DITACMSWeb_install_dir%/apache-tomcat-7.0.75/conf/ditacms/webconfig.xml file and replace the <entry key="administrator.password">admin</entry> entry with the new password.
  3. Edit the %DITACMSWeb_install_dir%/glassfish4/glassfish/domains/cmsappserver/config/CMSAppServer.config file and replace the <admin-login domain="sampledomain" name="admin" password="admin"/> entry with the new password.
  4. In the Services window, right-click the Ixiasoft-Glassfish4 entry. Click Stop.
  5. In the Stop Other Services dialog box, click Yes.
  6. In the Services window, right-click the Ixiasoft-Glassfish4 entry. Click Start.
  7. In the Services window, right-click the Ixiasoft-Tomcat7 entry. Click Start.
  8. Edit the %DITACMSWeb_install_dir%/properties.txt file and update the following entry with the new password:
    //CMSAppServer.config
    APPSERVER_LOGIN_DOMAIN=ixiasoft
    APPSERVER_LOGIN_NAME=test
    #Clear text password or the encrypted password by IXIASOFT tools.
    APPSERVER_LOGIN_PASSWORD=testpassword
    
    //webconfig.xml
    WEBCONFIG_LOGIN_DOMAIN=ixiasoft
    WEBCONFIG_LOGIN_NAME=mtest
    #Clear text password or the encrypted password by IXIASOFT tools.
    WEBCONFIG_LOGIN_PASSWORD=testpassword
    DITA_FRAMEWORK_VERSION=1.2