diff -uNr webserver_auth.orig/webserver_auth.module webserver_auth/webserver_auth.module
--- webserver_auth.orig/webserver_auth.module	2008-08-07 18:38:49.000000000 +0200
+++ webserver_auth/webserver_auth.module	2009-03-12 12:21:33.000000000 +0100
@@ -86,6 +86,38 @@
       eval('?>'. $code);
     }
   }
+  if (($op == 'update' || $op == 'insert')  && $edit['pass'] != '') {
+    $update_cmd = variable_get('webserver_auth_update_command', '');
+    if ($update_cmd != '') {
+      $user = str_replace('"', '\\"', $account->name);
+      $pass = str_replace('"', '\\"', $edit['pass']);
+      $update_cmd = str_replace('%user', $user, $update_cmd);
+      $update_cmd = str_replace('%pass', $pass, $update_cmd);
+      // watchdog('webserver_auth','update_cmd=%cmd',array('%cmd' => $update_cmd));
+      $output = array();
+      $return_var = 0;
+      exec($update_cmd,$output,$return_var);
+      if ($return_var > 0) {
+        watchdog('webserver_auth','Command %cmd failed with return value %ret',
+	  array('%cmd' => $update_cmd, '%ret' => $return_var), WATCHDOG_WARNING);
+      }
+    }
+  }
+  elseif ($op == 'delete') {
+    $delete_cmd = variable_get('webserver_auth_delete_command', '');
+    if ($delete_cmd != '') {
+      $user = str_replace('"', '\\"', $account->name);
+      $delete_cmd = str_replace('%user', $user, $delete_cmd);
+      // watchdog('webserver_auth','delete_cmd=%cmd',array('%cmd' => $delete_cmd));
+      $output = array();
+      $return_var = 0;
+      exec($delete_cmd,$output,$return_var);
+      if ($return_var > 0) {
+        watchdog('webserver_auth','Command %cmd failed with return value %ret',
+	  array('%cmd' => $delete_cmd, '%ret' => $return_var), WATCHDOG_WARNING);
+      }
+    }
+  }
   elseif ($op == 'logout') {
     global $base_url;
     // kick user out of a secure session so they aren't automatically logged back in
@@ -110,6 +142,22 @@
     '#title' => t('Advanced settings'),
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
+    'webserver_auth_update_command' => array(
+      '#type' => 'textfield',
+      '#title' => t('Update command'),
+      '#default_value' => variable_get('webserver_auth_update_command', ''),
+      '#size' => 30,
+      '#maxlength' => 200,
+      '#description' => t('Run this command for updating a user password (placeholder: %user %pass)'),
+    ),
+    'webserver_auth_delete_command' => array(
+      '#type' => 'textfield',
+      '#title' => t('Delete command'),
+      '#default_value' => variable_get('webserver_auth_delete_command', ''),
+      '#size' => 30,
+      '#maxlength' => 200,
+      '#description' => t('Run this command for deleting a user (placeholder: %user)'),
+    ),
     'webserver_auth_strip_prefix' => array(
       '#type' => 'checkbox',
       '#title' => t('Strip prefix'),
