Один пользователь access:access, второй такой же (логин и пароль) как локальный.
Судя по пам тестеру, пам проходит, а самому всфтпд что-то не нравится. Я еще через pam_exec смотрел, что идет в модуль, там все норм.
Пробовал отключать chroot_local_user и userlist_enable, не помогает.
Клиент:
PS C:\> ftp 10.0.0.3
Connected to 10.0.0.3.
220 (vsFTPd 3.0.3)
200 Always in UTF8 mode.
User (neko.lan:(none)): access
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> bye
221 Goodbye.
PS C:\> ftp 10.0.0.3
Connected to 10.0.0.3.
220 (vsFTPd 3.0.3)
200 Always in UTF8 mode.
User (neko.lan:(none)): dunaev
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> bye
221 Goodbye.
Сервер:
# cat /etc/vsftpd.conf
listen=YES
seccomp_sandbox=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_root=/srv/data
chroot_local_user=YES
allow_writeable_chroot=YES
hide_ids=YES
guest_enable=YES
virtual_use_local_privs=YES
pam_service_name=vsftpd.virtual
guest_username=myuser
userlist_enable=YES
userlist_deny=NO
local_umask=022
check_shell=NO
force_dot_files=YES
max_per_ip=2
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
deny_email_enable=NO
ls_recurse_enable=NO
log_ftp_protocol=YES
# cat /etc/pam.d/vsftpd.virtual
#%PAM-1.0
auth sufficient pam_pwdfile_rs.so pwdfile /etc/vsftpd/virtual_users
account sufficient /lib/security/pam_permit.so
session required /lib/security/pam_permit.so
# cat /etc/vsftpd/virtual_users
access:932778fa1dd9a15dac1f6d7690b29b70e9c205a8d2b4a437f007bf6df4fe3c5200520078f95184bd37ce6ed67f362a42b4263ed4c8ba6d777b0166f9af879897
myuser:<sha512sum of real password>
# cat /etc/vsftpd.user_list
access
myuser
# ls -al /srv/data
итого 0
drwxrwxr-x 1 myuser users 12 дек 24 12:37 .
drwxr-xr-x 1 root root 28 дек 24 12:11 ..
drwxrwxr-x 1 myuser users 16 дек 24 12:49 shared
# pamtester -v -Iruser=access -Irhost=10.0.0.3 -Itty=ftp vsftpd.virtual access authenticate acct_mgmt open_session
pamtester: invoking pam_start(vsftpd.virtual, access, ...)
pamtester: performing operation - authenticate
Password:
pamtester: successfully authenticated
pamtester: performing operation - acct_mgmt
pamtester: account management done.
pamtester: performing operation - open_session
pamtester: sucessfully opened a session
# cat /var/log/vsftpd.log
Sun Dec 24 15:39:22 2023 [pid 2] CONNECT: Client "10.0.0.144"
Sun Dec 24 15:39:22 2023 [pid 2] FTP response: Client "10.0.0.144", "220 (vsFTPd 3.0.3)"
Sun Dec 24 15:39:22 2023 [pid 2] FTP command: Client "10.0.0.144", "OPTS UTF8 ON"
Sun Dec 24 15:39:22 2023 [pid 2] FTP response: Client "10.0.0.144", "200 Always in UTF8 mode."
Sun Dec 24 15:39:27 2023 [pid 2] FTP command: Client "10.0.0.144", "USER access"
Sun Dec 24 15:39:27 2023 [pid 2] [access] FTP response: Client "10.0.0.144", "331 Please specify the password."
Sun Dec 24 15:39:29 2023 [pid 2] [access] FTP command: Client "10.0.0.144", "PASS <password>"
Sun Dec 24 15:39:29 2023 [pid 1] [access] FAIL LOGIN: Client "10.0.0.144"
Sun Dec 24 15:39:30 2023 [pid 2] [access] FTP response: Client "10.0.0.144", "530 Login incorrect."
Sun Dec 24 15:39:33 2023 [pid 2] FTP command: Client "10.0.0.144", "QUIT"
Sun Dec 24 15:39:33 2023 [pid 2] FTP response: Client "10.0.0.144", "221 Goodbye."
Sun Dec 24 15:39:34 2023 [pid 2] CONNECT: Client "10.0.0.144"
Sun Dec 24 15:39:34 2023 [pid 2] FTP response: Client "10.0.0.144", "220 (vsFTPd 3.0.3)"
Sun Dec 24 15:39:34 2023 [pid 2] FTP command: Client "10.0.0.144", "OPTS UTF8 ON"
Sun Dec 24 15:39:34 2023 [pid 2] FTP response: Client "10.0.0.144", "200 Always in UTF8 mode."
Sun Dec 24 15:39:38 2023 [pid 2] FTP command: Client "10.0.0.144", "USER myuser"
Sun Dec 24 15:39:38 2023 [pid 2] [myuser] FTP response: Client "10.0.0.144", "331 Please specify the password."
Sun Dec 24 15:39:42 2023 [pid 2] [myuser] FTP command: Client "10.0.0.144", "PASS <password>"
Sun Dec 24 15:39:42 2023 [pid 1] [myuser] FAIL LOGIN: Client "10.0.0.144"
Sun Dec 24 15:39:43 2023 [pid 2] [myuser] FTP response: Client "10.0.0.144", "530 Login incorrect."
Sun Dec 24 15:39:45 2023 [pid 2] FTP command: Client "10.0.0.144", "QUIT"
Sun Dec 24 15:39:45 2023 [pid 2] FTP response: Client "10.0.0.144", "221 Goodbye."