In our example
Make a backup of "tomcat-users.xml" if you want and then empty the contentscd /usr/share/apache-tomcat-7.0.39/
cd conf
cp -ar tomcat-users.xml tomcat-users.xml.bak
> tomcat-users.xml
Add the below lines.vi tomcat-users.xml
Code: Select all
<tomcat-users>
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="mybestpassword" roles="manager-gui,admin-gui,manager-script"/>
</tomcat-users>