Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Tomcat-user.xml is not getting updated when new users are added via RTC

Hi there,

I've an issue whereby the Tomcat-user.xml file is not getting updated when new users are added via RTC. This poses an issue because, the repository permissions that are granted to the users, are only valid so long as the server is not restarted. Once the Jazz Team Server is restarted, all the repository permissions that have been earlier assigned, will dissapear. However the users still exist.

Has someone else has faced a similar issue and fixed it before.

Thanks,

KH

1

0 votes


Accepted answer

Permanent link

THIS SOLVED THE PROBLEM FOR ME. 

Edit the server.xml file. 

  <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase" readonly="false" />

Add the attribute in this connector readonly="false".

The default is readonly="true" which of course if not explicitly changed using the above command will keep the tomcat-users.xml in a read only mode.

Then restart tomcat.  Now any changes you make to your Active Users in RTC will update the tomcat-users.xml file.

Ralph Schoon selected this answer as the correct answer

2 votes

Comments

Just to add a little more information, this can happen after an upgrade from 3.x to 4. On Tomcat v5.5 the value is not set and defaults to readonly=false but on Tomcat v7.0 the default is readonly=true. When upgrading, the original server.xml is copied over without the readonly value set and therefore defaults to true after the upgrade. A fresh install of 4 has the readonly set to true.  This may also cause CRJAZ1231errors when a user attempts to change their password.

1 vote

Please see Karl's answer above for details why this happens. I think this should be checked in each upgrade.

Thanks Karl for this hint. 

@rschoon: that link doesn't work for me. It takes me to a "The page you requested cannot be found"

Hmm, it seems like the link is an attempt to link to Karl's comment?

It is Karl's comment above. Sorry for the wrong link.

While we are correcting mistakes I wrote "A fresh install of 4 has the readonly set to true" it should say " A fresh install of 4 has the readonly set to false" (I got an error that said I didn't have enough points to edit a comment)


2 other answers

Permanent link
Hi,

I have never seen anything like this. I would suggest to check the Tomcat logs for issues. I would also make sure that the server has permissions to save the file. E.g. in Windows don't install into Program Files for issues having to launch as an administrator.

1 vote


Permanent link
I am experiencing the exact same issue!  It worked fine under version 3.0.1.3.  Now I have 2 separate RTC installations using RTC 4.0 in which tomcat-users.xml is not getting updated.  RTC reads tomcat-users.xml and authenticates properly but it does not write changes to tomcat-users.xml.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 20 '12, 7:56 p.m.

Question was seen: 10,213 times

Last updated: Oct 15 '12, 11:07 a.m.

Confirmation Cancel Confirm