您的位置:首页 > 运维架构 > Tomcat

tomcat设置登陆用户名密码

2017-04-13 13:44 926 查看
在<tomcat-users>之间添加

<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="admin"/>
<user password="admin123456" roles="manager-gui,manager-script,admin" username="admin"/>


用户名admin,密码都是admin123456

效果:

<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. It is
strongly recommended that you do NOT use one of the users in the commented out
section below since they are intended for use with the examples web
application.
-->
<!--
NOTE:  The sample user and role entries below are intended for use with the
examples web application. They are wrapped in a comment and thus are ignored
when reading this file. If you wish to configure these users for use with the
examples web application, do not forget to remove the <!.. ..> that surrounds
them. You will also need to set the passwords to something appropriate.
-->
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
<user username="role1" password="<must-be-changed>" roles="role1"/>
-->
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="admin"/>
<user password="admin" roles="manager-gui,manager-script,admin" username="admin"/>
</tomcat-users>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: