Crack tomcat administrator password

Source: Internet
Author: User

Many times we have started tomcat and entered the tomcat Management page. We can click tomcat manager to view the deployed project. In this case, a problem occurs, and the password is forgotten or we want to crack the password. It is not advisable to lose passwords. This solution can be used to solve such problems.
1. Open the conf directory of tomcat and find the tomcat-users.xml
2. open the file. Find the following sentence
<Tomcat-users>
<! --
NOTE: The sample user and role entries below are wrapped in a comment
And thus are ignored when reading this file. Do not forget to remove
<!.. ...> That surrounds them.
-->
<! --
<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>
Www.2cto.com
You can modify the code as follows.
<Tomcat-users>
<Role rolename = "manager"/>
<Role rolename = "tomcat"/>
<Role rolename = "admin"/>
<Role rolename = "role1"/>
<User username = "tomcat" password = "tomcat" roles = "tomcat"/>
<User username = "both" password = "tomcat" roles = "tomcat, role1"/>
<User username = "admin" password = "admin" roles = "admin, manager"/>
<User username = "role1" password = "tomcat" roles = "role1"/>
</Tomcat-users>
 
You can set the password as needed. In this way, you can log on to tomca.


Author: chenwill3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.