This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Cannot login into Tomcat Webserver Admin Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Cannot login into Tomcat Webserver Admin" Watch "Cannot login into Tomcat Webserver Admin" New topic
Author

Cannot login into Tomcat Webserver Admin

Sathish kumar FifthGen
Greenhorn

Joined: Sep 02, 2005
Posts: 3
Hi !

Iam using netbeans 4.1 IDE on Fedora 4 linux.I have problems when i try to login in as admin . I started the tomcat server(tomcat-5.5.7) which comes bundled with the IDE and typed http://localhost:8084/admin to login. The index page appears asking me to specify the username and password.

I have the following tomcat-user.xml file

<tomcat-users>
<user name="tomcat" password="tomcat" roles="tomcat" />
<user name="role1" password="tomcat" roles="role1" />
<user name="both" password="tomcat" roles="tomcat,role1" />
</tomcat-users>

But if i try to login with the given user names and password in tomcat-users.xml file, it resposes with the error message

Please help me how to login into this Tomcat 5.5.7 bundled with Netbeans IDE

Regards
SaThIsH
KArol Muszynski
Ranch Hand

Joined: Aug 09, 2005
Posts: 45
Add this line to tomcat-users.xml:
<user name="sathish" password="sathish" roles="admin,manager" />

and try to log in as sathish...

Best Regards,
KArol Muszynski
Ragav Seth
Greenhorn

Joined: Jan 17, 2005
Posts: 16
Hi Karol,

I have the same issue too.I tried your advice but unfortunately its not allowing me to log in.

Does tomcat 5.5.7 require any additional packages?? Is there anyting like tomcat 5.5.7.admin.zip that should I use??

any ideas??

Thanks
Ragav
Ragav Seth
Greenhorn

Joined: Jan 17, 2005
Posts: 16
Iam using the same environment and given below is the tomcat-users.xml file

<!--
NOTE: By default, no user is included in the "manager" role required
to operate the "/manager" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<tomcat-users>
<role rolename="admin" />
<role rolename="manager" />
<user name="tomcat" password="tomcat" roles="tomcat" />
<user name="role1" password="tomcat" roles="role1" />
<user name="both" password="tomcat" roles="tomcat,role1" />
<user name="ragav" password="ragav" roles="admin,manager" />
</tomcat-users>
KArol Muszynski
Ranch Hand

Joined: Aug 09, 2005
Posts: 45
Ragav,

There is a file jakarta-tomcat-5.5.9-admin.zip. If You want to use admin console You need to unpack it to Your TOMCAT_HOME folder.

If You don't have admin console installed/unpacked You should see such error: Tomcat's administration web application is no longer installed by default. Download and install the "admin" package to use it. on the http://localhost:8080/admin/ site.
Is this error message similar to the one which you had !?

Best Regards,
KArol Muszynski
Ragav Seth
Greenhorn

Joined: Jan 17, 2005
Posts: 16
Karol,

I did not have the error message shown by u in the last post.All i have is

Invalid user name and password.To try again click here.where if u click again it takes you to the admin page again.

I tried using tomcat5(changing the tomcat-users.xml) in windows and it is working fine.

But tomcat 5.5.7 bundled with netbeans 4.1 on fedora 4 linux is not working.

I guess the "admin" function doesn't come by default in tomcat 5.5.7.Thats my guess and i think the admin.zip is required.Just trying to google.

if u have any ideas please pass it over.
Sathish kumar FifthGen
Greenhorn

Joined: Sep 02, 2005
Posts: 3
Hi! Guys

Thank you for ur replies ... Finally I solved the problem ..

I had specified that i was using Fedora core Linux environment with NetBeans 4.1. Tomcat's Base directory was installed in home/sathish/.netbeans/4.1/jakarta.... . Since .netbeans was a hidden folder i cann't find the tomcat-users.xml file inside that folder. Now i found that.

Please open the folder specified above and open tomcat-users.xml file and see there exites a username "ide" with the password. If needed change the password as u prefer ---> Save ---> Restart(Must).

Now type http://localhost:8084/admin
Username = ide
Password = (urs)

U will b successfully logged in

Keep in touch with such doubts

Regards
SAthish
Khalil Salman
Greenhorn

Joined: Sep 05, 2010
Posts: 11
Thank you SAthish..
It also solved my problem...
ghulam mohammed
Greenhorn

Joined: Jul 25, 2012
Posts: 1
when you install the apache tomcat server If you have seen tomcat-user.xml file the user's name and password are commented by[code=java] <-- --> f[/code]ield if you remove these fields the default user names and passwords gets activated.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

Welcome to the JavaRanch, Ghulam!

We appreciate your attempt to answer the question, but the question was asked about 7 years ago. Usually, if it takes that long to get an answer, everyone gave up and went away. And, seeing as how the querent's display name violates our naming policy and was never corrected, probably he was banned.

So I'm afraid your efforts were in vain.

We prefer that once a message thread has gone a year or more without further input that it be allowed to rest in peace (http://www.coderanch.com/how-to/java/DontWakeTheZombies). There are always new questions needing answers, though.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot login into Tomcat Webserver Admin