Can't Log to Virtualmin Secure Connection Failed

SYSTEM INFORMATION
OS type and version CentOS Linux release 7.9.2009
Webmin version latest
Virtualmin version latest
Related packages opcache

I recently installed Virtualmin on a fresh centos VPS. All was going fine until after restored one domain and it gave me warnings about the incorrect date format of the ssl certificate.
Then I installed opcache after which I restarted the httpd service with some errors then I could not log into webmin (https://136.243.95.214:10000/) anymore.

Secure Connection Failed

An error occurred during a connection to 136.243.95.214:10000. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG

I’ve tried lots of things to fix this with no luck.
Please help

It seems the keyfile directive in /etc/webmin/miniserv.conf was causing that particular error. After replacing it with a valid one I could get to login page yet this time I can’t login! Somehow webmin doesn’t accept my credentials although I have verified them with putty.

You probably changed your Webmin password. Webmin can have a separate password for a user, though by default it will use your system password.

You can reset it from the command line with the webmin passwd command:

# webmin passwd --help
Usage:
    passwd [options]

Options:
    --help, -h
        Print this usage summary and exit.

        Examples of usage:

         - passwd root

         - passwd --user root
 
         - passwd --user root --password ycwyMQRVAZY
 
         - passwd --config /usr/local/etc/webmin --user root --password ycwyMQRVAZY

    --config, -c
        Specify the full path to the Webmin configuration directory.
        Defaults to "/etc/webmin"

    --user, -u
        Existing Webmin user to change password for

    --password, -p
        Set new user password. Using this option may be unsecure.

But, you should probably not do that, if you can’t keep up with two passwords for the system. Just replacing the password for the root (or whatever your admin user is) user from the miniserve.users file with an x is probably the better solution. Then Webmin will use the same password as the system.

There will be a hashed password in the second field of the file (looks something like $1$7hKh4k5k6h3l8SEj4k7), if this is the situation your in.

Hi Joe,
You’re right. root is no more there!

Error: Webmin user root doesn't exist. Existing Webmin user on your system is Ů‚

That’s not what I thought was happening. I don’t know what’s happening in your case. I thought you’d reset your root password, not that you (or someone/thing else) deleted your root user.

1 Like

It’s a complete mess. I guess restoring backups from centos 8 caused the problem. Even uninstalling / reinstalling virtualmin didn’t work. So I’m starting from a fresh OS again.
Thanks alot tho, Joe :pray:

That will not work. Reinstalling after uninstalling Virtualmin will not work. The Virtualmin docs clearly state that you must install on a supported OS with nothing else installed except the OS - a freshly installed OS.

Uninstalling Virtualmin is not the same as a freshly installed OS.

That is always a terrible idea and absolutely cannot fix anything.

Good News! Solved :person_raising_hand:
I could replicate the same issue on a different server. The problem was that the disk quota was full! Therefore SSL Certificate commands in Virtualmin actually did not work without any specific warning. I accidentally figured this issue when disabling/enabling FPM when the system gave a
“can’t copy /etc/php/ini …” error.
I’ve searched the forum and it seems there are lots of such issues related to disk quotas which are enabled by default.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.