Included with the Webmin distribution is a program called changepass.pl to solve precisely this problem. Assuming you have installed Webmin in /usr/local/webmin-1.090, you could change the password of the admin user to foo by running
/usr/local/webmin-1.090/changepass.pl /etc/webmin admin foo

On dot5hosting it is /usr/libexec/webmin/changepass.pl /etc/webmin root foo

FAQ is at the following URL:
http://www.webmin.com/faq.html