歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux管理 >> Linux維護 >> CentOS下pure-ftpd服務器報錯530 login authentication怎麼辦?

CentOS下pure-ftpd服務器報錯530 login authentication怎麼辦?

日期:2017/3/2 10:27:52   编辑:Linux維護

CentOS系統下進行pure-ftpd服務器連接時出現了報錯提示,即530 Login authentication failed,不少人並不理解該報錯的意思,下面小編就給大家介紹下pure-ftpd服務器報錯該如何處理。

連接pure-ftpd的時候竟然不能登錄,總是提示:

530 Login authentication failed

Pure-Ftpd安裝在debian6上,所以與Centos下有些不同,啟用調試模式:

[root@localhost ~]# lftp

lftp :~》 open -u feifei,“123456” 192.168.2.23

lftp [email protected]:~》 debug

lftp [email protected]:~》 ls

---- 正在連接到 192.168.2.23 (192.168.2.23) 端口 21

《--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------

《--- 220-You are user number 2 of 50 allowed.

《--- 220-Local time is now 02:46. Server port: 21.

《--- 220-This is a private system - No anonymous login

《--- 220-IPv6 connections are also welcome on this server.

《--- 220 You will be disconnected after 15 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

《--- 500 This security scheme is not implemented

---》 OPTS UTF8 ON

《--- 200 OK, UTF-8 enabled

---》 OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;

《--- 200 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: 登錄失敗: 530 Login authentication failed

《--- 530 You aren‘t logged in

---》 QUIT

《--- 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.

《--- 221 Logout.

---- 關閉控制連接

pure-ftpd是使用puredb方式認證的,通過查看/usr/sbin/pure-ftpd-wrapper這個perl腳本後,發現下面一段代碼:

119 # examine authentication files in /etc/pure-ftpd/auth

120

121 my @authfiles;

122

123 opendir (ETCAUTH, ’/etc/pure-ftpd/auth‘)

124 || die “$0: Couldn’t examine directory /etc/pure-ftpd/auth: $!n”;

125 @authfiles = sort (grep {-l “/etc/pure-ftpd/auth/$_”} readdir (ETCAUTH));

126 closedir (ETCAUTH);

上面,很清楚寫著會檢查/etc/pure-ftpd/auth/這個目錄的認證文件,並且用sort進行排序,查看服務器的/etc/pure-ftpd/auth/這個目錄:

root@vps:~# ls /etc/pure-ftpd/auth

65unix 70pam

發現就只有pam和unix認證方式的認證文件,而沒有puredb的,因為使用puredb認證的,於是進行以下步驟:

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

可以看到,上面的啟動參數已經增加了:-l puredb:/etc/pure-ftpd/pureftpd.pdb,而原來的啟動參數如下:

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

通過本文方法的介紹,相信用戶了解到CentOS系統pure-ftpd服務器報錯530 Login authentication failed的原因,並可使用本文介紹的方法進行解決。

Copyright © Linux教程網 All Rights Reserved