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
Accepted answer
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.
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)