centos/redhat(Linux) vsftpd 530 login incorrect

centos/redhat(Linux) vsftpd 530 login incorrect
一般是pam.d下的驗證文件問題

1:檢查/etc/vsftpd/vsftpd.conf裏pam_server_name=vsftpd與/etc/pam.d/vsftpd兩個文件名是否相同(這個文件是驗證用戶名/密碼所用的文件,名字可以隨便起,但兩者要一樣,因爲vsftpd.conf是調用/etc/pam.d/下的這個文件,要是名稱不同,驗證無法通過)
2:打開/etc/pam.d/vsftpd如下所示
#%PAM-1.0
session    optional     pam_keyinit.so    force revoke
auth       required        pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
........
在#%PAM-1.0這一行下面添加
auth  sufficient   /lib64/security/pam_userdb.so  db=/etc/vsftpd/vuser
account  sufficient   /lib64/security/pam_userdb.so  db=/etc/vsftpd/vuser
這裏有三個地方需要注意
1)網上有許多資料將sufficient改寫爲required,但我的系統如果寫爲required則無法登錄,出現530 login incorrect

2)/lib64/如果你的系統是64位切忌這裏是/lib64,網上這裏大多寫的是/lib那是因爲他們是32位系統
3)db=/etc/vsftpd/vuser這個是你用db_load加密後的文件,名字不要搞錯
走了很多彎路,總結了vsftpd虛擬用戶不能登錄的幾點原因
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章