Skip to content

Commit 55cb023

Browse files
author
Florian Schaal
committed
FS#2213 - Ask for admin password while installation
1 parent bd9fee7 commit 55cb023

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

install/install.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@
453453

454454
//** Customize the port ISPConfig runs on
455455
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
456+
$conf['interface_password'] = $inst->free_query('Admin password', 'admin');
456457
if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port;
457458
if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port;
458459
unset($ispconfig_vhost_port);
@@ -792,6 +793,7 @@
792793

793794
//** Customise the port ISPConfig runs on
794795
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
796+
$conf['interface_password'] = $inst->free_query('Admin password', 'admin');
795797
if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port;
796798
if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port;
797799
unset($ispconfig_vhost_port);

install/lib/installer_base.lib.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,6 +2200,11 @@ public function install_ispconfig() {
22002200
$command = "chmod +x $install_dir/server/scripts/*.sh";
22012201
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
22022202

2203+
if ($this->install_ispconfig_interface == true && isset($conf['interface_password']) && $conf['interface_password']!='admin') {
2204+
$sql = "UPDATE sys_user SET passwort = md5(?) WHERE username = 'admin';";
2205+
$this->db->query($sql, $conf['interface_password']);
2206+
}
2207+
22032208
if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){
22042209
//* Copy the ISPConfig vhost for the controlpanel
22052210
$vhost_conf_dir = $conf['apache']['vhost_conf_dir'];

0 commit comments

Comments
 (0)