<?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; LDAP</title>
	<atom:link href="http://bass.bns.in.th/tag/ldap/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>Ubuntu 8.04 Hardy LDAP Client เอาไว้ทดลอง</title>
		<link>http://bass.bns.in.th/2009/12/11/ubuntu-8-04-hardy-ldap-client-%e0%b9%80%e0%b8%ad%e0%b8%b2%e0%b9%84%e0%b8%a7%e0%b9%89%e0%b8%97%e0%b8%94%e0%b8%a5%e0%b8%ad%e0%b8%87/</link>
		<comments>http://bass.bns.in.th/2009/12/11/ubuntu-8-04-hardy-ldap-client-%e0%b9%80%e0%b8%ad%e0%b8%b2%e0%b9%84%e0%b8%a7%e0%b9%89%e0%b8%97%e0%b8%94%e0%b8%a5%e0%b8%ad%e0%b8%87/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 17:50:37 +0000</pubDate>
		<dc:creator>bass</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[ldap client]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bass.bns.in.th/?p=410</guid>
		<description><![CDATA[
Ubuntu 7.10 was a nightmare when it came to setting up ldap, but 8.04 improves this process quite a bit.
We are going to set up a Hardy client on a desktop machine, which involves using NFS (for /home) and allowing all desktop users to do desktop tasks.
apt-get install libpam-ldap libnss-ldap nss-updatedb libnss-db nfs-common nscd
Answer the [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>Ubuntu 7.10 was a nightmare when it came to setting up ldap, but 8.04 improves this process quite a bit.</p>
<p>We are going to set up a Hardy client on a desktop machine, which involves using NFS (for /home) and allowing all desktop users to do desktop tasks.</p>
<p style="padding-left: 30px">apt-get install libpam-ldap libnss-ldap nss-updatedb libnss-db nfs-common nscd</p>
<p>Answer the questions; unlike Debian they should actually be put in the configuration file.</p>
<p>Make sure to transfer over your certifiate if you use SSL. I like to use /etc/ldap/ssl</p>
<p>Edit /etc/ldap.conf (which both libnss and libpam use).</p>
<p style="padding-left: 30px">host 192.168.1.1<br />
base dc=example,dc=com</p>
<p style="padding-left: 30px">#This is important! Don’t use ldap:///192.168.1.1<br />
uri ldap://example.com/<br />
ldap_version 3<br />
rootbinddn cn=admin,dc=example,dc=com<br />
port 389<br />
<strong>bind_policy soft</strong><br />
pam_password crypt<br />
<strong>ssl start_tls<br />
tls_checkpeer no<br />
</strong>tls_cacertfile /etc/ldap/ssl/cert.pem<br />
nss_initgroups_ignoreusers avahi,avahi-autoipd,backup,bin,daemon,dhcp,games,gdm,gnats,haldaemon,hplip,irc,klog,libuuid,list,lp,mail,man,messagebus,news,polkituser,proxy,pulse,root,sync,sys,syslog,uucp,www-data</p>
<p>Now edit /etc/ldap/ldap.conf</p>
<p style="padding-left: 30px">BASE    dc=example,dc=com<br />
URI    ldap://example.com<br />
TLS_CACERT /etc/ldap/ssl/cert.pem<br />
TLS_REQCERT never</p>
<p>/etc/pam.d/common-account</p>
<p style="padding-left: 30px">account    sufficient   pam_ldap.so<br />
account    required     pam_unix.so</p>
<p>/etc/pam.d/common-auth</p>
<p style="padding-left: 30px">auth       sufficient   pam_ldap.so<br />
auth       required     pam_unix.so nullok_secure use_first_pass</p>
<p>/etc/pam.d/common-password</p>
<p style="padding-left: 30px">password   sufficient   pam_ldap.so<br />
password   required     pam_unix.so nullok obscure min=4 max=8 md5</p>
<p>/etc/pam.d/common-session</p>
<p style="padding-left: 30px">session    required     pam_unix.so<br />
session    required     pam_mkhomedir.so skel=/etc/skel/<br />
session    optional     pam_ldap.so</p>
<p>/etc/nsswitch.conf</p>
<p style="padding-left: 30px">passwd: files ldap</p>
<p style="padding-left: 30px">group: files ldap</p>
<p style="padding-left: 30px">shadow: files ldap</p>
<p style="padding-left: 30px">hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4<br />
networks:       files</p>
<p>protocols:      db files<br />
services:       db files<br />
ethers:         db files<br />
rpc:            db files</p>
<p>Now we want to make sure users are assigned to the correct groups when they log in, so add the following to <strong>/etc/security/groups.conf</strong></p>
<p style="padding-left: 30px">gdm;*;*;Al0000-9000;floppy,audio,cdrom,video,plugdev,scanner</p>
<p>Hal does not recognize this, however, so <strong>delete</strong> the following entries from <strong>/etc/dbus-1/system.d/hal.conf<br />
</strong></p>
<p style="padding-left: 30px">&lt;deny send_interface=”org.freedesktop.Hal.Device.Volume”/&gt;<br />
&lt;deny send_interface=”org.freedesktop.Hal.Device.Volume.Crypto”/&gt;</p>
<p>We need to edit <strong>/etc/pam.d/gdm</strong> for the groups.conf file to take effect, so add the following</p>
<p style="padding-left: 30px">auth optional pam_group.so</p>
<p>As root, run</p>
<p style="padding-left: 30px">nss_updatedb ldap</p>
<p>To mount /home over NFS, add the following to /etc/fstab</p>
<p style="padding-left: 30px">192.168.1.1:/home       /home   nfs defaults 0 0</p>
<p><strong>Refer : </strong><a href="http://linuxadministration.us/2008/05/17/ubuntu-804-hardy-ldap-client/">http://linuxadministration.us/2008/05/17/ubuntu-804-hardy-ldap-client/</a></p>
</div>]]></content:encoded>
			<wfw:commentRss>http://bass.bns.in.th/2009/12/11/ubuntu-8-04-hardy-ldap-client-%e0%b9%80%e0%b8%ad%e0%b8%b2%e0%b9%84%e0%b8%a7%e0%b9%89%e0%b8%97%e0%b8%94%e0%b8%a5%e0%b8%ad%e0%b8%87/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quota in Ldap</title>
		<link>http://bass.bns.in.th/2009/12/10/quota-in-ldap/</link>
		<comments>http://bass.bns.in.th/2009/12/10/quota-in-ldap/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 16:41:46 +0000</pubDate>
		<dc:creator>bass</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[quota]]></category>

		<guid isPermaLink="false">http://bass.bns.in.th/?p=407</guid>
		<description><![CDATA[ใช้
&#62; id username
ดู userid ก่อน (LDAP น่าจะพอบอกออกมาได้) แล้วตั้ง quota ตาม userid เลย
ใช้
&#62; setquota -u userid   xxx yyy zzz ggg
โดยคุณ sf_alpha
http://www.thaiadmin.org/board/index.php?topic=12724.0]]></description>
			<content:encoded><![CDATA[<p>ใช้</p>
<p>&gt; id username</p>
<p>ดู userid ก่อน (LDAP น่าจะพอบอกออกมาได้) แล้วตั้ง quota ตาม userid เลย<br />
ใช้</p>
<p>&gt; setquota -u userid   xxx yyy zzz ggg</p>
<p>โดยคุณ sf_alpha</p>
<p><a href="http://www.thaiadmin.org/board/index.php?topic=12724.0">http://www.thaiadmin.org/board/index.php?topic=12724.0</a></p>]]></content:encoded>
			<wfw:commentRss>http://bass.bns.in.th/2009/12/10/quota-in-ldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
		<item>
		<title>LDAP สำหรับ การจัดการบริหารองค์กร Samba &#8230;</title>
		<link>http://bass.bns.in.th/2009/10/28/ldap-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9a%e0%b8%a3%e0%b8%b4%e0%b8%ab%e0%b8%b2%e0%b8%a3/</link>
		<comments>http://bass.bns.in.th/2009/10/28/ldap-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9a%e0%b8%a3%e0%b8%b4%e0%b8%ab%e0%b8%b2%e0%b8%a3/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 07:54:33 +0000</pubDate>
		<dc:creator>bass</dc:creator>
				<category><![CDATA[ไร้สาระ]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://bass.bns.in.th/2009/10/28/ldap-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9a%e0%b8%a3%e0%b8%b4%e0%b8%ab%e0%b8%b2%e0%b8%a3/</guid>
		<description><![CDATA[LDAP สำหรับ การจัดการบริหารองค์กร Samba + Radius + Authentication + FTP + Mail ไปได้ครบทุกอย่าง = BSoltution For Office Managment
เดียว จะมาเขียนรายละเอียดต่อ]]></description>
			<content:encoded><![CDATA[<p>LDAP สำหรับ การจัดการบริหารองค์กร Samba + Radius + Authentication + FTP + Mail ไปได้ครบทุกอย่าง = BSoltution For Office Managment<br />
เดียว จะมาเขียนรายละเอียดต่อ</p>]]></content:encoded>
			<wfw:commentRss>http://bass.bns.in.th/2009/10/28/ldap-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9a%e0%b8%a3%e0%b8%b4%e0%b8%ab%e0%b8%b2%e0%b8%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
