Is there or what is the default administrator user and password for Tomcat?

Tested :

  1. Tomcat 8.0.30
  2. Tomcat 7.0.67
  3. Tomcat 6.0.44

1. Tomcat 7 and Tomcat 8

Tomcat users are defined in the file – $TOMCAT_HOME/conf/tomcat-users.xml, by default, there is NO user, it means no one can access the Tomcat manager page.

To enable users to access the Tomcat manager page, add a user as the role manager-gui.

$TOMCAT_HOME/conf/tomcat-users.xml (Original)

<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>

$TOMCAT_HOME/conf/tomcat-users.xml (Updated)

<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"/>
-->

	<role rolename="manager-gui"/>
	<user username="admin" password="admin" roles="manager-gui"/>

</tomcat-users>

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

Note

Please refer to this official Tomcat Manager App HOW-TO

2. Tomcat 6

For Tomcat 6, add a user as the role manager

$TOMCAT_HOME/conf/tomcat-users.xml (Updated)

<tomcat-users>

  <role rolename="manager"/>
  <user username="admin" password="admin" roles="manager"/>

</tomcat-users>

Note

This “manager” role is deprecated, and removed since Tomcat 7.

References

  1. Tomcat Manager App HOW-TO
  2. Maven – deploy web application to Tomcat

Leave a Reply

Your email address will not be published. Required fields are marked *