When trying to logon to Webmin and/or Virtualmin, the login is unsuccessful and the UI returns the following error message:

Login failed. Please try again.

Webmin Login Failed

If you attempt to forcefully login via guessing the password, or keep repeating the login attempts, your IP address will be locked out for several minutes:

Error – Access denied for The host has been blocked because of too many authentication failures.

Webmin / Virtualmin Access Blocked

Virtualmin is built on top of Webmin, and utilizes all Webmin modules as the base, including user accounts, and the login authentication page. Thus, if you need to change or reset the password for Virtualmin, it’s actually to change or reset the password for Webmin, and vice versa.

By default, the Webmin user access rights is set to Unix authentication. In other words, when you login to Webmin, Webmin will authenticate the user name and password against credentials of same user name in Unix/Linux account. Thus, Webmin user shares the same password with Unix/Linux user account, and always in sync. Webmin also allows users to create their own user names and set their own passwords which are different from system account. Thus, if you forgotten your password to root account, or unable to login to Webmin with master root user, there are several scenarios that you can change or reset the root password, as detailed below.

The first method to change root password, assuming you’re using Unix authentication, if by changing root account password in the system. Login to the system via SSH or console as root, and type the following command:


Enter the new password for the root. The new password will be used by Webmin for authentication automatically.

Alternatively, login to Webmin or Virtualmin, then go to Webmin -> System -> Change Passwords, and then click on root to change the password.

Change Root Passwords in Webmin

If you’re not using Unix authentication, go to Webmin -> Webmin -> Webmin Users, and click on root. Make sure the password field is changed to Set to, then enter the new password for root.

Change Webmin Root Password

To verify that you’re using synced Unix authentication with Webmin, login to Webmin or Virtualmin, then go to Webmin -> Webmin -> Webmin Users. Click on the user account which you want to check. If the password value is Unix authentication, it means that the account is authenticated through Linux/Unix account.

If you’ve forgotten the Webmin master root password on Webmin authentication, but still you still have access to the system shell via physical console or SSH, you can change the Webmin root password with a program called changepass.pl. Assuming you have installed Webmin in /usr/libexec/webmin, you could change the password of the root user to password by running:

/usr/libexec/webmin/changepass.pl /etc/webmin root password

Once set, Webmin will switch the root user account to Webmin authentication instead of using system root account credentials.

Last but not least, if for some reason Webmin simply refuses to grant access to root master user which set to Unix authentication, even though you can login to the shell with the same password, it probably indicates that the Webmin / Virtualmin installation may be corrupted. In this case, the solution would be to reset the installation of Webmin / Virtualmin, by uninstalling and reinstalling.

Run the following command (install.sh is the Virtualmin / Webmin installation script):

./install.sh --uninstall

Uninstall Virtualmin and Webmin

Then, completely uninstall Webmin / Virtualmin package:

In Ubuntu / Debian:

apt-get remove webmin

In CentOS / RedHat:

yum remove virtualmin-release
If packages related to Webmin / Virtualmin are not completed removed, you may encounter the following error:

FATAL – Fatal Error Occurred: Installation of virtualmin-release failed: 2
FATAL – Cannot continue installation.
FATAL – Attempting to remove virtualmin repository configuration, so the installation can be
FATAL – re-attempted after any problems have been resolved.
FATAL – Removing temporary directory and files.
FATAL – If you are unsure of what went wrong, you may wish to review the log
FATAL – in /root/virtualmin-install.log

In this case, just re-run the install.sh script.

After that, install Virtualmin / Webmin again, and you should be able to login to Webmin using Unix authentication.