免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2916 | 回复: 7
打印 上一主题 下一主题

[FTP] 我的vsftpd为什么只能匿名登录,而本地用户却不能登录? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-10-28 00:23 |只看该作者 |倒序浏览
我的 vsftpd.conf 如下:

  1. # Example config file /etc/vsftpd.conf
  2. #
  3. # The default compiled in settings are very paranoid. This sample file
  4. # loosens things up a bit, to make the ftp daemon more usable.
  5. #
  6. # Allow anonymous FTP?
  7. anonymous_enable=YES
  8. #
  9. # Uncomment this to allow local users to log in.
  10. local_enable=YES
  11. #
  12. # Uncomment this to enable any form of FTP write command.
  13. write_enable=YES
  14. #
  15. # Default umask for local users is 077. You may wish to change this to 022,
  16. # if your users expect that (022 is used by most other ftpd's)
  17. local_umask=022
  18. #
  19. # Uncomment this to allow the anonymous FTP user to upload files. This only
  20. # has an effect if the above global write enable is activated. Also, you will
  21. # obviously need to create a directory writable by the FTP user.
  22. #anon_upload_enable=YES
  23. #
  24. # Uncomment this if you want the anonymous FTP user to be able to create
  25. # new directories.
  26. #anon_mkdir_write_enable=YES
  27. #
  28. # Activate directory messages - messages given to remote users when they
  29. # go into a certain directory.
  30. dirmessage_enable=YES
  31. #
  32. # Activate logging of uploads/downloads.
  33. xferlog_enable=YES
  34. #
  35. # Make sure PORT transfer connections originate from port 20 (ftp-data).
  36. connect_from_port_20=YES
  37. #
  38. # If you want, you can arrange for uploaded anonymous files to be owned by
  39. # a different user. Note! Using "root" for uploaded files is not
  40. # recommended!
  41. #chown_uploads=YES
  42. #chown_username=whoever
  43. #
  44. # You may override where the log file goes if you like. The default is shown
  45. # below.
  46. #xferlog_file=/var/log/vsftpd.log
  47. #
  48. # If you want, you can have your log file in standard ftpd xferlog format
  49. xferlog_std_format=YES
  50. #
  51. # You may change the default value for timing out an idle session.
  52. #idle_session_timeout=600
  53. #
  54. # You may change the default value for timing out a data connection.
  55. #data_connection_timeout=120
  56. #
  57. # It is recommended that you define on your system a unique user which the
  58. # ftp server can use as a totally isolated and unprivileged user.
  59. #nopriv_user=ftpsecure
  60. #
  61. # Enable this and the server will recognise asynchronous ABOR requests. Not
  62. # recommended for security (the code is non-trivial). Not enabling it,
  63. # however, may confuse older FTP clients.
  64. #async_abor_enable=YES
  65. #
  66. # By default the server will pretend to allow ASCII mode but in fact ignore
  67. # the request. Turn on the below options to have the server actually do ASCII
  68. # mangling on files when in ASCII mode.
  69. # Beware that turning on ascii_download_enable enables malicious remote parties
  70. # to consume your I/O resources, by issuing the command "SIZE /big/file" in
  71. # ASCII mode.
  72. # These ASCII options are split into upload and download because you may wish
  73. # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
  74. # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
  75. # on the client anyway..
  76. #ascii_upload_enable=YES
  77. #ascii_download_enable=YES
  78. #
  79. # You may fully customise the login banner string:
  80. #ftpd_banner=Welcome to blah FTP service.
  81. #
  82. # You may specify a file of disallowed anonymous e-mail addresses. Apparently
  83. # useful for combatting certain DoS attacks.
  84. #deny_email_enable=YES
  85. # (default follows)
  86. #banned_email_file=/etc/vsftpd.banned_emails
  87. #
  88. # You may specify an explicit list of local users to chroot() to their home
  89. # directory. If chroot_local_user is YES, then this list becomes a list of
  90. # users to NOT chroot().
  91. #chroot_local_user=NO
  92. #chroot_list_enable=YES
  93. # (default follows)
  94. #chroot_list_file=/etc/vsftpd.chroot_list
  95. #
  96. # You may activate the "-R" option to the builtin ls. This is disabled by
  97. # default to avoid remote users being able to cause excessive I/O on large
  98. # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
  99. # the presence of the "-R" option, so there is a strong case for enabling it.
  100. #ls_recurse_enable=YES

  101. pam_service_name=vsftpd
  102. userlist_enable=YES
  103. #enable for standalone mode
  104. listen=YES
  105. tcp_wrappers=YES
复制代码


而 tail -f /var/log/messages 里有这样的 信息



  1. Oct 28 00:12:43 echo-yang last message repeated 2 times
  2. Oct 28 00:12:52 echo-yang vsftpd: warning: can't get client address: Bad file descriptor
  3. Oct 28 00:14:09 echo-yang modprobe: modprobe: Can't locate module sound-slot-1
  4. Oct 28 00:14:09 echo-yang modprobe: modprobe: Can't locate module sound-service-1-0
  5. Oct 28 00:14:09 echo-yang modprobe: modprobe: Can't locate module sound-slot-1
  6. Oct 28 00:14:09 echo-yang modprobe: modprobe: Can't locate module sound-service-1-0
  7. Oct 28 00:14:52 echo-yang 10月 28 00:14:52 vsftpd: vsftpd 关闭 succeeded
  8. Oct 28 00:14:52 echo-yang 10月 28 00:14:52 vsftpd: true 启动 succeeded
  9. Oct 28 00:14:52 echo-yang last message repeated 2 times
  10. Oct 28 00:15:04 echo-yang vsftpd: warning: can't get client address: Bad file descriptor
复制代码

论坛徽章:
0
2 [报告]
发表于 2005-10-28 12:10 |只看该作者

我的vsftpd为什么只能匿名登录,而本地用户却不能登录?

#接受匿名用户
anonymous_enable=YES
#匿名用户login时不询问口令
no_anon_password=YES
#接受本地用户
local_enable=YES

论坛徽章:
0
3 [报告]
发表于 2005-10-30 00:45 |只看该作者

我的vsftpd为什么只能匿名登录,而本地用户却不能登录?

检查你用的系统用户是不是在/etc/vsftpd.user_list和/etc/vsftpd.users这两个文件中(文件名可能不准确,没记住)

论坛徽章:
0
4 [报告]
发表于 2005-10-31 10:49 |只看该作者
解决了,是因为我修改了 /etc/pam.d/vsftpd 的原因.

论坛徽章:
0
5 [报告]
发表于 2005-10-31 16:16 |只看该作者
能否说说怎么改的,又怎么改好的

论坛徽章:
0
6 [报告]
发表于 2005-10-31 22:04 |只看该作者
希望每个人问的问题如果解决了都告知前因后果。方便后面每个阅读帖子的人。谢谢!!(一点建议)

论坛徽章:
0
7 [报告]
发表于 2005-10-31 22:19 |只看该作者
之前我在弄虚拟用户时,在/etc/pam.d/vsftpd 加入了下面的两行,就一直登录不了,后来删掉它们就行了。

  1. auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
  2. account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
复制代码

论坛徽章:
0
8 [报告]
发表于 2005-11-01 09:29 |只看该作者
的确是这样的,虚拟用户和系统用户是不能同时使用的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP