I'm trying to authenticate vsftpd on an Ubuntu server against my Active directory server. I have joined the domain successfully following this article: https://nerdonthestreet.com/wiki?find=Authenticate+Ubuntu+19.04+against+Active+Directory I can login normally to the linux system. I then installed vsftpd on my Ubuntu 20. Now I can access the FTP server normally using the local users, but when using AD users I get an error: "530 Login incorrect.". Below I will add my vsftpd, pam and sssd conf, any help would be highly appreciated guys.
vsftpd.conf:
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=0022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
allow_writeable_chroot=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
Here are the SSD conf:
[sssd]
services = nss, pam
config_file_version = 2
domains = server.local
[nss]
entry_negative_timeout = 0
#debug_level = 5
[pam]
#debug_level = 5
[domain/server.local]
#debug_level = 10
enumerate = false
id_provider = ad
auth_provider = ad
chpass_provider = ad
access_provider = ad
dyndns_update = false
ad_hostname = client1.server.local
ad_server = dc02.server.local
ad_domain = server.local
ldap_schema = ad
ldap_id_mapping = true
fallback_homedir = /home/%u
default_shell = /bin/bash
ldap_sasl_mech = gssapi
ldap_sasl_authid = CLIENT1$
krb5_keytab = /etc/sssd/my-keytab.keytab
ldap_krb5_init_creds = true
Here are the pam common-session conf:
session [default=1] pam_permit.so
session requisite pam_deny.so
session required pam_permit.so
session optional pam_umask.so
session required pam_unix.so
session required pam_mkhomedir.so skel=/etc/skel/ umask=0022
session optional pam_sss.so
session optional pam_systemd.so
# end of pam-auth-update config
vsftpd Pam conf:
# Standard behaviour for ftpd(8).
auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
# Note: vsftpd handles anonymous logins on its own. Do not enable pam_ftp.so.
# Standard pam includes
@include common-account
@include common-session
@include common-auth
auth required pam_shells.so
Thanks for taking the time in reading this.