If you forget or misplace your master password for Virtualmin, you can easily recover it by using the following URL:
https://virtualmin.joyent.us/SERVER/password-recovery/
(replace SERVER with your server name)
Enter your user name and have your password mailed to you. Virtualmin will only use the email address that it registered as Contact email on your primary virtual server (in Virtualmin, open Configurable settings under Edit Virtual Server).
This will only work in case you cannot sign in to Virtualmin. If you
are logged in (i.e. your browser has a valid
HTTP authentication session and you can navigate Virtualmin), use the
Administration password field on your primary virtual server to reset your password.
This feature will not work if you used passwd in your shell to change your password there. There is really no reason to use passwd instead of Virtualmin, but if you do, this will be the consequence.