1

installed Tomcat on a Ubuntu Machine, worked all properly. Port are open, i can see the Landing Page from Tomcat. When i try to login, the Credentials i put in into the tomcat-users.xml do not work. Need help, i am new to Tomcat :( Login Credentials in the Code are not the correct one :) Just some safety.

<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
<tomcat-users . . .>

    <role rolename="manager-gui"/>
    <role rolename="admin-gui"/>
    <user username="test" password="test" roles="manager-gui,admin-gui"/>
</tomcat-users>
</tomcat-users>

3
  • You did restart Tomcat after editing the xml? Apr 22, 2020 at 11:18
  • with sudo systemctl restart tomcat aswell with ./shutdown.sh and startup.sh
    – tob1zor
    Apr 22, 2020 at 11:44
  • </tomcat-users> </tomcat-users> I don't think Tomcat will accept that xml. Apr 22, 2020 at 11:46

1 Answer 1

1

I'm afraid the structure of your tomcat-users.xml is wrong. Try this:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
    <role rolename="manager-gui"/>
    <role rolename="admin-gui"/>
    <user username="test" password="test" roles="manager-gui,admin-gui"/>
</tomcat-users>
2
  • Problem solved. There was another </tomcat-users> in the Code. I dont get it where it comes from. Used a clean/fresh Install from Tomcat. Maybe i was just blind.
    – tob1zor
    Apr 22, 2020 at 12:09
  • It took me long enough to see it. Apr 22, 2020 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .