【问题标题】:Tomcat-6.0.20 and user authenticationTomcat-6.0.20 和用户认证
【发布时间】:2009-09-06 12:25:02
【问题描述】:

问题

拥有管理员角色的用户无法访问 tomcat 管理员页面。

我尝试做的事情

我在 tomcat-users.xml 中添加了一个具有管理员角色的用户:

<role rolename="manager"/>
<user username="emanemos" password="password" roles="manager"/>

我还查看了 $CATALINA_HOME/webapps/manager/WEB-INF/web.xml 以确保管理员角色确实用于访问应用程序:

<auth-constraint>
  <!-- NOTE:  This role is not present in the default users file -->
  <role-name>manager</role-name>
</auth-constraint>

<!-- Define the Login Configuration for this Application -->
<login-config>
  <auth-method>BASIC</auth-method>
  <realm-name>Tomcat Manager Application</realm-name>
</login-config>

<!-- Security roles referenced by this web application -->
<security-role>
  <description>
    The role that is required to log in to the Manager Application
  </description>
  <role-name>manager</role-name>
</security-role>

但是,管理器应用程序仍然会在无休止的循环中要求输入登录密码对,而忽略我的输入。

有人有什么想法吗?

【问题讨论】:

  • 我也面临同样的问题:HTTP Status 404 The requested resource (/manager/html) is not available。我没有重新安装 tocmat 的选项,因为它与其他一些软件一起提供。希望有人知道如何解决这个问题。

标签: authentication tomcat6


【解决方案1】:

您在对 tomcat-users.xml 进行更改后是否重新启动了 Tomcat?

【讨论】:

  • 嗯,对我来说效果很好。您可能已经编辑了一个未被您在尝试登录时看到的 tomcat 实际使用的 tomcat-users.xml。验证的最简单方法是关闭 tomcat 服务器并检查它是否实际上不再可访问。另一件事是检查日志目录中的 catalina.out 和其他日志文件 - 它们应该显示 tomcat 正在启动,如果有任何问题,应该在那里打印。最后的办法是尝试重新下载 tomcat zip,也许真的发生了一些非常非常奇怪的事情。
  • 这很奇怪,有点像黑暗精灵。我已经重新安装了我的tomcat,问题似乎消失了。谢谢你的帮助,西蒙。
猜你喜欢
  • 2016-09-27
  • 2010-11-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-15
  • 2014-12-14
相关资源
最近更新 更多