Linux下设置vsftpd 500错误虚拟账号输入密码出现530错误

我的电脑 CentOS7.064位系统按照书中的配置方法yum install db4-utilsdb_load -T -t hash -f /etc/vsftpd/vftpuser.txt /etc/vsftpd/vftpuser.dbvftpuser.txt内容:user 奇行是用户名123456偶行是密码vi& /etc/pam.d/vsftpd将里面其他的都注释掉,添加下面这两行:auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vftpuseraccount required /lib/security/pam_userdb.so db=/etc/vsftpd/vftpuservim /etc/vsftpd/vsftpd.confguest_enable=YES (开启虚拟用户)guest_username=ftp (FTP虚拟用户对应的系统用户)pam_service_name=virtualftpusers& #PAM认证文件#systemctl restart vsftpd尝试登陆发现user123456530 Login incorrect错误查看日志tail -f /var/log/secure发现PAM unable to dlopen(/lib/security/pam_userdb.so): /lib/security/pam_userdb.so: cannot open shared object file: No such file or directory原来pam_userdb.so在/lib64/security/pam_userdb.so解决方法:auth required /lib64/security/pam_userdb.so db=/etc/vsftpd/vftpuseraccount required /lib64/security/pam_userdb.so db=/etc/vsftpd/vftpuser#systemctl restart vsftpd&&& //修改后重启vsftpd服务正常这是因为64位系统的原因
最新教程周点击榜
微信扫一扫vsftpd本地用户登录密码错误的解决方法
作者:佚名
字体:[ ] 来源:互联网 时间:02-21 16:43:22
本文主要介绍了vsftpd本地用户登录密码错误的解决方法,大家参考使用吧
今天发现自己虚拟机的vsftp使用本地用户名无法登陆,于是重新配置,但配置了很多次都没成功,一直显示
530 Login incorrect.
Login failed
解决方式是将vsftp.conf中的:
pam_service_name=vsftp
pam_service_name=ftp
重启vsftpd后本地用户正常登录。
不过觉得很奇怪的是:/etc/pam.d/目录下存在名为vsftp的文件,却不存在名为ftp的文件,而配置文件反而要设置成ftp才有效。
最终的配置文件是:
代码如下:listen=YESanonymous_enable=NOlocal_enable=YEScheck_shell=NOwrite_enable=YESlocal_umask=022dirmessage_enable=YESuse_localtime=YESxferlog_enable=YESconnect_from_port_20=YES#chroot_list_enable=YESpam_service_name=ftp
将匿名登录关闭,开启本地用户登录,没有怎么配置虚拟用户。
大家感兴趣的内容
12345678910
最近更新的内容当前位置:&>&&>&&>&>如何处理Linux中vsftpd 530 login incorrect报错
导读:在Linux系统操作中,如果出现vsftpd 530 login incorrect报错该如何处理呢?要想解决该问题,就要知道产生报错的原因,下面小编就给大家介绍下Linux中如何处理vsftpd 530 login incorrect报错。
类别:&&大小:1158720KB
语言:国外软件&&授权:共享软件
  在测试Checkpoint的VPN1 R6x的时候,遇到了这个错误。这说明client端跟server端的连接性是没问题。但是就是想不出为什么,还以为是用户名和口令错误呢,在Linux系统操作中,如果出现vsftpd 530 login incorrect报错该如何处理呢?要想解决该问题,就要知道产生报错的原因,下面小编就给大家介绍下Linux中如何处理vsftpd 530 login incorrect报错。
  方法一:
  登录出现 vsftpd 530 login incorrect 报错。
  解决方法:
  cp Path/RedHat/vsftpd.pam /etc/pam.d/ftp
  path为vsftp解压缩源文件目录
  这是因为我们RHEL启用了PAM,所在用到vsftp时需要用到 /etc/pam.d/ftp这个文件(默认源码安装的不会有这个文件),因此除了匿名用户外本地用户无法登录。
  方法二:
  在测试Checkpoint的VPN1 R6x的时候,遇到了这个错误。这说明client端跟server端的连接性是没问题。但是就是想不出为什么,还以为是用户名和口令错误呢。后来才google了一下,发现是server端的配置有问题。
  检查/etc/vsftpd/user_list和/etc/ftpusers,是这个文件/etc/vsftpd/vsftpd.conf少了一行:
  代码如下:
  pam_service_name=vsftpd
  $ echo &pam_service_name=vsftpd& 》》/etc/vsftpd/vsftpd.conf
  $ service vsftpd restart
  530 error就消除了!
  下面是更详细的方法:
  [root@atr-3-server1 admin]# cat /etc/vsftpd/vsftpd.conf
  # Example config file /etc/vsftpd.conf
  # The default compiled in settings are fairly paranoid. This sample file
  # loosens things up a bit, to make the ftp daemon more usable.
  # Please see vsftpd.conf.5 for all compiled in defaults.
  # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
  # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd&s
  # capabilities.
  # Allow anonymous FTP? (Beware - allowed by default if you comment this out)。
  anonymous_enable=no
  # Uncomment this to allow local users to log in.
  local_enable=YES
  # Uncomment this to enable any form of FTP write command.
  write_enable=YES
  # Default umask for local users is 077. You may wish to change this to 022,
  # if your users expect that (022 is used by most other ftpd&s)
  local_umask=022
  # Uncomment this to allow the anonymous FTP user to upload files. This only
  # has an effect if the above global write enable is activated. Also, you will
  # obviously need to create a directory writable by the FTP user.
  #anon_upload_enable=YES
  # Uncomment this if you want the anonymous FTP user to be able to create
  # new directories.
  #anon_mkdir_write_enable=YES
  # Activate directory messages - messages given to remote users when they
  # go into a certain directory.
  dirmessage_enable=YES
  # Activate logging of uploads/downloads.
  xferlog_enable=YES
  # Make sure PORT transfer connections originate from port 20 (ftp-data)。
  connect_from_port_20=YES
  # If you want, you can arrange for uploaded anonymous files to be owned by
  # a different user. Note! Using &root& for uploaded files is not
  # recommended!
  #chown_uploads=YES
  #chown_username=whoever
  # You may override where the log file goes if you like. The default is shown
  # below.
  #xferlog_file=/var/log/vsftpd.log
  # If you want, you can have your log file in standard ftpd xferlog format
  xferlog_std_format=YES
  # You may change the default value for timing out an idle session.
  #idle_session_timeout=600
  # You may change the default value for timing out a data connection.
  #data_connection_timeout=120
  # It is recommended that you define on your system a unique user which the
  # ftp server can use as a totally isolated and unprivileged user.
  #nopriv_user=ftpsecure
  # Enable this and the server will recognise asynchronous ABOR requests. Not
  # recommended for security (the code is non-trivial)。 Not enabling it,
  # however, may confuse older FTP clients.
  #async_abor_enable=YES
  # By default the server will pretend to allow ASCII mode but in fact ignore
  # the request. Turn on the below options to have the server actually do ASCII
  # mangling on files when in ASCII mode.
  # Beware that turning on ascii_download_enable enables malicious remote parties
  # to consume your I/O resources, by issuing the command &SIZE /big/file& in
  # ASCII mode.
  # These ASCII options are split into upload and download because you may wish
  # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
  # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
  # on the client anyway.。
  #ascii_upload_enable=YES
  #ascii_download_enable=YES
  # You may fully customise the login banner string:
  #ftpd_banner=Welcome to blah FTP service.
  # You may specify a file of disallowed anonymous e-mail addresses. Apparently
  # useful for combatting certain DoS attacks.
  #deny_email_enable=YES
  # (default follows)
  #banned_email_file=/etc/vsftpd.banned_emails
  # You may specify an explicit list of local users to chroot() to their home
  # directory. If chroot_local_user is YES, then this list becomes a list of
  # users to NOT chroot()。
  #chroot_list_enable=YES
  # (default follows)
  #chroot_list_file=/etc/vsftpd.chroot_list
  # You may activate the &-R& option to the builtin ls. This is disabled by
  # default to avoid remote users being able to cause excessive I/O on large
  # sites. However, some broken FTP clients such as &ncftp& and &mirror& assume
  # the presence of the &-R& option, so there is a strong case for enabling it.
  #ls_recurse_enable=YES
  pam_service_name=vsftpd
  userlist_enable=YES
  #enable for standalone mode
  listen=YES
  tcp_wrappers=YES
  上面就是小编总结的Linux下处理vsftpd 530 login incorrect报错的方法介绍了,如果你出现了该报错,又不知道该如何处理的话,不妨先找找出错原因,再从原因上入手解决相关问题。
