Clear the database root password in /etc/webmin/mysql/config when backing up

We often take backup from the template Webmin server and restore the Webmin backup file on another fresh server. Every time we do that we have to additionally clear the database root password set in /etc/webmin/mysql/config. Could you please remove the database root password when backing up the Webmin together with its modules?

I understand that some users might be interested in preserving the password, because they intent to re-use the Webmin backup file on the same server. But then there are also cases when you'd like to restore Webmin backup on other services just like you do with Virtualmin configurations - Virtualmin backup is possible to install on any other server.

So probably to meet needs of both groups, there is point in adding a simple boolean check on the Webmin's "Backup Configuration Files" page asking if the passwords (and possible other specific to current server settings) should be striped out or not.

Basically, the problem here is how to use Webmin backup feature to deploy new Webmin servers and restore preferred Webmin configuration settings from a template backup file without having to deal with cleaning the database root password.

Status: 
Closed (fixed)

Comments

unborn's picture
Submitted by unborn on Tue, 10/03/2017 - 14:46 Pro Licensee

@yngens

Hi, I - I dont think so that would be good idea.. virtualmin backups saves me time from creating my own bash scripts for backups etc.. I very often try to avoid restoration as for whole server and many of gpl folks too however that may not suits you and your model of server deploying. What I found out for many years by using virtualmin is backups worked awesome every time.. restore was never issue. gpl or when I seen pro clients out there. - so it is quiet important for gpl and pro users who do not want to mess within restoration process to have this (and for me as well). What I would propose to this issue would be simple cron script but just edit or comment out databases root password or something.and run this as an backup script in your cron.. - its easy - just have look at existing scripts.. if you want help hand with it, I dont mind but I am sure guys here can create some work-by-step for your guide or tell you how to do it, no problem :)

@ virtualmin guys, please keep it as it is, it worked for so many years. thanks.

Interesting way of providing visibility of pluralism...

Anyway, you seem to have totally ignored this part:

I understand that some users might be interested in preserving the password, because they intent to re-use the Webmin backup file on the same server. But then there are also cases when you'd like to restore Webmin backup on other services just like you do with Virtualmin configurations - Virtualmin backup is possible to install on any other server. So probably to meet needs of both groups, there is point in adding a simple boolean check on the Webmin's "Backup Configuration Files" page asking if the passwords (and possible other specific to current server settings) should be striped out or not.

I know lot's of things can be achieved by additional scripting and thats we mostly do on our end. However, Virtualmin needs to grow and further mature to cover and automatize as many common cases as possible. IMHO no hard if there will be configuration option to let users choose either of two ways.

How about an option to not over-write the password when restoring? In fact, that could even be automated ..

Or is your concern that the password is stored in the backup and could potentially leak?

How about an option to not over-write the password when restoring? In fact, that could even be automated ..

Excellent solution.

Or is your concern that the password is stored in the backup and could potentially leak?

The main concern is not to do any manual work after restoring the Webmin backup on a new server. Removing password could be automated with additional script, but then not to write it in the first place is even better solution.

Ok, I'll do it the way I suggested in the next webmin release.

Marking this as Fixed (pending) as we, Virtualmin users, have not seen this reflected on our end yet.

Status: Fixed ยป Closed (fixed)

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