티스토리 뷰

반응형

톰캣 관리자 계정(Tomcat User) 세팅

 

apache-tomcat-6.0.26\conf\tomcat-users.xml

 

conf 파일로 진입 후 tomcat-users.xml 파일 오픈

 

아래 예시는 admin/admin 계정 세팅

<tomcat-users>

  <!--
  NOTE:  By default, no user is included in the "manager" role required
  to operate the "/manager" 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"/>
  -->
 
  <!--role rolename="manager"/>
  <user username="tomcat" password="s3cret" roles="manager"/-->
  <role rolename="manager"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <user username="admin" password="admin" roles="manager,manager-gui,manager-script,manager-jmx,manager-status"/>


</tomcat-users>

--------------------------------------------------------

아래는 다중 계정 추가 및 다중롤 세팅 방법

<?xml version='1.0' encoding='utf-8'?>

...
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="AAA"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="xxx" roles="tomcat"/>
<user username="another" password="xxx" roles="tomcat,AAA"/>
<user username="admin" password="xxx" roles="admin,manager"/>
</tomcat-users>

 

 

끗234#$!@

반응형