Wednesday, August 3, 2016

vsftpd 530 Login incorrect, even the username/password are correct

below this the minimal configuration that allow authentication against pam

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO



but the unusual thing is that only the default user (created in the installation process)  can login other user can not even their username/password are correct



*** to solve this problem we need to comment out "auth    required    pam_shells.so" in file  /etc/pam.d/vsftpd

and the following is the whole content of /etc/pam.d/vsftpd
auth    required    pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
@include common-account
@include common-session
@include common-auth

#auth    required    pam_shells.so


after you update the file you will be able to login with others user not only the default user

1 comment: