--- a/conf/config.php
+++ b/conf/config.php
@@ -25,6 +25,7 @@
     if ( ($this->config_dir = $this->_find_config_dir($default_filename)) === FALSE)
       die("Cannot find configuration default file \"$default_filename\".");
     $this->_parse_defaults_file($this->config_dir.'/'.$default_filename);
+    $this->_parse_debian_defaults();
     $this->_parse_config_file($this->config_dir.'/'.$config_filename);
     $this->_check_configuration();
 
@@ -155,6 +156,27 @@
     }
   } # check_configuration()
 
+  private function _parse_debian_defaults()
+  {
+      if (is_readable('/etc/jffnms/config-db.php')) {
+          require('/etc/jffnms/config-db.php');
+          if (!empty($dbname)) {
+              $this->configs['db'] = $dbname;
+              if (!empty($dbtype)) {
+                  if ($dbtype == 'mysql')
+                      $this->configs['db_type'] = 'mysql';
+                  else
+                      $this->configs['db_type'] = 'pg';
+              }
+              if (!empty($dbserver))
+                  $this->configs['dbhost'] = $dbserver;
+              if (!empty($dbuser))
+                  $this->configs['dbuser'] = $dbuser;
+              if (!empty($dbpass))
+                  $this->configs['dbpass'] = $dbpass;
+          }
+      }
+  }// parse_debian_defaults
 }
 
 function config_load_libs($include_type = 'gui', $jffnms_init_classes=0)
