LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-04-2012, 10:22 PM   #1
lonelyman
Member
 
Registered: May 2012
Location: Shanghai
Distribution: redhat,centos,fedora
Posts: 63
Blog Entries: 4

Rep: Reputation: Disabled
tomcat 7 , what's wrong ?


hi guys:
recent i met with a problem,but i don't what is wrong with what i had done,my os is Centos6.2(X86),i have installed the tomcat 7,and there is a strange problem,i have alterd the server.xml and the tomcat-users.xml just to login in the managerpage,but everytime i open the page it gives me a loginpage and after i typed the username and password it will show again and again which really anonys me,here is my tomcat-users.xml
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<user username="paul" password="mypassword" roles="manager-gui,manager,admin-gui,admin"/>


anyidea?
~
 
Old 07-05-2012, 01:55 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

IIRC in tomcat7 you need to use 2 different users for the manager and admin roles. So edit tomcat-users.xml and use something like:
Code:
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<user username="paul" password="mypassword" roles="manager-gui,manager"/>
<user username="foo" password="bar" roles="admin-gui,admin"/>
Regards

Last edited by bathory; 07-05-2012 at 01:59 AM.
 
Old 07-05-2012, 03:18 AM   #3
lonelyman
Member
 
Registered: May 2012
Location: Shanghai
Distribution: redhat,centos,fedora
Posts: 63

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
thanks for help,but it doesn't work,the log says that my user has been locked,i don't know why it occured,but the guys around actually did it,i just don't know what is wrong.
 
Old 07-05-2012, 04:13 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Could you post tomcat-users.xml and the changes made in server.xml?
 
Old 07-05-2012, 09:20 PM   #5
lonelyman
Member
 
Registered: May 2012
Location: Shanghai
Distribution: redhat,centos,fedora
Posts: 63

Original Poster
Blog Entries: 4

Rep: Reputation: Disabled
the above i post is all i have in my tomcat-users.xml and i only have the port changed in my server.xml.

Last edited by lonelyman; 07-05-2012 at 09:29 PM.
 
Old 07-06-2012, 12:39 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by lonelyman View Post
the above i post is all i have in my tomcat-users.xml and i only have the port changed in my server.xml.
You need to include everything inside a <tomcat-users> tag. Add and the xml declaration just to be formal:
Code:
<?xml version='1.0' encoding='utf-8'?>

<tomcat-users>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<role rolename="admin-gui"/>
<user username="paul" password="mypassword" roles="manager-gui,manager,admin-gui,admin"/>
</tomcat-users>
Regards
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Session replication using apache+mod_jk+tomcat(5.5.28-veriosn of tomcat) sreejithp Linux - Server 1 12-24-2010 06:46 AM
Tomcat and Debian outputting wrong information Wells Debian 0 01-16-2008 10:09 AM
Installing Tomcat 5.5 where did I go WRONG? bstuart Linux - Software 3 06-14-2005 06:28 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration