How to list all FTP-users?

Solution 1:

You may configure vsftpd to serve local users but also virtual users. For that check your /etc/vsftpd.conf.

To list virtual users, check file in folder /etc/pam.d/ starting with vsftpd, my is vsftpd.virtual but most probably you have once created this file.

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

This means that your virtual users should be listed in file /etc/vsftpd.passwd

cat /etc/vsftpd.passwd

To list local users using vsftpd, check /etc/vsftpd.conf for line with something like

userlist_file=/etc/vsftpd.allowed_users

You can also make list of denied users, so it depends what you want this list for, be ware of that.

For more information check out man vsftpd.conf instead of man vsftpd.