tomcat默认用户名密码|修改tomcat用户名和密码的方法详解

时间:2019-11-05  来源:页面特效  阅读:


我们可以通过图形用户界面来管理tomcat,启动tomcat,在地址栏中输入:

http://localhost:8080  

就可以看见tomcat的欢迎页面,点击左边的tomcat manager  就会出现一个对话框,需要输入用户名和密码,当忘记最开始安装tomcat时的用户名和密码时,我们可以通过以下方杰来解决: 


修改tomcat-users.xml文件,这个文件在tomcat的安装目录下的conf目录下,打开这个文件,我们可以看到如下信息:

  
  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.  
–>  
    
    
  word=“tomcat” roles=“tomcat”/>  
    
    
–>  
  
我们在这里加上如下的一句话:
  
修改后的文件为:
  
  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.  
–>  
    
    
    
    
    
–>  
    
  

重新启动tomcat服务器,这时,我们就可以使用用户名为admin,密码为admin的用户登录tomcat的管理界面了,这样,我们可以远程管理tomcat了

 

tomcat默认用户名密码|修改tomcat用户名和密码的方法详解

http://m.bbyears.com/wangyetexiao/77498.html

推荐访问:
相关阅读 猜你喜欢
本类排行 本类最新