System Settings -> Re-Run install wizard available to Server owners

14 posts / 0 new
Last post
#1 Sun, 02/16/2014 - 14:56
berendjdejong

System Settings -> Re-Run install wizard available to Server owners

I have this issue that every "Server owner" is able to Re-run the Install wizard; ie the Post installation wizard found under the System Settings menu.

I think this is typical something to be done by the "Master admin"; not a "Server owner".

Is there any way to hide this menu item (for now I have renamed the wizard.cgi file so server owners cannot start this wizard).

Any help and suggestions would be highly appreciated.

Sun, 02/16/2014 - 16:40
Locutus

Hmm, this is odd. Can you take screenshots of the "System Settings" menu as master admin and as server owner?

In my Virtualmin installations, I don't have a menu item "Re-run install wizard" under sytem settings, and server owners don't see the system settings menu at all.

Sun, 02/16/2014 - 16:47 (Reply to #2)
tpnsolutions
tpnsolutions's picture

Loctus,

This setting is available in the latest version of Virtualmin Pro (4.05), and I suspect will be available in Virtualmin GPL 4.05 but since it's not yet available publically in a downloadable format I can't confirm this.

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Mon, 02/17/2014 - 01:24 (Reply to #3)
berendjdejong

Hello Locutus,

Thanks for your reply.

I have attached two screen shots; 1 for Server owner and 1 for Server Admin.

I'm running version 4.05 gpl GPL of virtualmin and the webmin version is 1.675.

Tia!

Sun, 02/16/2014 - 17:02
Locutus

Yes you're right, Peter. I could reproduce that now on my experimental VM where I already have Virtualmin 4.05 installed. This must have been added with 4.05, since it does not appear on my 4.04 or older systems.

Mon, 02/17/2014 - 01:26 (Reply to #5)
berendjdejong

Sorry Locutus, saw your message a bit late (it is very early in the morning for me :-).

The question still stands; why is this menu option available for Server Owners.

I have gone through every menu and every option in virtualmin but can't find one to disable "Re-run Install Wizard" for Server owners.

Mon, 02/17/2014 - 01:52
PaliGap

Last week I noticed this too and submitted a support ticket. I aslo noticed that if you have stopped your server owners seeing the menu option for "Backup & Restore" there remains a ghost option for "Backup Encryption Keys". Jamie says these issues will be fixed in the next release.

Mon, 02/17/2014 - 14:09 (Reply to #7)
berendjdejong

Hi PaliGap,

Thanks for your update. Looks like we need to have some patience. Just out of curiosity, what do you do to prevent Server owners from starting this wizard?

Mon, 02/17/2014 - 14:41
tpnsolutions
tpnsolutions's picture

Hi,

I'm submitting the following fix to the Virtualmin team which will PATCH the bug in 4.05.

Open "/usr/libexec/webmin/virtual-server/virtual-server-lib-funcs.pl"

Search for the text "Add wizard page".

Change the line:

if ($config{'wizard_run'}) {

to

if (&master_admin && $config{'wizard_run'}) {

*** this fix will patch Virtualmin making the "Re-Run Wizard" only available to the "master admin" and not the website admins. ***

Please let me know if you run into any further issues.

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Mon, 02/17/2014 - 16:46 (Reply to #9)
Locutus

Will that only hide the link for non-master admins, or will it prevent them also from calling the wizard manually via URL line?

Mon, 02/17/2014 - 17:05 (Reply to #10)
tpnsolutions
tpnsolutions's picture

Locutus,

Good point, so far it just hides the link from "non-master" admins, but I'm still digging into the code to find what controls who has permissions over the feature. I'll post an update once I have one, and have also made Jamie aware of my update so he can implement it along with any final adjustments for the upcoming release.

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Mon, 02/17/2014 - 17:25
tpnsolutions
tpnsolutions's picture

Hi,

I've cracked it. I'd say there may be a prettier way to accomplish this, but for all intensive purposes it works!

Open the file "/usr/libexec/webmin/virtual-server/wizard.cgi"

After:

require './virtual-server-lib.pl';

Add:

if(!&master_admin) {
        &redirect("/right.cgi");
        return;
}

Basically what this will do when triggered is check to see if the user is the "master_admin" and if not, redirect them back to the "System Information" page.

Let me know if you run into any problems or have any further questions.

*** as always, I've added this to my open issue with Jamie for his review ***

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Tue, 02/18/2014 - 14:25 (Reply to #12)
berendjdejong

Hello Peter,

I have applied the patch you suggested and it works like a charm; thank you very much!

One remark: the location for my wizard.cgi is at /usr/share/webmin/virtual-server on an ubuntu installation.

Best Regards, Berend.

Tue, 02/18/2014 - 17:24 (Reply to #13)
tpnsolutions
tpnsolutions's picture

Hi,

True that, I use CentOS so that's what I used for the basis of the instructions :-)

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-229-0715 (new)
Skype: tpnsupport
Website: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Topic locked