I have Tomcat v9 installed in Linux. When I try to access Manager App - it does not ask for any login, and shows an 403 Access Denied error in the next page.
The tomcat-users.xml file shows the users entry as below-
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="admin" password="admin" roles="admin-gui,manager-gui"/>
<user username="tomcat" password="tomcat" roles="tomcat,manager-gui"/>
<user username="both" password="both" roles="tomcat,role1"/>
<user username="role1" password="role1" roles="role1"/>
</tomcat-users>
Also from server.xml, the tomcat-users.xml file is mapped properly.
>
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
I dont understand why it is not asking me to login. Until it does so, I can not validate its getting proper role or not. What may be the issue?