1

Following the documentation and what are on the Internet, I installed libpam-pwdfile and here are my configurations:

# /etc/vsftpd.conf
listen_ipv6=YES
listen_port=<port>
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
allow_writeable_chroot=YES
guest_enable=YES
guest_username=vsftpd
nopriv_user=vsftpd
hide_ids=YES
virtual_use_local_privs=YES
user_sub_token=$USER
local_root=/home/vsftpd/$USER
pam_service_name=vsftpd
utf8_filesystem=YES

and

# /etc/pam.d/vsftpd
auth required pam_pwdfile.so pwdfile /etc/vsftpd.passwd
account required pam_permit.so

and

$ useradd --home /home/vsftpd --gid <group> -m --shell /bin/false vsftpd
$ htpasswd -c -b /etc/vsftpd.passwd <virtual user> $(openssl passwd -1 -noverify <password>)

However when I connect to the FTP with <virtual user>:<password>, I constantly get

USER <virtual user>
530 Login incorrect.

So what am I missing?

Update: I can log in normally if vsftpd is configured to use db (with db_load and pam_userdb.so) but not passwd file.

0

I think you're missing the -p option when invoking htpasswd

this should work:

htpasswd -c -p -b /etc/vsftpd.passwd <virtual user> $(openssl passwd -1 -noverify <password>)

see here for reference: vsftpd will not accept passwords encrypted with MD5

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.