The PAM Auth module is based vaguely on a skeleton of the IMAP Auth module (http://drupal.org/project/imap_auth). It accomplishes the same goal except that it uses the PHP5-PAM module to accomplish the authentication. It also borrows some ideas from the ldap_integration (http://drupal.org/node/15109) module for password-form adjustments.
Ultimately, this relies heavily on the PHP PAM module available (for Debian at least) at http://packages.debian.org/etch/php5-auth-pam. The security implications of granting your web server user permission to authenticate against shadow users (typical local user setup on Linux) is up to you to determine, but you'll need to make sure that Apache can use the PAM auth function before this module will work.