Enable two-factor authentication for Webmin administration so the browser login needs both the account credential and an enrolled second factor. Use a current supported Webmin version and test enrollment before ending the only working session.
IN THIS ARTICLE
Check access and requirements
Keep a separate authorized administrative session or console recovery route available. Ensure the server and authenticator device clocks are correct. Decide how the organization will recover access if the device is lost, without sharing the enrollment secret broadly.
01 Enable two-factor authentication in Webmin
- As an administrator, open Webmin Configuration > Two-Factor Authentication and enable a supported provider. For an authenticator application, choose the current TOTP option; older documentation may label it Google Authenticator.
- Save the provider setting, then open Webmin Users and the enrollment controls for the intended account. Global provider selection alone does not enroll every user.
- Generate the enrollment secret and scan the QR code with the authorized authenticator. Treat both QR code and secret as credentials and avoid storing them in ordinary tickets or screenshots.
- Complete the enrollment and any offered verification test. Store recovery material provided by the installed version according to your protected recovery process.
- Open a private browser session and verify that login requires the password and a fresh authenticator code. Keep the earlier administrator session until this succeeds.
- Review any API, certificate or other nonbrowser access separately, and maintain current security updates so alternative authentication paths follow the intended policy.
Does Webmin two-factor also secure SSH?
Not automatically. SSH and other services have separate authentication policies. Configure and test each access path according to its own requirements.
Confirm the expected result
Confirm a normal new browser login requests the second factor and succeeds with the enrolled device. Test the documented recovery procedure in a controlled way before an emergency. Check that other administrators have their own identities and factors.
Resolve setup problems
If codes fail, check time synchronization and the correct enrollment entry before repeated attempts. Use the retained authorized recovery route to correct a broken enrollment. Do not disable authentication globally or expose the panel over plaintext HTTP to recover one user.