当前位置:首页 > linux教程 > 列表

linux中Pure-FTPd出现“登录失败: 530 Login authentication failed”

发布:smiling 来源: PHP粉丝网  添加日期:2015-04-21 10:56:49 浏览: 评论:0 

FTPd是一款不错的ftp软件了,但今天小编设置问题导致Pure-FTPd出现“登录失败:530 Login authentication failed”了,下面我们一起来看问题的解决办法了.

再次遭遇Pure-FTPd“登录失败:530 Login authentication failed”的问题,这一次的原因竟然是虚拟用户uid小于pure-ftpd.conf中的MinUID值,现在详细说明整个查错过程.

一般情况下,我是使用yum来安装pure-ftpd,并直接使用PureDB来验证用户的登录,一切是为了方便快捷,这一次也一样,安装完后,添加虚拟用户,绑定到目录/data/www,但这次给予虚拟用户指定的用户和组是apache,其uid和gid是48:

apache:x:48:48:Apache:/data/www:/sbin/nologin

nginx:x:498:498:nginx user:/data/cache/nginx:/sbin/nologin

使用lftp登录,及提示出错信息:

  1. lftp admin@192.168.1.168:~> ls 
  2. ---- 正在连接到 192.168.1.168 (192.168.1.168) 端口 21 
  3. <--- 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 
  4. <--- 220-You are user number 1 of 50 allowed. 
  5. <--- 220-Local time is now 08:51. Server port: 21. 
  6. <--- 220-This is a private system - No anonymous login 
  7. <--- 220 You will be disconnected after 15 minutes of inactivity. 
  8. ---> FEAT 
  9. <--- 211-Extensions supported:    
  10. <---  EPRT 
  11. <---  IDLE 
  12. <---  MDTM 
  13. <---  SIZE 
  14. <---  REST STREAM 
  15. <---  MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*; 
  16. <---  MLSD 
  17. <---  AUTH TLS 
  18. <---  PBSZ 
  19. <---  PROT 
  20. <---  UTF8 
  21. <---  ESTA 
  22. <---  PASV 
  23. <---  EPSV 
  24. <---  SPSV 
  25. <---  ESTP 
  26. <--- 211 End. 
  27. ---> AUTH TLS 
  28. <--- 500 This security scheme is not implemented 
  29. ---> OPTS UTF8 ON 
  30. <--- 200 OK, UTF-8 enabled    
  31. ---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid; 
  32. <--- 200  MLST OPTS type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;  --phpfensi.com 
  33. ---> USER admin 
  34. <--- 331 User admin OK. Password required 
  35. ---> PASS XXXX 
  36. <--- 530 Login authentication failed 
  37. ---> PWD 
  38. ls: 登录失败: 530 Login authentication failed 
  39. <--- 530 You aren't logged in 
  40. ---> QUIT 
  41. <--- 221-Goodbye. You uploaded 0 and downloaded 0 kbytes. 
  42. <--- 221 Logout. 
  43. ---- 关闭控制连接 

而在/var/log/messages中找到的错误信息:

  1. Feb 28 08:46:32 test pure-ftpd: (?@192.168.1.10) [INFO] New connection from 192.168.1.10 
  2. Feb 28 08:46:34 test pure-ftpd: (?@192.168.1.10) [WARNING] Can't login as [admin]: account disabled 
  3. Feb 28 08:46:38 test pure-ftpd: (?@192.168.1.10) [INFO] Logout. 
  4. Feb 28 08:46:50 test pure-ftpd: (?@192.168.1.10) [INFO] New connection from 192.168.1.10 
  5. Feb 28 08:46:51 test pure-ftpd: (?@192.168.1.10) [WARNING] Can't login as [admin]: account disabled 
  6. Feb 28 08:46:53 test pure-ftpd: (?@192.168.1.10) [INFO] Logout. 

一直在想,怎么会出现account disabled的呢,自己都没有做过禁用帐户的动作,惟有一行行地查看pure-ftpd.conf的配置内容,当查看到MinUID这行时,突然醒悟过来,请看:

# Minimum UID for an authenticated user to log in.

MinUID  500

一切都明白了,pure-ftpd配置中只允许uid大于等于500的,才可以登录ftp,因此,解决方法有:

1.将配置文件的MinUID设置成48,保存重启pure-ftpd.

2.创建新ftp用户,uid大于500的,重新分配虚拟用户uid和gid.

Tags: Pure-FTPd 登录失败:530 Login

分享到: