Tomcat default administrator password

  1. Home
  2. Blog
  3. Tomcat default administrator password

Tomcat default administrator password

Tomcat users are defined in XML file “$TOMCAT_HOME/conf/tomcat-users.xml”. There are NO users defined by default, therefore no one can access Tomcat manager page.

<tomcat-users>
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
-->
</tomcat-users>

Add below role and user to make it work.

<tomcat-users>
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
-->
<!-- Adding new role and user-->
 <role rolename="manager-gui"/>
 <user username="admin" password="admin" roles="manager-gui"/>

</tomcat-users>

Saved file and restart Tomcat, now you should able to access default manager page using http://localhost:8080/manager with user = “admin” and password = “admin”

Let's Share
Show Buttons
Hide Buttons