I cannot login to the manager application for Tomcat 7.1.1. Even with the right credentials I always get a 403 Access Denied. What am I missing?
tomcat-users.xml:
<tomcat-users>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<user username="admin1" password="password" roles="manager, admin"/>
<user username="admin2" password="password" roles="manager-gui"/>
</tomcat-users>
In case tomcat-users.xml file has been changed after tomcat had started, you may be trying to use not the actual user/password pairs. Re-starting tomcat should help in this case.
In case tomcat is started with
CATALINA_HOMEandCATALINA_BASEpointing to different directories, make sure you’re looking into$CATALINA_BASE/conf/tomcat-users.xmlfile.Also, make sure that access to the manager application is controlled by the
UserDatabaseRealm, Otherwise, user/password info in this file is not effective. Search for the<Realm/>element inCATALINA_HOME/conf/server.xml.There’s also a probability that some other component may override/modify the
UserDatabseJNDI resource, which normally reads user and role info from tomcat-users.xml for use by theUserDatabaseRealm. Search for<Resource name="UserDatabase"/>element inCATALINA_HOME/conf/server.xml.You may also want to have a look at this page in Tomcat documentation.