To create an MD5 password at the prompt, assuming you have tomcat installed in /usr/local/tomcat, type

$ export TOMCAT="/usr/local/tomcat"$ java -cp "/server/lib/catalina.jar:/usr/share/java/jmxri.jar:/bin/commons-logging-api.jar" \org.apache.catalina.realm.RealmBase -a md5 [secret]

by replacing “[secret]” with the password.
Some systems have a working script that does the same thing.