views:

386

answers:

2

Hello,

I'm using Tomcat 6.0 as a webserver, and I'm trying to open tomcat manager page, but whenever I enter the username as specified in tomcat-users.xml file, I'm getting an error as:

  **401 Unauthorized**

Here's my tomcat-users.xml file:

<tomcat-users>
<role rolename="manager"/>
<user name="admin" password="" roles="admin,manager" />
  </tomcat-users>

I restart the tomcat, but it has not helped me. Could someone please tell me what's going on wrong?

A: 

The documentation is here. Have you refreshed (or even restarted) the browser?

You need to find out if the file is in the correct place and being used at all. What happens if you deliberately enter the wrong password? Does it give you a chance to get the password correct? Does it work if you have a non-blank password?

John
+1  A: 

Have you tried:

<tomcat-users>
<role rolename="admin"/>
<role rolename="standard"/>
<role rolename="manager"/>
<user name="admin" password="" roles="standard,admin,manager" />
</tomcat-users>

manager role is required for Tomcat manager. admin role is required for Tomcat host-manager.

I'm not sure if the "standard" role is necessary but it is in the Tomcat documentation.

http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Configuring%20Manager%20Application%20Access

Mark McLaren
If you accessing the server remotely, there could also be IP address restrictions.
Mark McLaren