<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bass &#039;s Blog (เขียน Blog แบบ บ่นๆ ตามฉบับ นายเบส) &#187; vsftpd</title>
	<atom:link href="http://bass.bns.in.th/tag/vsftpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://bass.bns.in.th</link>
	<description>ที่เขียนเรื่องบ้าๆ บ่อๆ กับความรู้ ของนายเบส ($BASS = &#34;Bass&#34;; print &#34;$BASS = 9Bass&#34;;) ปล. สถาที่นี้เป็นที่ส่วนบุคคล โปรดใช้วิจรญาณในการรับชมด้วยครับ</description>
	<lastBuildDate>Wed, 10 Mar 2010 00:40:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>VSFTP + Ldap Config</title>
		<link>http://bass.bns.in.th/2009/12/10/vsftp-ldap-config/</link>
		<comments>http://bass.bns.in.th/2009/12/10/vsftp-ldap-config/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 16:39:01 +0000</pubDate>
		<dc:creator>bass</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://bass.bns.in.th/?p=405</guid>
		<description><![CDATA[เป็นที่ทราบกันดีว่า 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    [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 0px;margin-right: 0px;margin-bottom: 12px;margin-left: 0px;color: #333333;font-size: 12px;line-height: 18px;padding: 0px">เป็นที่ทราบกันดีว่า vsftpd คือ ftp server ที่มีมากับ Linux หลายๆค่ายเหตุเพราะมีความเสถียร, รวดเร็ว และ ปลอดภัย ดังนั้นจึงมีผู้นิยมนำมาใช้เป็น ftp server กันอย่างแพร่หลาย vsftpd ตัวนี้โดยทั่วไปแล้วจะ support การ authentication กับ user ระบบ แต่ในบทความนี้จะกล่าวถึงวิธีการที่จะทำให้ vsftpd สามารถที่จะ authenticate ผ่าน LDAP server.</p>
<p style="margin-top: 0px;margin-right: 0px;margin-bottom: 12px;margin-left: 0px;color: #333333;font-size: 12px;line-height: 18px;padding: 0px">การแก้ไขค่า configure ที่จะทำให้ vsftpd ตัวนี้สามารทำการ authenticate กับ LDAP ได้จะต้องมีตัวกลางในการ authenticate และพระเอกของเราก็คือ PAM หรือ Pluggable Authentication Modules นั้นเอง</p>
<p style="margin-top: 0px;margin-right: 0px;margin-bottom: 12px;margin-left: 0px;color: #333333;font-size: 12px;line-height: 18px;padding: 0px"><span> </span></p>
<p style="margin-top: 0px;margin-right: 0px;margin-bottom: 12px;margin-left: 0px;color: #333333;font-size: 12px;line-height: 18px;padding: 0px">วิธีการ Configure จะแก้ไขที่ไฟล์เดียวนั้นก็คือไฟล์ /etc/pam.d/vsftpd โดยใช้คำสั่ง</p>
<pre style="padding: 0px;margin: 0px">#vi /etc/pam.d/vsftpdจากนั้นทำการแก้ไขให้ค่าต่างๆเหมือนกับค่าด้านล่างนี้

#%PAM-1.0

#auth       required    pam_listfile.so item=user sense=deny</pre>
<pre style="padding: 0px;margin: 0px">                        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</pre>
<p style="margin-top: 0px;margin-right: 0px;margin-bottom: 12px;margin-left: 0px;color: #333333;font-size: 12px;line-height: 18px;padding: 0px">เมื่อทำการแก้ไขเสร็จเรียบร้อยแล้ว ก็ restart service โดยใช้คำสั่ง</p>
<pre style="padding: 0px;margin: 0px">#service vsftpd restart</pre>
<pre style="padding: 0px;margin: 0px"></pre>
<pre style="padding: 0px;margin: 0px">ที่มา <a href="http://www.ezylinux.com/ftp/configure-vsftpd-uses-ldap-for-authentication/">http://www.ezylinux.com/ftp/configure-vsftpd-uses-ldap-for-authentication/</a></pre>]]></content:encoded>
			<wfw:commentRss>http://bass.bns.in.th/2009/12/10/vsftp-ldap-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
