UserDatabase Realm acquires authentication credentials from a jdbc Database 
source

use org.apache.catalina.realm.MemoryRealm

details at
http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#MemoryRealm

greets
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






> Date: Sun, 13 Sep 2009 19:57:38 -0700
> Subject: help with tomcat manager
> From: cam...@gmail.com
> To: users@tomcat.apache.org
> 
> Downloaded and uncompressed apache-tomcat-6.0.20.tar.gz
> 
> Started Tomcat using bin/catalina.sh start
> 
> Connected to http://servername:8080 and see the getting started page
> 
> Click on "Tomcat Manager"
> 
> Get prompted for a username/password with the following message:
> 
> A username and password are being requested by
> http://tomcat2.campee.net:8080. The site says: "Tomcat Manager Application"
> 
> I use "campee" for the username and "password" for the password.
> 
> I get prompted again for a username/password. I repeat the same
> username/password. I get prompted again and again and again.
> 
> If I click cancel, I get 401 Unauthorized and the following message:
> 
> You are not authorized to view this page. If you have not changed any
> configuration files, please examine the file conf/tomcat-users.xml in your
> installation. That file will contain the credentials to let you use this
> webapp.
> 
> You will need to add manager role to the config file listed above. For
> example:
> 
> <role rolename="manager"/>
> <user username="tomcat" password="s3cret" roles="manager"/>
> 
> I've already done this in my tomcat-users.xml file:
> 
> <tomcat-users>
> <!--
>   <role rolename="tomcat"/>
>   <role rolename="role1"/>
>   <role rolename="manager"/>
>   <user username="tomcat" password="tomcat" roles="tomcat"/>
>   <user username="both" password="tomcat" roles="tomcat,role1"/>
>   <user username="role1" password="tomcat" roles="role1"/>
>   <user username="campee" password="password" roles="manager"/>
> -->
> </tomcat-users>
> 
> From my server.xml, which is still in its default state:
> 
>   <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>
> 
> That means I should be using conf/tomcat-users.xml for usernames/passwords.
> 
> Where did I go wrong?

_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/171222986/direct/01/

Reply via email to