服务器之家

专注于服务器技术!
当前位置:首页 > FTP服务器 > vsFTPd

vsFTPd 530 Login incorrect

发布时间:2014-08-06 来源:服务器之家

今天在登录vsftpd时,突然登录不上,报 530 Login incorrect
D:DocumentsDownloads%26gt;ftp 192.168.1.250
连接到 192.168.1.250。
220 (vsFTPd 2.2.2)
用户(192.168.1.250:(none)): test
331 Please specify the password.
密码:
530 Login incorrect.
登录失败。
ftp%26gt; bye

解决办法:
查看secure日志文件,报找不到/lib/security/pam_userdb.so
[root@localhost etc]# tail -f /var/log/secure
Apr 17 15:03:53 localhost sshd[6445]: pam_unix(sshd:session): session closed for user root
Apr 17 15:04:09 localhost sshd[6531]: Accepted password for test from 192.168.1.27 port 61243 ssh2
Apr 17 15:04:09 localhost sshd[6531]: pam_unix(sshd:session): session opened for user test by (uid=0)
Apr 17 15:04:19 localhost vsftpd[6559]: PAM unable to dlopen(/lib/security/pam_userdb.so): /lib/security/pam_userdb.so: cannot open shared object file: No such file or directory
Apr 17 15:04:19 localhost vsftpd[6559]: PAM adding faulty module: /lib/security/pam_userdb.so
Apr 17 15:07:06 localhost su: pam_unix(su-l:session): session opened for user root by test(uid=500)
Apr 17 15:08:54 localhost vsftpd[6621]: PAM unable to dlopen(/lib/security/pam_userdb.so): /lib/security/pam_userdb.so: cannot open shared object file: No such file or directory
Apr 17 15:08:54 localhost vsftpd[6621]: PAM adding faulty module: /lib/security/pam_userdb.so
Apr 17 15:09:15 localhost vsftpd[6625]: PAM unable to dlopen(/lib/security/pam_userdb.so): /lib/security/pam_userdb.so: cannot open shared object file: No such file or directory
Apr 17 15:09:15 localhost vsftpd[6625]: PAM adding faulty module: /lib/security/pam_userdb.so
Apr 17 15:11:34 localhost vsftpd[6638]: PAM unable to dlopen(/lib/security/pam_userdb.so): /lib/security/pam_userdb.so: cannot open shared object file: No such file or directory
于是将/etc/pam.d/vsftpd中的pam_userdb.so db路径改为相对路径,重启vsftpd
[root@localhost pam.d]# service vsftpd restart
关闭 vsftpd: ? ? ? ? ? ? ? ? ? ?[确定]
为 vsftpd 启动 vsftpd: [确定]
重新登录,结果还是失败,但secure日志报错信息没了,继续排查。
D:DocumentsDownloads%26gt;ftp 192.168.1.250
连接到 192.168.1.250。
220 (vsFTPd 2.2.2)
用户(192.168.1.250:(none)): test
331 Please specify the password.
密码:
530 Login incorrect.
登录失败。
ftp%26gt; bye
于是我在另外一台机器上查看/etc/pam.d/vsftpd的配置,问题找到了,原来是我之前做vsftpd虚拟用户验证时忘了改回来,重新启用本地pam验证。
#%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
auth required pam_shells.so
auth include password-auth
account include password-auth
session required pam_loginuid.so
session include password-autha
重启vsftpd,结果:登录成功了!
[root@localhost etc]# service vsftpd restart
关闭 vsftpd: [确定]
为 vsftpd 启动 vsftpd: [确定]
D:DocumentsDownloads%26gt;ftp 192.168.1.250
连接到 192.168.1.250。
220 (vsFTPd 2.2.2)
用户(192.168.1.250:(none)): test
331 Please specify the password.
密码:
230 Login successful.

热点推荐