What Is Tomcat Default Administrator Password ?
By default, Tomcat does not enable admin or manager access. To enable it, you have to edit the “
%TOMCAT_FOLDER%/conf/tomcat-users.xml
” manually.
File : tomcat-users.xml (before update) , initially, Tomcat comments all users and roles like above.
<?xml version='1.0' encoding='utf-8'?> <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>
File : tomcat-users.xml (after updated)
<?xml version='1.0' encoding='utf-8'?> <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"/> <role rolename="admin"/> <user username="admin" password="admin" roles="admin,manager"/> </tomcat-users>
To enable admin access, just update the content like above. Saved it and restart Tomcat, now you can access Tomcat admin or manger pages with user = “admin” and password = “admin“.
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
Comments
Post a Comment