Drupal 7: check login password with DB password
You can tweak the existing user login form by implementing hook_form_alter or one of its friends (see link). It allows you to add your own password validation functions.

If you don't know which form ID to use, you can add this code to a custom module to get all used form ids printed out:

mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    dpm($form_id);
}


You need the Devel module, and appropriate permissions to see the output of dpm().

But there's more. You have to think about password changes, password retrieval, account creation, etc. To let users log in (with your own password check) you need to have a valid Drupal user account for every user. It's not enough to just validate the password against your own database. A possibility would be creating the user accounts in the background once the password check was positive.

A completely different approach: Import your existing users into the Drupal users table, and let them know they have to go through password retrieval.