Tomcat用户名和密码修改
2017-04-14 09:56
357 查看
我们可以通过图形用户界面来管理tomcat,启动tomcat,在地址栏中输入:
[java] viewplain copy
http://localhost:8080
就可以看见tomcat的欢迎页面,点击左边的tomcat manager 就会出现一个对话框,需要输入用户名和密码,当忘记最开始安装tomcat时的用户名和密码时,我们可以通过以下方杰来解决:
修改tomcat-users.xml文件,这个文件在tomcat的安装目录下的conf目录下,打开这个文件,我们可以看到如下信息:
[java] view
plain copy
<tomcat-users>
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
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>
我们在这里加上如下的一句话:
[java] view
plain copy
<tomcat-users>
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<!--
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"/>
-->
<user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>
重新启动tomcat服务器,这时,我们就可以使用用户名为admin,密码为admin的用户登录tomcat的管理界面了,这样,我们可以远程管理tomcat了
相关文章推荐
- tomcat 用户名和密码的修改
- Tomcat用户名和密码修改
- Tomcat 7中修改用户名密码
- tomcat 用户名和密码的修改
- Tomcat修改用户名密码教程
- tomcat 修改用户名和密码
- tomcat用户名和密码修改
- Tomcat7.0 修改用户名密码
- 修改Tomcat下的用户名和密码
- tomcat 修改用户名和密码的问题
- tomcat默认用户名密码修改
- sql server2000 和sql server2005 修改数据库用户名和密码
- vista忘记用户名密码的修改方法
- Tomcat Manager 用户名和密码配置
- 修改Mysql用户名密码的5种方式
- 安装framework以后出现不能显示aspx页面提示用户名和密码不匹配问题的解决chicken修改
- Tomcat连接到localhost 提示:位于 XDB 的服务器 localhost 要求用户名和密码
- mysql忘记root帐号和密码,修改root用户名和密码解决方案
- 请设计各种管理系统、业务系统的大哥大姐们,设计新系统时,拜托您,请允许我修改用户名、密码
- tomcat的用户名和密码