96%的人还浏览了
96%的人还浏览了
96%的人还浏览了
96%的人还浏览了
周排行月排行总排行123456789101234567891012345678910首页 & ftp/dhcp/nfs/samba/mail/vpnvsftpd登录时的典型错误 最近在对一台linux测试主机安装vsftpd后,进行登录时出现了三个错误:一个是错误:530 Login incorrect;一个错误是500 OOPS: cannot change directory;还有一个是ftp: connect: No route to host 。 错误一:530 Login incorrect 通过查看/var/logs/secure发现有如下面的错误:pam_userdb(vsftpd:auth): user_lookup: could not open database `/etc/vsftpd/vsftpd_login.db': No such file or directory 到/etc/vsftpd查看下加密过的认证文件,发现为vsftpd.login.db ,错把 "_" 写成了点 ,重命名该文件,问题解决。不过该问题还有可能是因为/etc/vsftpd.conf中没有加入pam_service_name=vsftpd&或&/etc/pam.d/vsftpd文件认证配置不正确引起的,需要在该文件后加入下面的两行。auth
/lib64/security/pam_userdb.so
db=/etc/vsftpd/vsftpd_login
account required
/lib64/security/pam_userdb.so
db=/etc/vsftpd/vsftpd_login注:如果是32位系统,上面的lib64需要换成lib ,最后的认证文件vsftpd_login后面没有".db" ,系统会自动增加的&。如果加上 ".db" 将会出错&。 错误二:500&OOPS: cannot change directory错误 。 因为我在vsftpd.conf中有chroot_local_user=YES的配置,其作用是为了锁定用户在自己的home目录中。 这样FTP登录用户的“/”,就是passwd中的home path,比如/opt/ftp/。避免FTP用户跑到/etc乱闯。这样设置过,FTP登录时,会自动执行CWD /opt/ftp,并且把这个目录设置为FTP进程的根目录,用户就无法离开了。 同时,由于该机系统开启有selinux防火墙,SELinux会阻止ftp daemon读取用户home目录。FTP会报错: “500 OOPS: cannot change directory”。无法进入目录,出错退出。 有两种解决方法: 1、关闭selinux防火墙:[root@localhost vsftpd]# setenforce 0以上为在不重启服务器的情况下,临时关闭selinux防火墙。此时可以通过sestatus查看状态 。[root@localhost vsftpd]# sestatus -v
SELinux status:
disabled 注:如果需要永久关闭,需要修改文件/etc/selinux/config文件 。 2、修改selinux里的ftp状态& 首先通过getsebool查看ftp相关项的状态[root@test173 /]# getsebool -a|grep ftp
allow_ftpd_anon_write --& off
allow_ftpd_full_access --& off
allow_ftpd_use_cifs --& off
allow_ftpd_use_nfs --& off
allow_tftp_anon_write --& off
ftp_home_dir --& off
ftpd_connect_db --& off
ftpd_disable_trans --& off
ftpd_is_daemon --& on
httpd_enable_ftp_server --& off
tftpd_disable_trans --& off将ftp_home_dir或ftp_disable_trans任一项设置成on即可:[root@Ansen ~]# setsebool -P ftpd_disable_trans 1
[root@Ansen ~]# setsebool -P ftp_home_dir 1
[root@Ansen ~]# service vsftpd restart 错误三:ftp: connect: No route to host 出现这个错误时,错误本身已经为我们提示的很明白了:Try "modprobe ip_conntrack_ftp", if that helps. If yes, then you should
add that module to /etc/sysconfig/iptables-config即,iptables中未加载modprobe ip_conntrack_ftp模块,需要我们为iptable配置该模块没重启iptables,问题即可解决 。echo ' IPTABLES_MODULES="ip_nat_ftp ip_conntrack_ftp" ' && /etc/sysconfig/iptables-config
service iptables restart不过,也有人给出的方式是将ftp的pasv模式给关掉,即在/etc/vsftpd/vsftpd.conf中的pasv_enable设置为NO&。因为我需要开启pasv模式,所以该方法我并未测试是否能行得通。 错误四:421 Service not available 报该错误的原因,除了可以是因为是 没有启用配置
connect_from_port_20=YES外,还有一个很大的可能是因为/etc/hosts.deny里配置了ALL:ALL,而没有在hosts.allow里对ftp进行放行。放行的方法很简单:vsftpd: All:allow或按IP段允许
vsftpd:192.168.0.
vsftpd:192.168.122.
本站的发展离不开您的资助,金额随意,欢迎来赏!
分类: ftp/dhcp/nfs/samba/mail/vpn ftp
回复 | 引用您可能也喜欢windows下利用ftp批处理备份 vsftp软链接ln遇到550错误 iptables nat下的ftp配置 ftp 425 Can't open data connection ftp的主被模式工作原理 捐助本站
如您感觉本博客有用,可扫码向本博客捐赠近期文章 skydns编译安装 Confd+etcd实现高可用自动发现 etcd集群搭建 通过mysql+PHPExcel实现查询导出 zabbix告警查询页文章归档 文章归档 选择月份 2017年五月 &(3) 2017年三月 &(3) 2017年二月 &(2) 2017年一月 &(3) 2016年十二月 &(4) 2016年十一月 &(6) 2016年十月 &(5) 2016年九月 &(5) 2016年八月 &(6) 2016年七月 &(4) 2016年六月 &(10) 2016年五月 &(18) 2016年四月 &(5) 2016年三月 &(2) 2016年二月 &(4) 2016年一月 &(8) 2015年十二月 &(8) 2015年十一月 &(9) 2015年十月 &(17) 2015年九月 &(9) 2015年八月 &(24) 2015年七月 &(11) 2015年六月 &(15) 2015年五月 &(23) 2015年四月 &(14) 2015年三月 &(22) 2015年二月 &(15) 2015年一月 &(24) 2014年十二月 &(13) 2014年十一月 &(16) 2014年十月 &(19) 2014年九月 &(18) 2014年八月 &(18) 2014年七月 &(20) 2014年六月 &(21) 2014年五月 &(24) 2014年四月 &(16) 2014年三月 &(29) 2014年二月 &(22) 2014年一月 &(22) 2013年十二月 &(24) 2013年十一月 &(20) 2013年十月 &(18) 2013年九月 &(16) 2013年八月 &(16) 2013年七月 &(20) 2013年六月 &(21) 2013年五月 &(19) 2013年四月 &(18) 2013年三月 &(24) 2013年二月 &(21) 2013年一月 &(18) 2012年十二月 &(24) 2012年十一月 &(18) 2012年十月 &(17) 2012年九月 &(17) 2012年八月 &(18) 2012年七月 &(26) 2012年六月 &(36) 2012年五月 &(36) 2012年四月 &(28) 2012年三月 &(46) 2012年二月 &(23) 2012年一月 &(15) 2011年十二月 &(27) 2011年十一月 &(59) 2011年十月 &(19) 2011年九月 &(16) 2011年八月 &(46)linux中vsftpd 530 Login incorrect 解决-linux-操作系统-壹聚教程网linux中vsftpd 530 Login incorrect 解决
vsftpd是linux中的一个体ftp软件了,但有朋友经常碰到vsftpd 530 Login incorrect这个问题很常见,下面我们一起来看看此问题的解决办法。
vsftpd 530 Login incorrect这个问题很常见,网上一搜很多,但是绝大部分,都是忽悠人的。下面说一下我的解决办法,
服务器说明:服务器用的是centos 6.5 64 位,vsftpd用的是vsftpd: version 2.2.2,系统用户是nologin的
1, 检查/etc/vsftpd/vsftpd.conf配置
local_enable=YES&
pam_service_name=vsftpd&&&& //有人说ubuntu是pam_service_name=ftp(本人未测试)&
userlist_enable=YES&
2,修改/etc/vsftpd/ftpusers
# vim /etc/pam.d/vsftpd&& //你会发现,拒绝ftpusers里面的用户&
auth&&&&&& required&&&& pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed&
ftpusers里面是ftp默认拒绝的用户,如果要想系统用户,就把这个用户从ftpusers文件中删除。
[root@node1 vsftpd]# cat /etc/vsftpd/ftpusers&
# Users that are not allowed to login via ftp&
#daemon&& //删除掉就能登录了&
。。。。。。。。。省略。。。。。。。。。&
在这里要注意,不要把/etc/pam.d/vsftpd里面的deny改成allow,不然你自己建立的用户就会报530 Login incorrect
3,重启vsftpd
# /etc/init.d/vsftpd start&
上一页: &&&&&下一页:相关内容

我要回帖

更多关于 vsftpd 错误日志 的文章

 

随机推荐