Configure VSFTPD uses LDAP for authentication

เป็นที่ทราบกันดีว่า vsftpd คือ ftp server ที่มีมากับ Linux หลายๆค่ายเหตุเพราะมีความเสถียร, รวดเร็ว และ ปลอดภัย ดังนั้นจึงมีผู้นิยมนำมาใช้เป็น ftp server กันอย่างแพร่หลาย vsftpd ตัวนี้โดยทั่วไปแล้วจะ support การ authentication กับ user ระบบ แต่ในบทความนี้จะกล่าวถึงวิธีการที่จะทำให้ vsftpd สามารถที่จะ authenticate ผ่าน LDAP server.

การแก้ไขค่า configure ที่จะทำให้ vsftpd ตัวนี้สามารทำการ authenticate กับ LDAP ได้จะต้องมีตัวกลางในการ authenticate และพระเอกของเราก็คือ PAM หรือ Pluggable Authentication Modules นั้นเอง

วิธีการ Configure จะแก้ไขที่ไฟล์เดียวนั้นก็คือไฟล์ /etc/pam.d/vsftpd โดยใช้คำสั่ง

#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

เมื่อทำการแก้ไขเสร็จเรียบร้อยแล้ว ก็ restart service โดยใช้คำสั่ง

#service vsftpd restart

Related posts:

  1. Telnet as the root user โดยทั่วไป Linux ไม่เปิดการใช้งาน telnet service กันเนื่องจากปัญหาด้านความปลอดภัยของการใช้งาน แต่ถ้าเราต้องการจะใช้งาน telnet...
  2. Lock user after a set number of login attempts but also automatically unlock after 5 minutes หากต้องการให้ระบบทำการ lock user ที่จะพยายามเข้าสู่ระบบเกินกว่าจำนวนครั้งที่เรากำหนด แต่ไม่รู้จะสามารถทำได้อย่างไร ในบทความนี้มีคำตอบให้กับปัญหานี้ครับ ใน Pluggable...
  3. Set passwords policy against a dictionary ระบบปฏิบัติการ Linux ได้มี module หนึ่งที่ใช้ในการ configure เกี่ยวกับ password...
  4. How to configure Active Directory authentication with Apache web server การ authen ผ่าน Active directory หรือ LDAP เป็นทางเลือกที่สะดวกสบายและง่ายต่อการบริหารจัดการกับผู้ใช้งานภายในองค์กรณ์...
  5. How to Configure Service Dependency in Red Hat Cluster Suite Red Hat Cluster แบบ Fail-Over ได้มี features หนึ่งที่น่าสนใจมาก...

You can leave a response, or trackback from your own site.

Leave a Reply