How to find Tomcat default administrator password for various versions


Tomcat does not come with a default administrator password set up out-of-the-box due to security reasons. Instead, the administrator user must be manually configured.

To set up an administrator user in Tomcat, follow these steps:

  1. Locate the tomcat-users.xml file in the conf directory of your Tomcat installation.
  2. Edit tomcat-users.xml and add the following lines within the <tomcat-users> tag:

<tomcat-users>
    <role rolename="manager-gui"/>
    <role rolename="admin-gui"/>
    <user username="admin" password="admin_password" roles="manager-gui,admin-gui"/>
</tomcat-users>
    
  1. Save the changes and restart Tomcat.

Accessing the Admin Interface

Use the following URLs to access the Tomcat Manager and Admin interfaces:

  • Manager App: http://localhost:8080/manager/html
  • Host Manager: http://localhost:8080/host-manager/html

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap