Today, connect pure-ftpd when unexpectedly cannot log in, always prompt:
530 Login authentication failed
PURE-FTPD is installed on the debian6, so it is somewhat different from CentOS, enabling debug mode:
[Root@localhost ~]# Lftp
Lftp:~> open-u Feifei, "123456" 192.168.2.23
LFTP feifei@192.168.2.23:~> Debug
LFTP feifei@192.168.2.23:~> ls
----is connecting to 192.168.2.23 (192.168.2.23) port 21
<-------------Welcome to pure-ftpd [PRIVSEP] [TLS]----------
<---220-you are user number 2 allowed.
<---220-local time are now 02:46. Server port:21.
<---220-this is a private system-no anonymous login
<---220-ipv6 connections are also welcome on the this server.
<---You are disconnected after minutes of inactivity.
---> FEAT
<---211-extensions supported:
<---EPRT
<---IDLE
<---MDTM
<---SIZE
<---REST STREAM
<---mlst type*;size*;sizd*;modify*; unix.mode*; unix.uid*; unix.gid*;unique*;
<---MLSD
<---AUTH TLS
<---Pbsz
<---Prot
<---UTF8
<---TVFs
<---ESTA
<---PASV
<---EPSV
<---SPSV
<---ESTP
<---211 end.
---> AUTH TLS
<---The security scheme isn't not implemented
---> OPTS UTF8 on
<---OK, UTF-8 enabled
---> OPTS mlst type;size;modify; Unix.mode; Unix.uid; Unix.gid;
<---mlst OPTS type;size;sizd;modify; Unix.mode; Unix.uid; Unix.gid;unique;
---> USER adminis
<---331 User Feifei OK. Password Required
---> Pass 123456
<---530 Login authentication failed
---> PWD
LS: Login failed: 530 login authentication failed
<---530 you aren ' t logged in
---> QUIT
<---221-goodbye. You uploaded 0 and downloaded 0 kbytes.
<---221 Logout.
----Turn off control connections
PURE-FTPD is certified using the Puredb method, and after viewing the/usr/sbin/pure-ftpd-wrapper Perl script, the following code is found:
119 # Examine authentication files In/etc/pure-ftpd/auth
120
121 my @authfiles;
122
123 Opendir (Etcauth, '/etc/pure-ftpd/auth ')
124 & #124;& #124; Die "$0:couldn ' t examine Directory/etc/pure-ftpd/auth: $!n";
@authfiles = sort (grep {-L "/etc/pure-ftpd/auth/$_"} readdir (Etcauth));
126 Closedir (Etcauth);
Above, it is very clear that it will check the authentication file for/etc/pure-ftpd/auth/This directory and sort it, so I looked at the server's/etc/pure-ftpd/auth/directory:
root@vps:~# Ls/etc/pure-ftpd/auth
65unix 70pam
found that only the certification of Pam and UNIX authentication files, and no puredb, because I am using PUREDB certification, so the following steps:
root@vps:/etc/pure-ftpd/auth# ln-s/etc/pure-ftpd/conf/puredb 60puredb #前面的60就是用于排序的
root@vps:/etc/pure-ftpd/auth# ls
60puredb 65unix 70pam
root@vps:/etc/pure-ftpd/auth#/etc/init.d/pure-ftpd Restart
Restarting FTP server:running:/usr/sbin/pure-ftpd-l puredb:/etc/pure-ftpd/pureftpd.pdb-l pam-o clf:/var/log/ Pure-ftpd/transfer.log-u 1000-8 UTF-8-e-b
As you can see, the startup parameters above have been increased:-L puredb:/etc/pure-ftpd/pureftpd.pdb, and the original startup parameters are as follows:
root@vps:/etc/pure-ftpd/auth#/etc/init.d/pure-ftpd Restart
Restarting FTP server:running:/usr/sbin/pure-ftpd-l pam-o clf:/var/log/pure-ftpd/transfer.log-u 1000-8 UTF-8-e-b