<?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>How to Config &#187; ubuntu</title>
	<atom:link href="http://www.howtoconfig.com/tag/ubuntu/feed" rel="self" type="application/rss+xml" />
	<link>http://www.howtoconfig.com</link>
	<description>how to config - how to configure</description>
	<lastBuildDate>Fri, 29 Apr 2011 09:52:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>SSH โดยไม่ต้องใส่รหัสผ่าน</title>
		<link>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html#comments</comments>
		<pubDate>Fri, 16 Jan 2009 12:30:01 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[*BSD]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[รหัสผ่าน]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=57</guid>
		<description><![CDATA[สำหรับผู้ดูแลระบบที่มีความจำเป็นต้องใช้งาน Remote Login ผ่าน OpenSSH Client อยู่เป็นประจำไม่ว่าจะใช้งานบน Linux, *BSD, Mac OS X คงจะเกิดอาการเบื่อไม่น้อยที่ต้องพิมพ์ Password ทุกๆ ครั้งที่ต้องการจะ Login (ไม่นับ Password จำพวก 123456 นะครับ) ทางออกสำหรับผู้ที่ต้องการ Login โดยไม่ต้องพิมพ์ Password แถมยังคงความปลอดภัยตามแบบฉบับของ OpenSSH สามารถทำได้ตามวิธีดังต่อไปนี้ครับ ระบบที่ทำการทดสอบ - OpenSSH Client บน Mac OS X 10.5.6 - OpenSSH Server บน Ubuntu 8.04 ขั้นตอนแรก ทำการสร้าง keys สำหรับยืนยันตัวตนระหว่าง Client และ Server (ทำบนเครื่อง Client ในที่นี้คือ Mac [...]]]></description>
			<content:encoded><![CDATA[<p>สำหรับผู้ดูแลระบบที่มีความจำเป็นต้องใช้งาน Remote Login ผ่าน OpenSSH Client อยู่เป็นประจำไม่ว่าจะใช้งานบน Linux, *BSD, Mac OS X คงจะเกิดอาการเบื่อไม่น้อยที่ต้องพิมพ์ Password ทุกๆ ครั้งที่ต้องการจะ Login (ไม่นับ Password จำพวก 123456 นะครับ) ทางออกสำหรับผู้ที่ต้องการ Login โดยไม่ต้องพิมพ์ Password แถมยังคงความปลอดภัยตามแบบฉบับของ OpenSSH สามารถทำได้ตามวิธีดังต่อไปนี้ครับ</p>
<p>ระบบที่ทำการทดสอบ<br />
- OpenSSH Client บน Mac OS X 10.5.6<br />
- OpenSSH Server บน Ubuntu 8.04</p>
<p>ขั้นตอนแรก ทำการสร้าง keys สำหรับยืนยันตัวตนระหว่าง Client และ Server (ทำบนเครื่อง Client ในที่นี้คือ Mac OS X)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> rsa</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/UserA/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/UserA/.ssh/id_rsa.
Your public key has been saved in /Users/UserA/.ssh/id_rsa.pub.
The key fingerprint is:
a4:74:0b:bc:2f:d1:f5:c7:4e:90:51:7f:f4:45:84:a0 UserA@MacClient</pre></div></div>

<p><span id="more-57"></span></p>
<p>ขั้นตอนต่อไป ใช้ ssh สร้าง directory ~/.ssh บน Server ปลายทาง (ทำบน Client ได้เลย โดยผ่าน ssh)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> .ssh</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh UserA@UbuntuServer mkdir -p .ssh
UserA@vmtuserver's password:</pre></div></div>

<p>ขั้นตอนสุดท้าย ทำการเพิ่ม Public keys ที่สร้างขึ้นในขั้นตอนแรกไปยังไฟล์ ~/.ssh/authorized_keys บน Server ปลายทาง (ทำบน Client โดยผ่าน ssh เช่นเคย)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">cat</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>id_rsa <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer <span style="color: #ff0000;">'cat &amp;gt;&amp;gt; .ssh/authorized_keys'</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ cat .ssh/id_rsa | ssh UserA@UbuntuServer 'cat &amp;gt;&amp;gt; .ssh/authorized_keys'
UserA@vmtuserver's password:</pre></div></div>

<p>ทำการทดสอบ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MacClient:~ UserA$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> UserA<span style="color: #000000; font-weight: bold;">@</span>UbuntuServer</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">MacClient:~ UserA$ ssh UserA@UbuntuServer
Linux UbuntuServer 2.6.24-19-server #1 SMP Wed Jun 18 15:18:00 UTC 2008 i686
&nbsp;
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
&nbsp;
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
&nbsp;
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
You have mail.
Last login: Tue Jan 13 00:14:19 2009 from MacClient
UserA@UbuntuServer:~$</pre></div></div>

<p>*สามารถเพิ่ม Public keys ที่สร้างขึ้นไปยัง User ใดๆ ก็ได้ ไม่จำเป็นต้องมีชื่อเหมือนกับ User ที่มีอยู่บน Client</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fssh-login-without-password.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/ssh-login-without-password.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ยกเลิก Blank Screen บน Linux Console</title>
		<link>http://www.howtoconfig.com/os/ubuntu/disable-screen-blanking-screen-going-blank-on-linux.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/disable-screen-blanking-screen-going-blank-on-linux.html#comments</comments>
		<pubDate>Thu, 03 Jul 2008 05:39:18 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[blank screen]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[concole]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux console]]></category>
		<category><![CDATA[setterm]]></category>
		<category><![CDATA[X window]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=30</guid>
		<description><![CDATA[ไม่ยากใช่ไหมครับหากต้องการยกเลิก screen saver บน X window แต่สำหรับ text mode (linux console) ผมคิดว่าหลายๆ คนยังไม่เคยยกเลิก blank screen หรือกำลังหาทางยกเลิกมันอยู่ สำหรับผมแล้วการยกเลิก blank screen บน linux console นั้นมีประโยชน์มากครับ ยกตัวอย่างเช่น เราสามารถทำงานไปพร้อมๆ กันกับการ monitor ดู error หรือ log จากอีกจอนึง (กรณีมีจอ monitor มากกว่าหนึ่งจอ) โดยที่ไม่ต้องคอยกดคีย์บอร์ดหรือเลื่อนเมาส์เพื่อให้ linux console แสดงผลอยู่ตลอดเวลา สำหรับวิธีการนั้นก็ไม่ได้ยุ่งยากเลยครับ แค่ใช้คำสั่ง setterm เท่านั้น setterm -blank 0 -powersave off -powerdown 0 &#60; /dev/console &#62; /dev/console 2&#62;&#38;1 [...]]]></description>
			<content:encoded><![CDATA[<p>ไม่ยากใช่ไหมครับหากต้องการยกเลิก screen saver บน X window แต่สำหรับ text mode (linux console) ผมคิดว่าหลายๆ คนยังไม่เคยยกเลิก blank screen หรือกำลังหาทางยกเลิกมันอยู่ สำหรับผมแล้วการยกเลิก blank screen บน linux console นั้นมีประโยชน์มากครับ ยกตัวอย่างเช่น เราสามารถทำงานไปพร้อมๆ กันกับการ monitor ดู error หรือ log จากอีกจอนึง (กรณีมีจอ monitor มากกว่าหนึ่งจอ) โดยที่ไม่ต้องคอยกดคีย์บอร์ดหรือเลื่อนเมาส์เพื่อให้ linux console แสดงผลอยู่ตลอดเวลา</p>
<p>สำหรับวิธีการนั้นก็ไม่ได้ยุ่งยากเลยครับ แค่ใช้คำสั่ง setterm เท่านั้น</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">setterm</span> <span style="color: #660033;">-blank</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-powersave</span> off <span style="color: #660033;">-powerdown</span> <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>console <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>console <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span></pre></div></div>

<p>หากต้องการยกเลิก blank screen ทุกครั้งหลังจาก start linux ให้ทำการเพิ่มคำสั่งดังกล่าวในไฟล์ /etc/rc.local เพียงเท่านี้ก็ไม่ต้องคอยกดคีย์บอร์ดหรือเลื่อนเมาส์ทุกๆ 5 นาทีแล้วครับ</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fdisable-screen-blanking-screen-going-blank-on-linux.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/disable-screen-blanking-screen-going-blank-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>inittab หายไปไหนใน ubuntu 8.04</title>
		<link>http://www.howtoconfig.com/os/ubuntu/whereis-inittab-on-ubuntu-804.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/whereis-inittab-on-ubuntu-804.html#comments</comments>
		<pubDate>Wed, 02 Jul 2008 09:25:19 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[inittab]]></category>
		<category><![CDATA[ubuntu 8.04]]></category>
		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=29</guid>
		<description><![CDATA[หลายๆ คนอาจจะสงสัยว่าทำไมไม่มีไฟล์ /etc/inittab อยู่บน ubuntu 8.04 (ที่จริงมันหายไปตั้งแต่ ubuntu 6.10 แล้วละครับ) บางคนอาจจะคิดว่าติดตั้งผิดหรือเผลอลบไปตอนไหน อันที่จริงแล้ว /etc/inittab ไม่ได้หายไปหรอกครับเพียงแต่ ubuntu เปลี่ยนการใช้งาน /sbin/init daemon (System-V init) ไปเป็น Upstart แทน สำหรับผมแล้วรู่สึกว่าการใช้งาน System-V init มันง่ายกว่ากันเยอะเลย &#8230; ผมใช้งาน Upstart คล่องเมื่อไหร่จะมาเขียนให้เพื่อนๆ ได้อ่านกันอีกครั้ง]]></description>
			<content:encoded><![CDATA[<p>หลายๆ คนอาจจะสงสัยว่าทำไมไม่มีไฟล์ /etc/inittab อยู่บน ubuntu 8.04 (ที่จริงมันหายไปตั้งแต่ ubuntu 6.10 แล้วละครับ) บางคนอาจจะคิดว่าติดตั้งผิดหรือเผลอลบไปตอนไหน อันที่จริงแล้ว /etc/inittab ไม่ได้หายไปหรอกครับเพียงแต่ ubuntu เปลี่ยนการใช้งาน /sbin/init daemon (System-V init) ไปเป็น <a href="http://upstart.ubuntu.com/">Upstart </a>แทน สำหรับผมแล้วรู่สึกว่าการใช้งาน System-V init มันง่ายกว่ากันเยอะเลย &#8230; ผมใช้งาน Upstart คล่องเมื่อไหร่จะมาเขียนให้เพื่อนๆ ได้อ่านกันอีกครั้ง</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fwhereis-inittab-on-ubuntu-804.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/whereis-inittab-on-ubuntu-804.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>เปลี่ยน default editor บน ubuntu</title>
		<link>http://www.howtoconfig.com/os/ubuntu/change-default-editor-on-ubuntu.html</link>
		<comments>http://www.howtoconfig.com/os/ubuntu/change-default-editor-on-ubuntu.html#comments</comments>
		<pubDate>Tue, 24 Jun 2008 10:32:48 +0000</pubDate>
		<dc:creator>กวิน ชัยเลิศ</dc:creator>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[default editor]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[nano]]></category>
		<category><![CDATA[pine]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[system administrator]]></category>
		<category><![CDATA[ubuntu 8.04 hardy]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.howtoconfig.com/?p=25</guid>
		<description><![CDATA[จากประสบการณ์ที่ผ่านมา default editor บน linux และ *bsd มักจะเป็น vi ซึ่งตามปกติแล้ว system administrator (sysadmin) จำเป็นต้องใช้ default editor ของ os ในหลายๆ เหตุการณ์ เช่น ใช้ในคำสั่ง crontab เป็นต้น หลังจากที่ติดตั้ง Ubuntu 8.04 hardy ก็พบว่า default editor ไม่ใช่ vi ที่ผมคุ้นเคย กลับกลายเป็น nano editor หน้าตาเหมือนกับ pineapple สมัยที่ linux ยังไม่เฟื่องฟู (pine e-mail client) ไม่รู้ว่าคนแก่แถวๆ นี้มีใครนิยมกิน pine บ้างครับ &#8230; เพื่อไม่ให้ยืดเยื้อไปกว่านี้ เรามาเปลี่ยน default editor บน [...]]]></description>
			<content:encoded><![CDATA[<p>จากประสบการณ์ที่ผ่านมา default editor บน linux และ *bsd มักจะเป็น vi ซึ่งตามปกติแล้ว system administrator (sysadmin) จำเป็นต้องใช้ default editor ของ os ในหลายๆ เหตุการณ์ เช่น ใช้ในคำสั่ง crontab เป็นต้น</p>
<p>หลังจากที่ติดตั้ง Ubuntu 8.04 hardy ก็พบว่า default editor ไม่ใช่ vi ที่ผมคุ้นเคย กลับกลายเป็น nano editor หน้าตาเหมือนกับ pineapple สมัยที่ linux ยังไม่เฟื่องฟู (pine e-mail client) ไม่รู้ว่าคนแก่แถวๆ นี้มีใครนิยมกิน pine บ้างครับ &#8230; เพื่อไม่ให้ยืดเยื้อไปกว่านี้ เรามาเปลี่ยน default editor บน ubuntu กันดีกว่าครับ</p>
<p><span id="more-25"></span><br />
แปลงร่างเป็น root หรือใครถนัดใช้ sudo ก็ข้ามไปใช้ sudo ตามสะดวกครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> -</pre></div></div>

<p>ทีนี้ก็เปลี่ยน default editor ตามนี้ครับ</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">update-alternatives <span style="color: #660033;">--config</span> editor</pre></div></div>

<blockquote><p>
There are 4 alternatives which provide `editor&#8217;.</p>
<p>  Selection    Alternative<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
          1    /usr/bin/vim.tiny<br />
          2    /bin/ed<br />
 +        3    /bin/nano<br />
*         4    /usr/bin/vim.basic</p>
<p>Press enter to keep the default[*], or type selection number:
</p></blockquote>
<p>แฟนพันธุ์ vi ก็ต้องเลือกหมายเลข 4 อยู่แล้ว &#8230; เพื่อนๆ เลือกหมายเลขอะไรกันครับ</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.howtoconfig.com%2Fos%2Fubuntu%2Fchange-default-editor-on-ubuntu.html&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.howtoconfig.com/os/ubuntu/change-default-editor-on-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

