<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>Dryice Liu's Blog</title>
	<link>http://dryice.name/blog</link>
	<description></description>
	<pubDate>Tue, 31 Aug 2010 12:01:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>I&#8217;m still alive, so does this blog</title>
		<link>http://dryice.name/blog/freebsd/im-still-alive-so-does-this-blog/</link>
		<comments>http://dryice.name/blog/freebsd/im-still-alive-so-does-this-blog/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:01:11 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[misc]]></category>

		<category><![CDATA[freebsd]]></category>
<category>blog</category><category>freebsd</category>
		<guid isPermaLink="false">http://dryice.name/blog/freebsd/im-still-alive-so-does-this-blog/</guid>
		<description><![CDATA[I just realized that it has been nearly 2 years that I haven&#8217;t wrote anything on my blog. So just an announcement that I&#8217;m still alive  And so does this blog.
Thanks to everyone that come to visit or even leave a comment. It&#8217;s really good to know someone is still visiting my small space.
The [...]]]></description>
			<content:encoded><![CDATA[<p>I just realized that it has been nearly 2 years that I haven&#8217;t wrote anything on my blog. So just an announcement that I&#8217;m still alive <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> And so does this blog.</p>
<p>Thanks to everyone that come to visit or even leave a comment. It&#8217;s really good to know someone is still visiting my small space.</p>
<p>The reason I stopped writing blog is because I&#8217;ve get involved in a really really big project, and got quite busy. The project is still not finished, but is in a good shape. I think I&#8217;ll get sometime to update this blog.</p>
<p>The reason I came to visit my own blog is because I was looking for an <a href="http://dryice.name/blog/freebsd/using-a-ram-disk-as-tmp-on-freebsd/"> old article </a>. And the reason I looked for that old article is because I&#8217;ve got myself a new PC. With the summer getting hotter and hotter, my old AMD3000+ machine halts several times a day. I know switching to a bigger fan might help, but, well, it is getting slow and the halting is an good excuse for a new one <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So I go get myself an I5-750 machine, with 4G RAM. It&#8217;s much faster than the old one. It is so fast that a buildworld in a FreeBSD on FreeBSD virtualbox client is faster than the real 3000+ machine. I also got myself a Dell 2410 and setup a two-monitor desktop. Finally I can have two 1024&#215;1200 window sitting side by side, it looks really nice <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So much for the news. I&#8217;ll get back and update my blog because again, I found it&#8217;s a good for future work if I wrote the tips down.</p>
<p>Enjoy the life and live with passion.</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=874&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_874" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/freebsd/im-still-alive-so-does-this-blog/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Toys</title>
		<link>http://dryice.name/blog/blackberry/new-toys/</link>
		<comments>http://dryice.name/blog/blackberry/new-toys/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 13:17:15 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[n810]]></category>

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

		<guid isPermaLink="false">http://dryice.name/blog/blackberry/new-toys/</guid>
		<description><![CDATA[Well I&#8217;ve got these toys for some time, but I was pretty busy these days. So here are them all:
- Blackberry 8300. After 7 years, my Simense 3568i stops working. I was planning to get some simple mobile with bluetooth and EDGE, to get the N810 online when there&#8217;s no WIFI available, because right now [...]]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;ve got these toys for some time, but I was pretty busy these days. So here are them all:</p>
<p>- Blackberry 8300. After 7 years, my Simense 3568i stops working. I was planning to get some simple mobile with bluetooth and EDGE, to get the N810 online when there&#8217;s no WIFI available, because right now EDGE is the most reliable data link I can get, and in the near future I might switch one of WCDMA, CDMA2000, or TDSCDMA for 3G data link. But well, an oppotunity pops up and I get this fancy mobile. And I got nothing to complain: The screen is good, the keyboard is good, and I might finally get a chance to write some Java code <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>- Nokia N810. This is the key of my new toys. Because I&#8217;m maitaining some servers, both Windows and *nix, I need a way to access them when I&#8217;m not in front of my workstation. And ofcause I don&#8217;t want to bring a laptop with me while shopping <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> And IMO, to really do some work, especially on remote Windows machines, I&#8217;ll need a 640*480 screen resolution at least. There are a few mobile with this resolution but they are too expensive to me, especially when I&#8217;m planning to change to a new phone in the near future. The keyboard is not as good as the BlackBerry but the screen is really good. And with OpenSSH and Rdesktop, I can leave my laptop at home if I travel within 3 days.</p>
<p>- Dell Inspiron 1525. This is a replacement of my 7 year-old Inspiron 4100. This is pretty the low end of the 15&#8242; laptop line, because I have a desktop machine at home and I&#8217;ll only bring it with me when I travel more than 3 days, which is very rare. Now the primary usage of it is to sitting in the living room so my wife could watch some movie while I&#8217;m working at the desktop <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=873&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_873" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/blackberry/new-toys/feed/</wfw:commentRss>
		</item>
		<item>
		<title>mysql tip: finding duplicated records</title>
		<link>http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/</link>
		<comments>http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 02:43:00 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[postgresql]]></category>

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

		<guid isPermaLink="false">http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/</guid>
		<description><![CDATA[Found here: http://mysql-tips.blogspot.com/2005/04/mysql-find-duplicate-repords-example.html
select address, count(address) as cnt
from mailing_list
group by address
having cnt &#62; 1
order by cnt;

Share This
]]></description>
			<content:encoded><![CDATA[<p>Found here: http://mysql-tips.blogspot.com/2005/04/mysql-find-duplicate-repords-example.html</p>
<p>select address, count(address) as cnt<br />
from mailing_list<br />
group by address<br />
having cnt &gt; 1<br />
order by cnt;</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=872&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_872" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/misc/mysql-tip-finding-duplicated-records/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Learning VIM</title>
		<link>http://dryice.name/blog/emacs/learning-vim/</link>
		<comments>http://dryice.name/blog/emacs/learning-vim/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 09:40:16 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://dryice.name/blog/emacs/learning-vim/</guid>
		<description><![CDATA[Well I&#8217;m still an Emacs user  
The problem is, my Emacs configuration is too complicated and depending on a lot of external tools. It is not easy to get all the things running when you come to a new machine. And Emacs is not on every machine, especially when I was on other people&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;m still an Emacs user <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The problem is, my Emacs configuration is too complicated and depending on a lot of external tools. It is not easy to get all the things running when you come to a new machine. And Emacs is not on every machine, especially when I was on other people&#8217;s machines.</p>
<p>So I decided to make up a light weight vim configuration, so I can use it quickly everywhere.  Here&#8217;s a list of the plugins I choose: taglist,  pydoc, code_complete, matchit, and SearchComplete.</p>
<p>And I think  zsh is not available everywhere too so I&#8217;ll need some setup for bash.</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=871&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_871" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/emacs/learning-vim/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hacking the Microsoft Natural Ergonomic Keyboard 4000 (on Windows)</title>
		<link>http://dryice.name/blog/misc/hacking-the-microsoft-natural-ergonomic-keyboard-4000-on-windows/</link>
		<comments>http://dryice.name/blog/misc/hacking-the-microsoft-natural-ergonomic-keyboard-4000-on-windows/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 04:25:32 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://dryice.name/blog/misc/hacking-the-microsoft-natural-ergonomic-keyboard-4000-on-windows/</guid>
		<description><![CDATA[Since my primary desktop (running FreeBSD, of cause) got some hardware problems two weeks ago, I have to use Windows for a while. And I begin to think using the extra keys of this keyboard.
The functions all works good after installing the driver. However the zoom button in the middle of the keyboard is&#8230; useless. [...]]]></description>
			<content:encoded><![CDATA[<p>Since my primary desktop (running FreeBSD, of cause) got some hardware problems two weeks ago, I have to use Windows for a while. And I begin to think using the extra keys of this keyboard.</p>
<p>The functions all works good after installing the driver. However the zoom button in the middle of the keyboard is&#8230; useless. I would rather use it for scroll. So I Googled around and looks I&#8217;m not alone <img src='http://dryice.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Olivier Dagenais has posted two good articles: <a href="http://www.hiddenbrowse.info/index.php?hl=f5&amp;q=uggc%253A%252F%252Fbyvvfpbby.oybtfcbg.pbz%252F2006%252F09%252Funpxvat-zvpebfbsg-angheny-retbabzvp.ugzy" title="Hacking the Microsoft Natural Ergonomic Keyboard 4000 ">Hacking the Microsoft Natural Ergonomic Keyboard 4000</a> and <a href="http://www.hiddenbrowse.info/index.php?hl=f5&amp;q=uggc%253A%252F%252Fbyvvfpbby.oybtfcbg.pbz%252F2006%252F11%252Funpxvat-zvpebfbsg-angheny-retbabzvp.ugzy" title="Hacking the Microsoft Natural Ergonomic Keyboard 4000, redux">Hacking the Microsoft Natural Ergonomic Keyboard 4000, redux</a>.To me, it&#8217;s quite simple: just open the C:\Program Files\Microsoft IntelliType Pro\commands.xml file, and search for &#8220;zoom&#8221;. Pay attention to the &#8220;app name&#8221; it is in, and change those you want from &#8220;ZoomIn&#8221; to &#8220;ScrollUp&#8221;, and from &#8220;ZoomOut&#8221; to &#8220;ScrollDown&#8221;. Then kill the &#8220;itype.exe&#8221; process, and click the &#8220;microsoft keyboard&#8221; shortcut on the desktop to restart it again.</p>
<p>Everything works smoothly. I didn&#8217;t notice an acceleration for the scroll though. I&#8217;m using the 6.20.148.0 driver, which is the latest as the time of writing.</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=870&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_870" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/misc/hacking-the-microsoft-natural-ergonomic-keyboard-4000-on-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using FreeBSD as a network bridge and use dummynet to shape the traffic</title>
		<link>http://dryice.name/blog/freebsd/using-freebsd-as-a-network-bridge-and-use-dummynet-to-shape-the-traffic/</link>
		<comments>http://dryice.name/blog/freebsd/using-freebsd-as-a-network-bridge-and-use-dummynet-to-shape-the-traffic/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 12:02:00 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[freebsd]]></category>

		<guid isPermaLink="false">http://dryice.name/blog/uncategorized/using-freebsd-as-a-network-bridge-and-use-dummynet-to-shape-the-traffic/</guid>
		<description><![CDATA[Here&#8217;s a quick note/tutorial about how to setup FreeBSD 7.0 as a network bridge and use dummynet to shape the traffic, There is a pretty good tutorial  on the net but I found it&#8217;s rather outdated. So here is mine.
First of all we&#8217;ll need to setup FreeBSD as a network bridge.
ifconfig bridge create
This should [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick note/tutorial about how to setup FreeBSD 7.0 as a network bridge and use dummynet to shape the traffic, There is <a href="http://www.scalabledesign.com/articles/dummynet.html" aiotitle="a pretty good tutorial" target="_blank">a pretty good tutorial</a>  on the net but I found it&#8217;s rather outdated. So here is mine.</p>
<p>First of all we&#8217;ll need to setup FreeBSD as a network bridge.</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ifconfig bridge create</div>
<p>This should return &#8220;bridge0&#8243; if this is the first bridge you created.</p>
<p>And we&#8217;ll add the two interface used on the bridge. It&#8217;s &#8220;rl0&#8243; and &#8220;vr0&#8243; in my case:</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ifconfig bridge0 addm rl0 addm vr0 up</div>
<p>Now bring the bridge up. Note the two interface need to be up too.</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ifconfig rl0 up<br />
ifconfig vr0 up<br />
ifconfig bridge0 up</div>
<p>If you want an IP address of the box, assign it to the bridge</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ifconfig bridge0 inet <span style="color: #000000;">192.168</span><span style="color: #000000;">.2</span><span style="color: #000000;">.9</span> netmask <span style="color: #000000;">255.255</span><span style="color: #000000;">.255</span><span style="color: #000000;">.0</span></div>
<p>Now the bridge should work. To make dummynet work, we&#8217;ll need to recompile the kernel:<br />
add</p>
<div style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">options IPFIREWALL<br />
options IPFIREWALL_DEFAULT_TO_ACCEPT<br />
options DUMMYNET<br />
options HZ=1000</div>
<p>to the kernel config file and rebuild it. Then add</p>
<div style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">firewall_enable=&quot;YES&quot;<br />
firewall_type=&quot;open&quot;</div>
<p>to /etc/rc.conf.</p>
<p>Make sure you have <strong>filewall_type=&#8221;open&#8221;</strong> in /etc/rc.conf and/or <strong>options IPFIREWALL_DEFAULT_TO_ACCEPT</strong> in your kernel config file before you do the reboot if you are doing this remotely. Or you&#8217;ll block yourself out.</p>
<p>Now enable ifpw on the bridge</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">sysctl net.<span style="color: #c20cb9; font-weight: bold;">link</span>.bridge.<span style="color: #007800;">ipfw=</span><span style="color: #000000;">1</span></div>
<p>OK, we can now add a pipe:</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ipfw <span style="color: #000000;">1000</span> add pipe <span style="color: #000000;">1</span> ip from any to any bridged</div>
<p>Note the &#8220;1000&#8243; in the command line. Do a</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ifpw list</div>
<p>first and choose a good place for the pipe.</p>
<p>Now it&#8217;s time to shape the traffic. To add some delay:</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ipfw pipe <span style="color: #000000;">1</span> config delay 5ms</div>
<p>or add some package lost:</p>
<div class="bash" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">ipfw pipe <span style="color: #000000;">1</span> config plr <span style="color: #000000;">0.1</span></div>
<p>Reference:</p>
<p><a href="http://www.scalabledesign.com/articles/dummynet.html">A nice tutorial</a></p>
<p><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bridging.html" aiotitle="The FreeBSD hand book about bridging" target="_blank">The FreeBSD hand book about bridging </a></p>
<p><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls-ipfw.html" aiotitle="The FreeBSD hand book about IPFW">The FreeBSD hand book about IPFW </a></p>
<p><a href="http://www.freebsd.org/cgi/man.cgi?query=dummynet&amp;sektion=4">dummynet(4) </a></p>
<p><a href="http://www.freebsd.org/cgi/man.cgi?query=ipfw&amp;sektion=8&amp;apropos=0&amp;manpath=FreeBSD+7.0-RELEASE">ipfw(8)</a></p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=869&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_869" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/freebsd/using-freebsd-as-a-network-bridge-and-use-dummynet-to-shape-the-traffic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Never think your password is complicated enough</title>
		<link>http://dryice.name/blog/freebsd/never-think-your-password-is-complicated-enough/</link>
		<comments>http://dryice.name/blog/freebsd/never-think-your-password-is-complicated-enough/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 07:57:12 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[freebsd]]></category>

		<guid isPermaLink="false">http://dryice.name/blog/freebsd/never-think-your-password-is-complicated-enough/</guid>
		<description><![CDATA[Last week I was asked to help a friend to check out his server that has been hacked. First I was thinking some kind of PHP leak or SQL injection. But I was wrong. The crack uses some kind of SSH user/password scanner and got his root password.
I find this out because the cracker created [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I was asked to help a friend to check out his server that has been hacked. First I was thinking some kind of PHP leak or SQL injection. But I was wrong. The crack uses some kind of SSH user/password scanner and got his root password.</p>
<p>I find this out because the cracker created a new user on his server, and runs the password scanner on his server to gain access to more servers.</p>
<p>The cracker deleted the C source code of the scanner, but left some shell scrip running. And here is how it works: The scanner got a pretty large username/password match database, and the scanner will run through this database against all the computers online. Pretty simple, hmmm? And with some simple tricks, like scan those machines has SSH connection with the current machine, it get pretty efficient.</p>
<p>The thing scares me most is that they&#8217;ve got a really large database. Not only the usual words in dictionary or simply phases like &#8220;letmein&#8221;, I saw things like &#8220;mima&#8221; which is the Chinese pronunciation of &#8220;password&#8221;. There are also some password that I think from other langnuages.</p>
<p>And my friend confirmed his sys admin used to use some really simple password. So, use SSH2 key auth whenever you got a chance, and when you have to use a password, nomatter on SSH or not, never think your password is complicated enough.</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=868&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_868" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/freebsd/never-think-your-password-is-complicated-enough/feed/</wfw:commentRss>
		</item>
		<item>
		<title>running windows remote desktop client from the windows command line</title>
		<link>http://dryice.name/blog/misc/running-windows-remote-desktop-client-from-the-windows-command-line/</link>
		<comments>http://dryice.name/blog/misc/running-windows-remote-desktop-client-from-the-windows-command-line/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 09:37:09 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://dryice.name/blog/misc/running-windows-remote-desktop-client-from-the-windows-command-line/</guid>
		<description><![CDATA[I&#8217;m using rdesktop on FreeBSD to connect to windows servers when I&#8217;m at my desktop. However recently I&#8217;m in another city and don&#8217;t have access to my usual desktop. I have to use public PCs in Internet Cafe to access the internet. However in this Cafe I&#8217;m in, they blocked most of the windows start [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using rdesktop on FreeBSD to connect to windows servers when I&#8217;m at my desktop. However recently I&#8217;m in another city and don&#8217;t have access to my usual desktop. I have to use public PCs in Internet Cafe to access the internet. However in this Cafe I&#8217;m in, they blocked most of the windows start up menu, and I have to connect to the servers from the command line.</p>
<p>So in short, I can use the &#8220;mstsc&#8221; command to bring up windows remote desktop connection. The command itself will give the usual remote desktop connection dialog. And I can also use some command line parameters to speed this up:</p>
<div class="php" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">mstsc /v: the.ip.of.server &nbsp;/w: width /h: height</div>
<p>This is pretty handful if you can&#8217;t access the windows start up menu as me.</p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=867&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_867" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/misc/running-windows-remote-desktop-client-from-the-windows-command-line/feed/</wfw:commentRss>
		</item>
		<item>
		<title>File based virtual user settings for Vsftpd on FreeBSD</title>
		<link>http://dryice.name/blog/freebsd/file-based-virtual-user-settings-for-vsftpd-on-freebsd/</link>
		<comments>http://dryice.name/blog/freebsd/file-based-virtual-user-settings-for-vsftpd-on-freebsd/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 12:00:17 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[freebsd]]></category>

		<guid isPermaLink="false">http://dryice.name/blog/freebsd/file-based-virtual-user-settings-for-vsftpd-on-freebsd/</guid>
		<description><![CDATA[I&#8217;ve done this before with the help of a very good blog entry. But when I tried to do the same thing today I can&#8217;t find that page. So I decide to write this down, in case I&#8217;ll need it later.
The most problem of setting up Vsftpd with file based virtual user on FreeBSD is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve done this before with the help of a very good blog entry. But when I tried to do the same thing today I can&#8217;t find that page. So I decide to write this down, in case I&#8217;ll need it later.</p>
<p>The most problem of setting up Vsftpd with file based virtual user on FreeBSD is that we don&#8217;t have pam_userdb. So we&#8217;ll use  /usr/ports/security/pam_pwdfile instead.</p>
<p>So after installing the vsftpd and pam_pwdfile ports, do the following:</p>
<p>(1) in /etc/pam.d, make a file named &#8220;vsftpd&#8221; and put the following lines in it:</p>
<div class="php" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">auth required /usr/local/lib/pam_pwdfile.so pwdfile /etc/vsftpd_login.db<br />
account required /usr/lib/pam_permit.so</div>
<p>(2) make a password file with the apache htpasswd utility:</p>
<div style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">htpasswd -c -b /etc/vsftpd_login.db USERNAME PASSWORD</div>
<p>(3) make a local user with &#8220;nologin&#8221; as the shell and disable password login.  I use &#8220;vsftp&#8221; for this.</p>
<p>(4) in /usr/local/etc/vsftpd.conf, disable anonymous access and enable local user access, and then add the following:</p>
<div class="php" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">/usr/chroot_local_user=YES<br />
guest_enable=YES<br />
guest_username=vsftp<br />
<span style="color: #ff0000">listen=YES<br />
background=YES</span><br />
pam_service_name=vsftpd</p>
<p>user_config_dir=/usr/local/etc/vsftpd<br />
virtual_use_local_privs=YES</div>
<p>Note the value of &#8220;guest_usrname&#8221; is the local user name you made in step (3)</p>
<p>(5) make a directory /usr/local/etc/vsftpd, and write user specific configurations in a file named after the user&#8217;s login name. For example, someone with full write access will have something like this:</p>
<div class="php" style="font-family: monospace;font-size: 110%; color: #000066; border: 1px solid orange; margin: 5px; padding: 5px; background-color: #ffffff;">anon_mkdir_write_enable=YES<br />
anon_other_write_enable=YES<br />
anon_upload_enable=YES<br />
write_enable=YES</div>
<p>(6) It should be OK now, add vsftpd_enable=&#8221;YES&#8221;  into /etc/rc.conf as usual, and restart vsftpd to see if everything works fine.</p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=856&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_856" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/freebsd/file-based-virtual-user-settings-for-vsftpd-on-freebsd/feed/</wfw:commentRss>
		</item>
		<item>
		<title>牺牲</title>
		<link>http://dryice.name/blog/chinese/%e7%89%ba%e7%89%b2/</link>
		<comments>http://dryice.name/blog/chinese/%e7%89%ba%e7%89%b2/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 06:54:23 +0000</pubDate>
		<dc:creator>dryice</dc:creator>
		
		<category><![CDATA[chinese]]></category>

		<guid isPermaLink="false">http://dryice.name/blog/chinese/%e7%89%ba%e7%89%b2/</guid>
		<description><![CDATA[好久没有流泪了，今天看《集结号》的片外《牺牲》，又找到了中学时看《高山下的花环》时的感觉。
还有什么 比死亡更容易
还有什么 比倒下更有力
没有火炬
我只有勇敢点燃我自己
用牺牲 证明我们的勇气

还有什么 比死亡更恐惧
还有什么 比子弹更无敌
没有躲避
是因为我们永远在一起
用牺牲 证明我们没放弃

Share This
]]></description>
			<content:encoded><![CDATA[<p>好久没有流泪了，今天看《集结号》的片外《牺牲》，又找到了中学时看《高山下的花环》时的感觉。</p>
<p><span style="font-size: 12px; margin-left: 12px"><font color="#000000">还有什么 比死亡更容易</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">还有什么 比倒下更有力</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">没有火炬</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">我只有勇敢点燃我自己</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">用牺牲 证明我们的勇气</font></span></p>
<p><span style="font-size: 12px; margin-left: 12px"></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">还有什么 比死亡更恐惧</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">还有什么 比子弹更无敌</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">没有躲避</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">是因为我们永远在一起</font></span><br />
<span style="font-size: 12px; margin-left: 12px"><font color="#000000">用牺牲 证明我们没放弃</font></span></p>
<p><hints id="hah_hints"></hints></p>
<p class="akst_link"><a href="http://dryice.name/blog/?p=866&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_866" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://dryice.name/blog/chinese/%e7%89%ba%e7%89%b2/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
