From the FAQ:

How do I change my Webmin password if I can't login?
Included with the Webmin distribution is a program called to solve precisely this problem. Assuming you have installed Webmin in /usr/local/webmin-1.150, you could change the password of the admin user to foo by running
/usr/local/webmin-1.150/ /etc/webmin admin foo