niedziela, 26 maja 2013

What is Tomcat default administrator password ?

If you installed and started Tomcat server and you couldn't login to 'Tomcat manager' because you dont know login and password to your admin account, you should look closer to the file "%TOMCAT_HOME%/conf/tomcat-users.xml".

In mentioned file there is section where are defined tomcat user roles which by default are commented:

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


If you want fully use tomcat server you have to add your admin account to tomcat-users.xml file: 

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


Save this file and restart tomcat server.

Now just login to your server using already defined account.

Brak komentarzy:

Prześlij komentarz