After setting up the vsftp to use PAM as auth.

Somehow having the following error appeared in

tail -f /var/log/secure
Sep 21 09:47:45 g-server vsftpd: PAM [error: /lib/security/pam_userdb.so: wrong ELF class: ELFCLASS32]

and resulting user can’t login to ftp service at all.

Apparently is because the system is 64-bit..
so the library is sitting somewhere else… correction is as below

session optional pam_keyinit.so force revoke
# 32-bit
#auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_users
#account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_users
# 64-bit
auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_users
account required /lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_users

http://www.cyberciti.biz/tips/rhel-fedora-centos-vsftpd-installation.html
it much easier to setup because it come bundled with redhat / centos .