Found a solution to this problem here:
http://fixunix.com/debian/129361-pam...tpd-sarge.html
Turns out pam_user_db automatically appends ".db" to the filename that's given to the module as the "db" argument. If you name your database "/foo/bar/blah.db", put "/foo/bar/blah" as the module argument, and it should work.
Hopefully this'll help somebody!