Database Password record in Virtualmin gets changed on webmin user password change despite setting to not change database passwd

Ok, I think that I found the issue of the database password mismatch on script installation, and way to reproduce, finally! :

  1. As admin: In Default Virtual server template go to MySQL Database settings and set "Update MySQL password to match server?" to "No". This is to avoid that sites already runing stop suddenly working because their configuration.php file's password setting doesn't get updated. Note: we also do not allow customers to change the login password in Webmin/VirtualMin Pro, but they can do that through WHMCS's Edit Product feature, and that changes their password through the Virtualmin Pro API. All is fine so far.

  2. EIther through API, or as admin, create a top-level virtual server with password tester1 (7 characters long).

Verify that in Edit Databases -> Password tab there are 7 hidden characters there.

All fine so far. As user, you can install and upgrade scripts.

  1. Either through API, or as Admin on Virtualmin, go edit the virtual server and change password to tester12345678 (14 characters).

That's when things go wrong !

You can't install scripts anymore, you get errors such as:

Database connection failed : DBI connect failed : Access denied for user 'ronald'@'localhost' (using password: YES) 1311

Now I found why:

Go into "Edit Databases" -> "Password" tab : this password GOT CHANGED to 14 characters ! despite our setting to NOT change the database password. And database password indeed did not get changed as asked, but that SEPARATE record of the password did get changed to tester12345678.

Now! if i change that passowrd back to tester1, then I can install again the scripts without issues.

So the bug is that the Virtualmin-internal record of database password for the virtualserver still gets changed on webmin user password change (through API and through Virtualmin), despite the Server Template setting to NOT change it.

I hope the above is much clearer now than my previous bug report here: http://www.virtualmin.com/node/4391

Hope that small but annoying bugger can be fixed for the next version of Virtualmin.

Best Regards, Beat

Status: 
Closed (fixed)

Comments

Thanks for your bug report, and for all the work you put into figuring that out!

Jamie will have limited Internet access for the next few days, but he'll be getting with you shortly on a fix for this.

Hi again Jamie,

This one is a real bug and we have already lost customers because of this.

Any chance to fix it ? :)

I actually have fixed this already, as part of a re-working of how MySQL and admin passwords are kept in sync. The fix will be in Virtualmin 3.81, but if you like I can send you a pre-release so you can test it yourself. Just let me know what format you want it in (RPM or .deb).

Automatically closed -- issue fixed for 2 weeks with no activity.