I installed tomcat 8 on linux.
I edit tomcat-users.xml and restart tomcat couple of times and I still cant su to tomcat with password tomcat.
what to do?
below is my tomcat-users.xml :
<?xml version='1.0' encoding='utf-8'?>
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
NOTE: The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file. Do not forget to remove
<!.. ..> that surrounds them.
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
The tomcat-users.xml file does not define or reference OS userids. It's strictly a database that contains userids, passwords, and user role assignments used by some of the Tomcat Realm plugins. It's not even used if you're using a Realm that employs a SQL database, LDAP server, web-service or other Realm that's not a descendent of the MemoryRealm.
The "su" command switches an OS user's identify to be that of another OS user. So if you want to "su tomcat", you have to have defined "tomcat" as an OS userid, regardless of what (if any) Tomcat security Realm(s) your webapps are running under. See Sam's post for more on how to do that.
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.