I have the exact same question with this guy: Tomcat 7 Manager - how to authenticate?
I'm using Windows and I downloaded the Tomcat 7.0.39 Installer for Windows. When the installer was running, I didn't set any username and password for it (which means I left these textfield blank). However, when I tried to look up the Server Status on the Tomcat server hompage, it reminded me to enter the username and password. Whatever I enter, included not entering anything, it wouldn't let me pass.
Then, I googled and modified the usernames and passwords as what I was told:
<?xml version='1.0' encoding='cp936'?>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="admin" password="admin" roles="manager-gui, manager-script, manager-jmx, manager-status, admin-gui, admin-script"/>
</tomcat-users>
Then, I restarted Tomcat. But I still cannot pass. I have searched very carefully but really cannot find an answer through Internet.