---
title: "Tomcat自带用户角色的说明"
author: "williamou"
date: "2011-07-22T10:43:18Z"
tags: []
categories: ["Web前端"]
slug: "tomcat"
draft: false
lastmod: "2011-07-22T22:13:04Z"
id: 1130434
url: "https://williamou.iteye.com/blog/1130434"
---

只知道tomcat-users.xml中配置的用户，系统自带角色有manager和admin两个
但具体各自有什么作用，一直没着意弄明白。

今天在无聊等待的过程，心血来潮在网上查了一下资料，也亲自实践了一把，证实可靠：

原文：
"Access to the manager application is protected by default: you need to define a user with the role "manager" in /etc/tomcat6/tomcat-users.xml before you can access it." 
"Access to the host-manager application is also protected by default: you need to define a user with the role "admin" in /etc/tomcat6/tomcat-users.xml before you can access it."

manager和admin这两个角色，分别对应系统自带的两个应用manager和host-manager。

另，tomcat文档中有提到：
There are four roles defined by the manager application:
manager-gui - Allows access to the html interface 
manager-script - Allows access to the plain text interface 
manager-jmx - Allows access to the JMX proxy interface 
manager-status - Allows access to the read-only status pages 
（见：http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html
）

这几个角色却一直没试通过（报403错误），还有待考证。