<?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/"
	>

<channel>
	<title>晴朗星空下的網絡</title>
	<atom:link href="http://hellosam.net/lang/zh-hk/feed" rel="self" type="application/rss+xml" />
	<link>http://hellosam.net</link>
	<description>今天天氣很好。</description>
	<pubDate>Tue, 06 Jan 2009 20:36:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>zh-hk</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WPF ListView性能陷阱</title>
		<link>http://hellosam.net/lang/zh-hk/post/766</link>
		<comments>http://hellosam.net/lang/zh-hk/post/766#comments</comments>
		<pubDate>Tue, 06 Jan 2009 20:36:47 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[部落格]]></category>

		<category><![CDATA[wpf performance programming]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=766</guid>
		<description><![CDATA[唔好意思，呢篇文無粵語版。I am using ListView/GridView to low hundred of rows of data, with 10-20 columns with assorted cell templates, and I found that the performance is unacceptable!
Hey a Centrino Pro laptop isn&#8217;t that slow, right?
After googling for a night, here are the useful tips I gathered, http://itknowledgeexchange.techtarget.com/wpf/listview-is-it-really-too-slow/,http://www.designerwpf.com/2008/02/12/listview-and-listbox-performance-issues/, http://blogs.msdn.com/jgoldb/archive/2008/03/25/quick-tips-to-improve-wpf-app-memory-footprint.aspx


Embedding the ListView inside a StackPanel
Embedding the ListView inside [...]]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/766/feed</wfw:commentRss>
		</item>
		<item>
		<title>xLanguage重大更新</title>
		<link>http://hellosam.net/lang/zh-hk/post/761</link>
		<comments>http://hellosam.net/lang/zh-hk/post/761#comments</comments>
		<pubDate>Sun, 04 Jan 2009 18:20:11 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[xLanguage (WordPress)]]></category>

		<category><![CDATA[通知]]></category>

		<category><![CDATA[friend]]></category>

		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=761</guid>
		<description><![CDATA[差不多八個月沒有更新啦。現在xLanguage 2.0終於可以把純外語文章隱藏，在Category List下、在Feed裏、即使Search也不會出現，而不是再顯示&#8221;This post is not available under&#8230;&#8221;。當然你還是可以選用以前的處理手法，而且你更可以針對每一個語言來獨立設定其特性。


話說之前也一直有計劃將這個實現，但一直抽不出時間來，反正要求的用戶也不多……在上年十二月時，有一位仁兄很認真的說很想要這個功能（雖然金額不多），但也無閑應接。正要找Huizhe看看他有否興趣把這件Case接下去的時候，那位仁兄也投進了qTranslate的懷抱。不過Huizhe還是用了數個週末的餘暇把這個東西做了出來，再為Wordpress 2.7粉飾一翻介面和Readme後，終於可以完成原本的Milestone 2計劃啦，哈哈。

]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/761/feed</wfw:commentRss>
		</item>
		<item>
		<title>二零零九年一月四日快樂</title>
		<link>http://hellosam.net/lang/zh-hk/post/753</link>
		<comments>http://hellosam.net/lang/zh-hk/post/753#comments</comments>
		<pubDate>Sat, 03 Jan 2009 17:51:25 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[部落格]]></category>

		<category><![CDATA[china]]></category>

		<category><![CDATA[christmas]]></category>

		<category><![CDATA[happynewyear]]></category>

		<category><![CDATA[japanese]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=753&amp;lang=en</guid>
		<description><![CDATA[忙得不可開交……大致記一下發生了什麼事。
大閘蟹
熱呼呼美味香甜的蟹黃真是味美。今個年度也有幸吃了三四次。不竟在上海和是內銷貨的關係價格都比較實惠。還是公的比較好吃，一來比較大隻也比較好下手，二來我不太喜歡母的硬成一團的蟹膏。
上日文課
十月多報了個日文速成班，初級到三級六個月速成，才千三個大洋，真是中途Drop off也值。重拾久違的書本和鉛筆的學生生活，每星期天花六個小時在教室裏呆著……
聖誕樹
屋苑(小區)正門的聖誕樹很高很筆直，大約有四五米左右……很筆直是因為壓根兒就是一個一個倒三角錐鐵支架，再在上面舖上閃草和條形燈飾弄成，假得可憐……
溜冰
日文學校坐落在徐匯區，就在旁邊的上海體育館有個「萬體滑冰場」。收公司內部通訊猛然想起今年度的體育運動福利還沒有動過，趁著2008年最後兩個星期日過去溜了一下下。
溜冰比想像中容易上手，大概是因為跌在冰上不會太痛所以也很放膽去跌。滾軸溜冰(輪滑/旱冰)的話跌在水泥地上很像會很痛的樣子。
共玩了幾個小時左右，感覺不錯，起碼現在可以自主的停下來。
OLPC
「OL的電腦」……我指「每童一電腦」G1G1(買一送一，送是送給四川的受災兒童)活動正式於較早前吹到香港，正在想要不要弄一部。
工作上
都很忙呢……
小姑娘深圳遇匪轉載
故事是一位姑娘在深圳遇上黑車，下車時並載著行李箱揚車而去。從四出查訪公安局和物業去調出Webcam錄像，最後起回部份失物，並見證的士(出租車)公司的上下一條心的黑心作業，公安機關的無能。
黑心作業、政府腐敗的事屢見不少，有幾點我覺得很在意的是-

全市還真的裝了這麼多攝像頭，好像是一條街最少也會有幾個的樣子。
而且在分局也可以興鬆實時回放之前的片子。後台究竟存有多少小時的錄影？
不就是比英國倫敦的還是強嗎……想不到中國還真的很先進……某方面。
若然有好的攝像頭佈置地圖(文中所說顯然沒有)，大概也能一直追蹤著車子直到有一個攝像頭可以拍得到清析影像為止。
還有所有的士都有GPS+GPRS/EDGE追蹤呢……

最後謹祝各位二零零九年一月四日快樂！
]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/753/feed</wfw:commentRss>
		</item>
		<item>
		<title>美國大選才剛過去，就談到2012 Polling Statistics?</title>
		<link>http://hellosam.net/lang/zh-hk/post/745</link>
		<comments>http://hellosam.net/lang/zh-hk/post/745#comments</comments>
		<pubDate>Thu, 06 Nov 2008 16:06:25 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[部落格]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=745&amp;lang=zh</guid>
		<description><![CDATA[XKCD 惡攪了一則漫畫：是關於大選結束，還是不習慣沒有選舉新聞的日子，從而走上google搜 &#8220;2012 Polling Statistics&#8221; (2012選舉調查).
現在查2012 polling statistics都彈出了一堆無相關的東西，故且看看 http://2012pollingstatistics.com/ 什麼時候才會在google上出現吧……



]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/745/feed</wfw:commentRss>
		</item>
		<item>
		<title>向上海學習如何開旅遊巴</title>
		<link>http://hellosam.net/lang/zh-hk/post/742</link>
		<comments>http://hellosam.net/lang/zh-hk/post/742#comments</comments>
		<pubDate>Wed, 05 Nov 2008 08:57:07 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[部落格]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=742&amp;lang=zh</guid>
		<description><![CDATA[唔好意思，呢篇文無粵語版。Driving Culture of Shanghai (Nighttime)
Driving Culture of Shanghai (Daytime)
Be sure you click the &#8220;Watch in High Quality&#8221; link on the Youtube page, under the flash player box.
]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/742/feed</wfw:commentRss>
		</item>
		<item>
		<title>一台Linux頂多個SOHO路由器 (iptables, iproute2, netfilter)</title>
		<link>http://hellosam.net/lang/zh-hk/post/730</link>
		<comments>http://hellosam.net/lang/zh-hk/post/730#comments</comments>
		<pubDate>Sat, 18 Oct 2008 15:55:33 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[專題創作]]></category>

		<category><![CDATA[部落格]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[networking]]></category>

		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=730&amp;lang=en</guid>
		<description><![CDATA[一台Linux代替一個SOHO路由器很容易，大致可以用6句command概括

dhclient3 &#8230; $WANIF # Get the IP on WAN side
ip addr add 192.168.0.0/24 broadcast + dev $LANIF  # Get the IP on LAN side
dhcpd3 &#8230; $LANIF # Enable the DHCPD on LAN side
sys.net.ipv4.ip_forward = 1 # Enable forwarding
iptables -t nat -A POSTROUTING -o $WANIF -j MASQUERADE # Enable SNAT
dnsmasq # Enable DNS proxy
目的：一台Linux代替N個SOHO路由器。即是說一台能夠建立多個獨立NAT，大家都用看似同似同一樣但實際不一樣的私有IP網址地段。


始終1台用5個command不代表2台只需10個command，主要問題有七：


WAN Interface要拿很多個WAN [...]]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/730/feed</wfw:commentRss>
		</item>
		<item>
		<title>架設Linux/Apache Single Sign On (Active Directory, mod_auth_kerb, Kerberos)</title>
		<link>http://hellosam.net/lang/zh-hk/post/704</link>
		<comments>http://hellosam.net/lang/zh-hk/post/704#comments</comments>
		<pubDate>Mon, 13 Oct 2008 17:32:06 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[GPS記錄器]]></category>

		<category><![CDATA[UsbAvrUsb]]></category>

		<category><![CDATA[專題創作]]></category>

		<category><![CDATA[部落格]]></category>

		<category><![CDATA[kerberos]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[sso]]></category>

		<category><![CDATA[tech]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=704&amp;lang=en</guid>
		<description><![CDATA[目的：在Windows Domain(網域)內的Intranet(內聯網)使用者，用IE或Firefox瀏覽到這個架設在Linux/Apache的Website，無需再輸入密碼即可自動登入，達成SSO - Single Sign On。其中Linux需Join Domain並擁有該Domain下的Computer Account(電腦帳號)。
非目的：能用網域帳號登入Linux系統、認証之後的權限處理。


引言


若目標只是想認証網域內的Credential(一組使用者名稱和密碼)，方法有很多。其中我先試過KB555092的就是其中一個方法，但這個基本上就是將Credential以Cleartext(純文字)傳過去，Web Server(網站伺服器)再直接拿著純文字版本向Domain Controller質問是否對的，如果用IE瀏覽過去，會清清楚楚看到相關警告，也不肯做SSO。對Client side(客戶端)來說，一來不安全，二來即使有SSL，也就是把密碼一乾二淨的拱手相讓給Web Server，所以KB555092實在沒有什麼用。我相如LDAP等也能做到相似效果。
KB555092當中關鍵是KrbMethodNegotiate是Off的，所以就不容許SSO的發生。但是並不是把它變成On就可以，後台還是有一大堆東西要幹的。



話說回來，我的環境是：


原理

簡單來說……

當Client訪問到可使用Kerberos作驗証Server的時候，就先將從KDC (Key Distribution Center，多數也是由管Active Directory的Server負責)，拿一個以目標Server的Principal的Private Key(私鑰)加密的一個Ticket。之後Client會將這個Ticket傳過去該Server，該Server通過成功解密，也就能驗證到Client的身份。
因為KDC認識所有的人和物，也有所有人物的Secret，這樣就解決也Credential也流給Web Server的問題，其他設計細則也使得Server和Client可以互相信任。


攻略

假設設定


Active Directory Full Qualified Domain Name (FQDN)
work.example.com
NETBIOS Short Domain Name
WORK
Linux box Hostname
penguin
&#8230;and hence the Linux FQDN will be
penguin.work.example.com
User that has rights to join computer to domain
jsmith

詳細步驟

大前提是Linux的IP是DHCP進來的，最少DNS是用上Domain Controller的一個。
以下步驟都是以root進行。



用aptitude將samba, apache2和mod-auth-kerb都裝上

修改/etc/krb5.conf 
[libdefaults]
        default_realm = WORK.EXAMPLE.COM
        default_keytab_name = FILE:/etc/krb5.keytab

由於正常的Active Directory setup，DNS已經載有KDC的相關數據，而dns_lookup_kdc默認是啟用的，所以整個[realm]的部份以及其他部份都可以刪除。
注意realm必需為大寫。
若然真的很想填寫[realm]部分的話，又不知到KDC的地址(大概因為公司大，AD Controller多的是)，可以用&#8221;dig [...]]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/704/feed</wfw:commentRss>
		</item>
		<item>
		<title>What does it mean to have only 3.4ohm between 12V and GND&#8230;</title>
		<link>http://hellosam.net/lang/zh-hk/post/700</link>
		<comments>http://hellosam.net/lang/zh-hk/post/700#comments</comments>
		<pubDate>Wed, 08 Oct 2008 13:50:55 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[部落格]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=700&amp;lang=en</guid>
		<description><![CDATA[唔好意思，呢篇文無粵語版。like this?&#8230;

It means the harddrive is dead.

]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/700/feed</wfw:commentRss>
		</item>
		<item>
		<title>Windows Vista中文輸入法更新</title>
		<link>http://hellosam.net/lang/zh-hk/post/697</link>
		<comments>http://hellosam.net/lang/zh-hk/post/697#comments</comments>
		<pubDate>Wed, 08 Oct 2008 02:47:53 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[部落格]]></category>

		<category><![CDATA[array]]></category>

		<category><![CDATA[ime]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=697&amp;lang=zh-hk</guid>
		<description><![CDATA[

]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/697/feed</wfw:commentRss>
		</item>
		<item>
		<title>(不太)窮人版Joystick</title>
		<link>http://hellosam.net/lang/zh-hk/post/684</link>
		<comments>http://hellosam.net/lang/zh-hk/post/684#comments</comments>
		<pubDate>Mon, 22 Sep 2008 16:10:54 +0000</pubDate>
		<dc:creator>HelloSam</dc:creator>
		
		<category><![CDATA[部落格]]></category>

		<category><![CDATA[flightsim]]></category>

		<category><![CDATA[game]]></category>

		<category><![CDATA[hardware]]></category>

		<category><![CDATA[joystick]]></category>

		<category><![CDATA[play]]></category>

		<guid isPermaLink="false">http://hellosam.net/?p=684&amp;lang=en</guid>
		<description><![CDATA[























]]></description>
		<wfw:commentRss>http://hellosam.net/lang/zh-hk/post/684/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
