If implementing Kerberos, as offered by good monk ChOas, isn't an option in your environment, here's a pair of modules that together might scratch your itch. I found them using http://kobesearch.cpan.org/ with query of "authenticate".
Apache::AuthenSMB
This perl module is designed to work with mod_perl and the Authen::Smb module by Patrick Michael Kane
Authen-SMB
Perl extension to authenticate against an SMB server