Problem: After updating from debian lenny (5) to squeeze (6) ejabberd authentication (PAM) stopped working.
Solution: ejabberd uses an external programm called epam to authenticate. But this programm had no permission to use pam. I had to type these commands:
chown root.ejabberd /usr/lib/ejabberd/priv/bin/epam
chmod 4750 /usr/lib/ejabberd/priv/bin/epam
killall epam
ejabberd 2.1.5-3+squeeze1