龙空技术网

FTP:530 Login incorrect 解决方法

网络番茄 640

前言:

今天朋友们对“centosvsftp不能登录”都比较关怀,你们都需要学习一些“centosvsftp不能登录”的相关资讯。那么小编同时在网摘上收集了一些有关“centosvsftp不能登录””的相关内容,希望各位老铁们能喜欢,我们快快来了解一下吧!

操作系统:centos8

1、创建登录用户

useradd -s /sbin/nologin zhb (所建用户不能登录系统)

passwd zhb

2、配置user_list文件

vim /etc/vsftpd/user_list

在user_list中添加用户:zhb

3、配置vsftpd.conf文件

vim /etc/vsftpd/vsftpd.conf

一下配置同时允许匿名登录(用户名:anonymous密码:空)和本地用户登录

anonymous_enable=YES

local_enable=YES

write_enable=YES

local_umask=022

anon_umask=022

anon_upload_enable=YES

anon_other_write_enable=YES

anon_mkdir_write_enable=YES

dirmessage_enable=YES

xferlog_enable=YES

connect_from_port_20=YES

xferlog_std_format=YES

ftpd_banner=Welcome to blah FTP service.

chroot_local_user=YES

listen=YES

pam_service_name=vsftpd

userlist_enable=YES

userlist_deny=NO

local_root=/home/data(可以不指定)

allow_writeable_chroot=YES

anon_root=/var/ftp

no_anon_password=YES

pasv_enable=YES

pasv_min_port=30000

pasv_max_port=35000

这个时候登录会报:“ 530 Login incorrect ”

原因:pam鉴权

步骤:

1、vim /etc/pam.d/vsftpd

注释掉:

# auth required pam_shells.so

2、vim /etc/shells

增加:/sbin/nologin

重启服务器,解决~

标签: #centosvsftp不能登录