Search This Blog

Tuesday, 5 April 2016

How to Change Tomcat Admin & Manager Default Password

​Creating Tomcat User:-

To create user account edit conf/tomcat-users.xml file in editor and copy below configuration inside <tomcat-users> </tomcat-users> tags.


<tomcat-users>      <!-- user manager can access only manager section -->    <role rolename="manager-gui" />    <user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />        <!-- user admin can access manager and admin section both -->    <role rolename="admin-gui" />    <user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />      </tomcat-users>

As per above configuration user manager only can access manager web interface but admin can access both admin + manager web interface.

After making above change Stop and Start your Tomcat server.


Access Roles in Tomcat:-

Tomcat 7 and onward releases has following roles defined for accessing Tomcat Admin and Manager interfaces. Use the following roles while creating users for tomcat with specific access levels.

Roles for Admin (Host Manager) Access:

admin-gui – This allows access to the HTML GUI
admin-script – This allows access to the text interface

Roles for Manager (Manager App) Access:

manager-gui – This allows HTML GUI and the status pages
manager-script – This allows text interface and the status pages
manager-jmx – This allows JMX proxy and the status pages
manager-status – This allows access to the status pages only



No comments:

Post a Comment