How to use PAM to user authorization

How to use PAM to user authorization, for Openfire 4.1.3 and ubuntu ?