Reputation: 677
I am using Apache Tomcat server. I installed successfully on my computer because the server in running but My problem is that I cannot open a page due wrong credential. Below is the message after I enter my credential as username: root
and password: tomcat
Access to Tomcat server has not been authorized. Set the correct username
and password with the "manager-script" role in the Tomcat customizer in the
Server Manager.
See the server log for details.
What do I have do to do solve this issue or what is wrong?
Upvotes: 1
Views: 7206
Reputation: 52646
In Windows operating system, Call %CATALINA_HOME%
is directory what Apache Tomcat installed. (In Unix, macOS, $CATALINA_HOME
is the home directory of Apache Tomcat)
Looking for file %CATALINE_HOME%\conf\tomcat-users.xml
. Declare user and corresponding role follow instructor
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
<user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
<user username="role1" password="<must-be-changed>" roles="role1"/>
This is an example, it just work
<role rolename="manager-gui"/>
<role rolename="manager-status"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<user username="admin" password="admin" roles="manager-gui,manager-status,manager-script,manager-jmx"/>
<user username="admin2" password="admin2" roles="manager-gui,manager-status"/>
<user username="admin3" password="<must-be-changed>" roles="manager-jmx"/>
You need restart Apache Tomcat for new configuration in affected.
Reference: https://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Configuring_Manager_Application_Access
Upvotes: 1
Reputation: 39
This can be resolve by changing/ammending the below entry in your tomcat directory, in file \conf\tomcat-users.xml
<role rolename="manager"/>
<user username="admin" password="admin" roles="manager"/>
Hope this will resolve your issue
Upvotes: 1