Pam mysql
From Leaky
Configuration of pam_mysql allows you to use virtual users for things like Cyrus IMAP, and combined with nss_mysql you can also create real system accounts that can login, run programs, etc.
The latest version of pam mysql at the time of writing is 0.7rc1