I have read a lot of topics in stackoverflow for solve my problem, but none was useful.
When I tried to log in Manager App ([http://localhost:8080/manager/html][1]) using a lot of different configurations, but I always obtained 401 Unauthorized after attempted to log in using the rights credentials. I restarted the tomcat server a couple of times.
This is my last configuration in conf/tomcat-users.xml
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="admin" password="admin" roles="manager-gui, manager-script, manager-jmx, manager-status, admin-gui, admin-script"/>
</tomcat-users>
This is the part related to tomcat-users in server.xml
<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>
This is my configuration: Apache Tomcat: Version 7.0.40 64 bit Tested on Chrome 26
If there is something else useful that I forgot, let me know. Thanks in advance
After restarting Tomcat, you should be able to access the Manager app (http://localhost:8080/manager/html) using username = admin and password = admin. manager-gui : Access to the Manager interface through the browser. You must assign this role to enable access to the web interface.
The default path to load the Tomcat Manager application is http://localhost:8080/manager/html. You will be prompted to enter the username and password that was stored in tomcat-users.
Description. The Windows installer for Apache Tomcat defaults to a blank password for the administrative user. If this is not changed during the install process, then by default a user is created with the name admin, roles admin and manager and a blank password.
Most common issue with Tomcat note starting is that Java is not configured properly, user trying to start Tomcat does not have permissions to do so, or another program is using port 8080 on that server.
From tailing [tomcat-root]/logs/catalina.out, I observed that you are using a locked username "admin"
06-May-2014 16:47:41.828 WARNING [http-nio-192.168.0.51-8080-exec-6] org.apache.catalina.realm.LockOutRealm.authenticate An attempt was made to authenticate the locked user "admin"
You should try with a better(non guessable) username.
<role rolename="manager-gui"/>
<user username="TomcatAdmin" password="secpa55wd" roles="manager-gui"/>
This should definitely work for you.
Configuration looks fine for me . can you please try with below tomacat-users.xml.
<tomcat-users>
<user name="admin" password="admin" roles="admin-gui,manager-gui" />
</tomcat-users>
Please restart the server after change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With