FTP

Configure VSFTPD uses LDAP for authentication

vsftpd is a well-known FTP server included with many Linux distributions because it is stable, fast, and secure. It is widely used as an FTP server. Normally, it authenticates system users, but this article explains how to authenticate through an LDAP server.

To configure vsftpd to authenticate with LDAP, we need an authentication intermediary: PAM, or Pluggable Authentication Modules.

Only one configuration file needs changing: /etc/pam.d/vsftpd. Use:

#vi /etc/pam.d/vsftpdจากนั้นทำการแก้ไขให้ค่าต่างๆเหมือนกับค่าด้านล่างนี้

#%PAM-1.0

#auth       required    pam_listfile.so item=user sense=deny
                        file=/etc/vsftpd.ftpusers onerr=succeed

#auth       required    pam_stack.so service=system-auth

#auth       required    pam_shells.so

#account    required    pam_stack.so service=system-auth

#session    required    pam_stack.so service=system-auth

#auth       sufficient   /lib/security/$ISA/pam_ldap.so

auth       required     /lib/security/$ISA/pam_unix.so

account    sufficient   /lib/security/$ISA/pam_ldap.so

account    required     /lib/security/$ISA/pam_unix.so

password   sufficient   /lib/security/$ISA/pam_ldap.so

password   required     /lib/security/$ISA/pam_unix.so

After editing, restart the service with:

#service vsftpd restart
EOF.← Back to articles