Open tomcat-users.xml with the following command
sudo vim /usr/share/tomcat/conf/tomcat-users.xml
Enter the following content inside the <tomcat-users> </tomcat-users> tag
<role rolename="tomcat"/>
<user username="the-user-name" password="th3-p@$$w0rd" roles="tomcat"