How to change Apache Tomcat server username and password?

It’s very simple to change the Apache Tomcat Web Server username and password for the admin in case you have forgot.

To do so Locate the Apache Tomcat folder or the folder where you have installed your Apache Tomcat Server. On windows generally it can be found on C Drive (may vary according to your installation).

Here taking my example: I have installed my Apache Tomcat Web Server on C drive.
So to change the username and password visit the root directory of your Apache Tomcat Web Server.

The complete path (in my case) is as:

C:\Apache Tomcat\apache-tomcat-7.0.34\

Again this may vary according to your installation:

C:\Program Files\Apache Software Foundation\Tomcat 7.0\ 

or

C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\ 

Now Open the “conf” folder and look for “tomcat-users.xml” file
tomcat1

Open the “tomcat-users.xml” file. You will get the similar look(if opened in notepad++ editor).
tomcat-users.xml
Just look at the highlighted code and make sure this line exist and is enabled in your own “tomcat-users.xml” file. If this line is not there enter it manually or copy paste from here:


or

Change the username and password as per your convenience. Restart the Server and you are done with username and password change!