LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Add new role to Tomcat (https://www.linuxquestions.org/questions/programming-9/add-new-role-to-tomcat-792252/)

Srikanth VM 02-28-2010 09:30 PM

Add new role to Tomcat
 
I installed Tomcat6.0.24 on my system(from their site not from repos) and i needed to add a manaager account ,
Code:

<role rolename="manager"/>
<user username="tomcat" password="s3cret" roles="manager"/>

This had to be added to tomcat-users.xml in conf DIR in Tomcat

I Edited the file tomcat-users.xml and though a new role exists i cannot access manager page , it still says 401 unauthorized and points me to the above code saying that a new role has to be added , itried restarting the server several times also . Should i add user in any other file ? or what other modifications should be done ?
I use Ubuntu 9.10

paulsm4 03-01-2010 12:49 AM

Hi -

You need to make sure you have a Tomcat "realm" is configured as a "UserDatabaseRealm":

http://tomcat.apache.org/tomcat-6.0-...s%20a%20Realm?

I'm not sure "rolename="manager"' is correct. I'd suggest adding another line in your tomcat-users.xml, with 'user="manager"'. Look here for more info:

http://tomcat.apache.org/tomcat-6.0-...rDatabaseRealm

Yes, you must recycle Tomcat for any changes to take effect.

'Hope that helps .. PSM

kantu 03-01-2010 06:32 AM

Hmm according to this thread many users fail to notice Commented lines :p
have you removed it ???
http://ubuntuforums.org/showthread.php?t=972911

Srikanth VM 03-01-2010 06:35 AM

Lol silly me , i feel like such a nOOb
Yes that s what the problem was


All times are GMT -5. The time now is 01:12 PM.