The LDAP module correctly removes the password recovery form, but the error message generated when a local login attempt fails still links to the form.

I fixed it in one of my modules, but for consistency it probably should be included here:

/**
 * Implements hook_form_alter
 * 
 * switches user login validator
 * so we can change the error message
 */
function mymodule_form_alter(&$form, &$form_state, $form_id){
    foreach($form['#validate'] as $key => $function){
      if($function == "user_login_final_validate"){
        $form['#validate'][$key] = 'mymodule_login_validate';
      }
    }
}

// validates user login but replaces the error message
function mymodule_login_validate(){
  global $user;
  if (!$user->uid) {
    form_set_error('name', t('Sorry, unrecognized username or password. Please <a href="@contact">contact an administrator</a> if you have forgotten your password.', array('@contact' => url('contact'))));
  }
}