Ubuntu – Cannot login to virtualmin, even with working root password

Ubuntu

I have recently installed virtualmin on ubuntu 10.04 (64bit server edition), using the install.sh method.

Everything worked fine, and I logged in using the root username/password combo via http://my.server:10000

I came back a day later, and could not login anymore. No error messages (such as "invalid login details") were shown, and the /var/webmin/miniserv.error log showed no error messages (not even an invalid login attempt)

After much searching, I stopped apache, and changed the default port virtualmin listened on to port 80 by modifying the file /etc/webmin/miniserv.conf and updating port & listen to 80;

port=80
...
listen=80
...

This correctly allowed me to view the login page at http://my.server:80, however it had no effect on ability to log in.

So, I attempted to update my root password using:

/usr/share/webmin/changepass.pl /etc/webmin root ROOTPASSWORD
/etc/init.d/webmin restart

This also had no effect.

I'm running out of ideas here, and would love any suggestions on how to log into virtualmin once again.

Points to note:
– This is on a remote server, to which I can successfully ssh using the root username/password combination.
– Once I attempt to login at http://my.server:80, it redirects me to http://my.server:80/webmin/session_login.cgi (the same login page)


Update 3rd May;

I can semi-access Virtuamin after editing /etc/webmin/miniserv.conf and changing session=1 to session=0.

It allows me to login correctly using the root password.

The problem now is it appears there are missing images, no javascript loading, and most links show a "Error – file not found" error message (not a browser error, but the server serving up the error).

The investigation is on-going…


Update 3rd May part 2;

A tentative solution;
I ran ./install.sh --uninstall, then sudo apt-get remove webmin*. This fully uninstalled virtaulmin followed by webmin.

I then ran ./install.sh and everything seems to be working again. I will wait to create an answer specifically for this as it took a day for it to stop working last time.

Best Answer

On Ubuntu systems, there is no root login, by default (a root user exists, but it has no password). Webmin/Virtualmin defaults to using the sudoers file for logins on Ubuntu systems, and so your administrative user (usually the first user you created during OS installation) would be the one you should use to login.

That said, if you actually had a root user with a working password when you installed Virtualmin it should work fine.

The port on which Webmin runs is irrelevant to the discussion, as long as you're actually getting a login page.

The changepass.pl command changes the Webmin password...but, if Webmin is configured to use the system password via PAM (as is the case in a Virtualmin installation), I suspect it will have no impact (though it might...Webmin can use both, for users that don't have underlying system users; I'm not sure what it does for a password that exists in two places and is different). Normally, you would use the regular passwd command to set the root password, because Webmin is authenticating to the normal system passwd/shadow files via PAM.

Login failures are logged to /var/log/secure, normally, on most Linux systems. If you don't see your failed logins, then something is going wrong between the browser and Webmin. Try a different browser.