sub check_password { ## inquiry to PAM my $pamh = new Authen::PAM($service, $username, \&my_conv_func) or die "Error code during PAM init!\n"; ## grab return from auth process. other than 0 equals failure my $answer = $pamh->pam_authenticate; return $answer; }