What is Tomcat default administrator password ?
Problem
Is there or what is the default administrator user and password for Tomcat?
Solution
By default, Tomcat does not enable admin or manager access. To enable it, you have to edit the “%TOMCAT_FOLDER%/conf/tomcat-users.xml” manually.
File : tomcat-users.xml (before update) , initially, Tomcat comments all users and roles like above.
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <!-- <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> --> </tomcat-users>
File : tomcat-users.xml (after updated)
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <!-- <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> --> <role rolename="manager"/> <role rolename="admin"/> <user username="admin" password="admin" roles="admin,manager"/> </tomcat-users>
To enable admin access, just update the content like above. Saved it and restart Tomcat, now you can access Tomcat admin or manger pages with user = “admin” and password = “admin“.
thanks. this a tips…
proces sucses full.
Hello, I’ve modified the file as per your instructions but while it will accept the user and password when I enter the TomCat Manager it will give me
HTTP Status 403 – Access to the requested resource has been denied
type Status report
message Access to the requested resource has been denied
description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.
Which resource (URL) you try to access?
I was unable to access the server status under Tomcat 7 with the configuration given in example. I had to add the “manager-gui” role to do so:
Thanks.. very useful Tip!!
[...] Configure at your leasure, e.g. look here for enabling Tomcat Manager Login: http://www.mkyong.com/tomcat/tomcat-default-administrator-password/ [...]
nice !!!
kick start 4 novice , without tedious documentation
/etc/tomcat6/tomcat-users.xml debian 6 and debian based OS. N freeBSD also
become a server administrator keep going
thanks a lot…..
Thank you vary much
this helped alot
this was very quick n to the point.
Yes, thank you very much. Was able to get the administration and manager functioning nicely after reading your short tutorial.
It’s great to know it’s helpful
Thank you, this helped me