diff --git a/install/dist/conf/debian40.conf.php b/install/dist/conf/debian40.conf.php index 266947b0aaeab9b2693d15691cd0d6ffacf78afb..af36f5061c34978117e40dbac27ab940d00e5d53 100644 --- a/install/dist/conf/debian40.conf.php +++ b/install/dist/conf/debian40.conf.php @@ -25,7 +25,7 @@ $conf['mysql']['database'] = 'dbispconfig'; $conf['mysql']['admin_user'] = 'root'; $conf['mysql']['admin_password'] = ''; $conf['mysql']['ispconfig_user'] = 'ispconfig'; -$conf['mysql']['ispconfig_password'] = '5sDrewBhk'; +$conf['mysql']['ispconfig_password'] = md5 (uniqid (rand())); //* Apache $conf['apache']['user'] = 'www-data'; diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 5c037fbaac1c960323e068a74719e56acdd7ec18..d8eb0d67c3996642ff4a76c1e1c22a8de8b17622 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -438,6 +438,38 @@ function array_to_ini($config_array = '') { return $content; } +function is_user($user){ + global $mod; + $user_datei = '/etc/passwd'; + $users = no_comments($user_datei); + $lines = explode("\n", $users); + if(is_array($lines)){ + foreach($lines as $line){ + if(trim($line) != ""){ + list($f1, $f2, $f3, $f4, $f5, $f6, $f7) = explode(":", $line); + if($f1 == $user) return true; + } + } + } + return false; +} + +function is_group($group){ + global $mod; + $group_datei = '/etc/group'; + $groups = no_comments($group_datei); + $lines = explode("\n", $groups); + if(is_array($lines)){ + foreach($lines as $line){ + if(trim($line) != ""){ + list($f1, $f2, $f3, $f4) = explode(":", $line); + if($f1 == $group) return true; + } + } + } + return false; +} + ?> \ No newline at end of file diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index bfc8723016fc60125ca568bbe094dbaa043fd70f..33be4a1ee560b9e7685220d4a1987ed582afca06 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -664,10 +664,10 @@ class installer_base { //* Create a ISPConfig user and group $command = 'groupadd ispconfig'; - caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(!is_group('vacp')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); $command = "useradd -g ispconfig -d $install_dir ispconfig"; - caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(!is_user('vacp')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); //* copy the ISPConfig interface part $command = "cp -rf ../interface $install_dir"; diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php index e9a8f431d23812067ce37158c00e8d3ab33ca41c..7a63938a451a1737c3a89d7161fe0cc3e2375a3a 100644 --- a/interface/web/dns/form/dns_soa.tform.php +++ b/interface/web/dns/form/dns_soa.tform.php @@ -108,7 +108,7 @@ $form["tabs"]['dns_soa'] = array ( 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', 'errmsg'=> 'mbox_error_empty'), 1 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{0,64}\.$/', + 'regex' => '/^[[a-zA-Z0-9\.\-]{0,64}\.$/', 'errmsg'=> 'mbox_error_regex'), ), 'default' => '',