<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5404995984916199885</id><updated>2012-02-16T16:21:36.231+08:00</updated><category term='virtualization'/><category term='cisco'/><category term='router'/><category term='software'/><category term='Linux'/><category term='security'/><category term='vmware'/><category term='eigrp'/><category term='Tools'/><category term='network'/><category term='ospf'/><category term='ubuntu'/><category term='Windows'/><category term='troubleshoot'/><category term='command'/><title type='text'>Ray's IT notes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>75</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-8808937310419200111</id><published>2011-09-21T17:45:00.000+08:00</published><updated>2011-09-21T17:45:05.834+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>CA management - tinyca</title><content type='html'>TinyCA is a program with a simple graphical user interface that makes managing a small CA (Certification Authority) easy. &amp;nbsp;TinyCA works as a frontend for openssl and can deal with several independent CAs.&lt;br /&gt;With TinyCA you can create and manage x509 and S/MIME server and client certificates. &amp;nbsp;You can choose between RSA and DSA keys, as well as between different digest algorithms.&lt;br /&gt;The certificates can be exported as PEM, DER, TXT and PKCS#12 or as a convenient archive containing both key and certificate. &amp;nbsp;Certificates can be revoked by adding them to a certificate revocation list.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-LYph6w3oDcc/Tnmx9pHHHsI/AAAAAAAABz8/Xb3ZrKK0d-Q/s1600/tinyca1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="467" src="http://1.bp.blogspot.com/-LYph6w3oDcc/Tnmx9pHHHsI/AAAAAAAABz8/Xb3ZrKK0d-Q/s640/tinyca1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-8808937310419200111?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/8808937310419200111/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/09/ca-management-tinyca.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8808937310419200111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8808937310419200111'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/09/ca-management-tinyca.html' title='CA management - tinyca'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-LYph6w3oDcc/Tnmx9pHHHsI/AAAAAAAABz8/Xb3ZrKK0d-Q/s72-c/tinyca1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-2655344071762260374</id><published>2011-09-12T12:39:00.000+08:00</published><updated>2011-09-12T12:39:27.658+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Juniper screen OS debug transaction flow</title><content type='html'>&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Capturing Debug flow basic:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Cl db&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Set ff src-ip x.x.x.x dst-ip y.y.y.y&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Set ff src-ip y.y.y.y dst-ip x.x.x.x&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;(where&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;x.x.x.x== client ip which is accessing the server y.y.y.y==public ip of server i.e VIP ip of the server)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;debug flow basic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;(Then initiate the concerned traffic from source x.x.x.x to y.y.y.y)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Get db str&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Undebug all&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Cl db&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Capturing snoop detail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Cl db&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Snoop filter ip src-ip x.x.x.x dst-ip y.y.y.y direction both Snoop detail len 1514 Snoop (and then press `y?)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;(Then initiate the concerned traffic from source x.x.x.x to y.y.y.y)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Get db str&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoPlainText"&gt;&lt;span lang="EN-US"&gt;Snoop off&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-2655344071762260374?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/2655344071762260374/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/09/juniper-screen-os-debug-transaction.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2655344071762260374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2655344071762260374'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/09/juniper-screen-os-debug-transaction.html' title='Juniper screen OS debug transaction flow'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-782238210674292799</id><published>2011-09-02T11:48:00.001+08:00</published><updated>2011-09-02T11:48:42.006+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><title type='text'>RHEL6 disable ipv6</title><content type='html'>&lt;b&gt;Edit /etc/sysconfig/network&lt;/b&gt;&lt;br /&gt;Change the following:&lt;br /&gt;NETWORKING_IPV6=yes to NETWORKING_IPV6=no &lt;br /&gt;&lt;a href="http://linuxnet.ch/groups/linuxnet/revisions/5b3a1/6/"&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;Add a new file /etc/modprobe.d/ECS.conf containing&lt;/b&gt;&lt;br /&gt;alias net-pf-10 off&lt;br /&gt;alias ipv6 off&lt;a href="http://linuxnet.ch/groups/linuxnet/revisions/5b3a1/6/"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Stop the ipv6tables service&lt;/b&gt;&lt;br /&gt;service ip6tables stop &lt;br /&gt;&lt;a href="http://linuxnet.ch/groups/linuxnet/revisions/5b3a1/6/"&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;Disable the ipv6tables service&lt;/b&gt;&lt;br /&gt;chkconfig ip6tables off &lt;br /&gt;&lt;br /&gt;After these changes, IPv6 will be disabled after the next reboot of your system.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;verify ipv6 is disable&lt;/b&gt;&lt;br /&gt;lsmod | grep ipv6&lt;br /&gt;ifconfig&lt;br /&gt;&lt;div&gt;netstat&lt;br /&gt;&lt;br /&gt;ref.:&amp;nbsp;&lt;a href="http://linuxnet.ch/groups/linuxnet/revisions/5b3a1/6/"&gt;http://linuxnet.ch/groups/linuxnet/revisions/5b3a1/6/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-782238210674292799?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/782238210674292799/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/09/rhel-ipv6-disable.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/782238210674292799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/782238210674292799'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/09/rhel-ipv6-disable.html' title='RHEL6 disable ipv6'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-8550330873932816037</id><published>2011-07-27T14:16:00.000+08:00</published><updated>2011-07-27T14:16:34.250+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><title type='text'>Delete comment using grep</title><content type='html'>&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;grep -v ^\# myfile.conf | grep . &amp;gt; nocommentfile.conf&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-8550330873932816037?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/8550330873932816037/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/07/delete-comment-using-grep.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8550330873932816037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8550330873932816037'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/07/delete-comment-using-grep.html' title='Delete comment using grep'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-8677126984375002988</id><published>2011-05-16T19:00:00.000+08:00</published><updated>2011-05-16T19:00:41.580+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><title type='text'>use esxcli kill stunk vm in ESXi 4.1</title><content type='html'>Find world ID&lt;br /&gt;# esxcli vms vm list&lt;br /&gt;Soft kill vm&lt;br /&gt;#esxcli vms vm kill -w 81238123 -t soft&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---here 81238123 is world ID&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-8677126984375002988?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/8677126984375002988/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/05/use-esxcli-kill-stunk-vm-in-esxi-41.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8677126984375002988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8677126984375002988'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/05/use-esxcli-kill-stunk-vm-in-esxi-41.html' title='use esxcli kill stunk vm in ESXi 4.1'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-9127383232061393250</id><published>2011-05-16T11:31:00.001+08:00</published><updated>2011-05-16T11:32:10.244+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><title type='text'>Delete comment using grep</title><content type='html'>&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;grep -v ^\# myfile.conf | grep . &amp;gt; nocommentfile.conf&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-9127383232061393250?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/9127383232061393250/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/05/delete-comment-using-grep.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9127383232061393250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9127383232061393250'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/05/delete-comment-using-grep.html' title='Delete comment using grep'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-5219470557163828880</id><published>2011-05-16T11:23:00.001+08:00</published><updated>2011-05-16T11:30:00.065+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Samba join domain win2008 + squid authentication with ntlm_auth</title><content type='html'>Step:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;upgrade samba to 3.5 (for win2008)&lt;/li&gt;&lt;li&gt;edit /etc/samba/smb.conf&lt;/li&gt;&lt;li&gt;edit /etc/krb5.conf&lt;/li&gt;&lt;li&gt;edit&amp;nbsp;/etc/pam.d/system-auth&lt;/li&gt;&lt;li&gt;add winbind option in /etc/nsswitch.conf&lt;/li&gt;&lt;li&gt;config iptables to allow 139,445,389 port, or allow all for testing&lt;/li&gt;&lt;li&gt;change selinux to permissive or disable just for testing&lt;/li&gt;&lt;li&gt;setup time, ensure no more than 5 min different with your DC&amp;nbsp;&lt;/li&gt;&lt;li&gt;startup smb, winbind, oddjobd&lt;/li&gt;&lt;li&gt;join domain&lt;/li&gt;&lt;li&gt;test with wbinfo, kinit, ntlm_auth, check if your linux host appear in AD\computer ou&lt;/li&gt;&lt;li&gt;edit /etc/squid/squid.conf&lt;/li&gt;&lt;li&gt;make sure squid group have permission to access /var/lib/samba/winbindd_privilege folder&lt;/li&gt;&lt;li&gt;Startup squid&lt;/li&gt;&lt;li&gt;client pc proxy config&lt;/li&gt;&lt;li&gt;client pc edit group policy, change Network security: LAN Manager authentication level:Send LM &amp;amp; NTLM - use NTLMv2&amp;nbsp;&lt;/li&gt;&lt;li&gt;client pc test to access internet with user authentication&lt;/li&gt;&lt;/ol&gt;For detail please check here:&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;In other to make squid authentication work with win2008, we need to upgrade samba to 3.5 version.&lt;br /&gt;You have to download the repo file manually if using centos 5 which is samba3.0.X&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#vi /etc/yum.repo.d/sernet-samba.repo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[sernet-samba]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;name=SerNet Samba Team packages (CentOS 5)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;type=rpm-md&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;baseurl=http://ftp.sernet.de/pub/samba/3.5/centos/5&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;enabled=1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;gpgcheck=0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;or wget repo file and save in /etc/yum.repo.d/&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm]# wget http://ftp.sernet.de/pub/samba/3.5/centos/5/sernet-samba.repo&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#yum update&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#yum update samba samba-client&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#yum install samba3-winbind samba3-utils&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;==========================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]# cat /etc/krb5.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[logging]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;default = FILE:/var/log/krb5libs.log&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;kdc = FILE:/var/log/krb5kdc.log&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;admin_server = FILE:/var/log/kadmind.log&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[libdefaults]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;default_realm = MYDOMAIN.COM&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;dns_lookup_realm = false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;dns_lookup_kdc = false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;ticket_lifetime = 24h&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;forwardable = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[realms]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;MYDOMAIN.COM = {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;kdc = 192.168.1.10&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;default_domain = MYDOMAIN.COM&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[domain_realm]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;.mydomain.com = MYDOMAIN.COM&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;mydomain.com = MYDOMAIN.COM&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[appdefaults]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;pam = {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; debug = false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; ticket_lifetime = 36000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; renew_lifetime = 36000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; forwardable = true&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; krb4_convert = false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;==========================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;add following statement to /etc/pam.d/system-auth&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;session &amp;nbsp; &amp;nbsp; required &amp;nbsp; &amp;nbsp; &amp;nbsp;pam_mkhomedir.so skel=/etc/skel umask=0022&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;==========================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#cat /etc/samba/smb.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; workgroup = MYDOMAIN&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; password server = 192.168.1.10&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; realm = MYDOMAIN.COM&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; security = ads&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; idmap uid = 10000-20000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; idmap gid = 10000-20000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; template shell = /bin/false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; winbind use default domain = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; winbind offline logon = false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; winbind enum users = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; winbind enum groups = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; encrypt passwords = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;server string = Samba Server Version %v&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;interfaces = lo eth0 192.168.1.0/24&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hosts allow = 127. 192.168.1.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bind interfaces only = true&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# logs split per machine&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log file = /var/log/samba/%m.log&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# max 50KB per log file, then rotate&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;max log size = 500&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;os level = 20&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;preferred master = no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dns proxy = no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;load printers = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cups options = raw&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[homes]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;comment = Home Directories&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;browseable = no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;writable = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[printers]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;comment = All Printers&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;path = /var/spool/samba&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;browseable = no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;guest ok = no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;writable = no&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printable = yes&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#service smb start&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#service winbind start&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#service oddjobd start&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#service ntp start&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;----ensure time is same with DC&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;==========================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NOTE: Ensure setting in /etc/nsswitch.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;passwd: &amp;nbsp; &amp;nbsp; files winbind&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;shadow: &amp;nbsp; &amp;nbsp; files winbind&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;group: &amp;nbsp; &amp;nbsp; &amp;nbsp;files winbind&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;==========================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="font-family: 'Courier New', Courier, monospace; white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#net ads join -U administrator&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#kinit administrator&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#ntlm_auth --username=ray&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#wbinfo -t&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]#wbinfo -u&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;==========================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]# vi /etc/squid/squid.conf&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_port 3128&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;icp_port 3130&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;hierarchy_stoplist cgi-bin ?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl QUERY urlpath_regex cgi-bin \?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;no_cache deny QUERY&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cache_effective_user squid&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cache_effective_group squid&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;coredump_dir /var/spool/squid&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;visible_hostname centosvm&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;access_log /var/log/squid/access.log squid&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;auth_param ntlm children 5&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;auth_param basic children 5&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;auth_param basic realm Squid proxy-caching web server&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;auth_param basic credentialsttl 2 hours&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl all src 0.0.0.0/0.0.0.0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl manager proto cache_object&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl localhost src 127.0.0.1/255.255.255.255&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl to_localhost dst 127.0.0.0/8&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl SSL_ports port 443&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 80 # http&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 21 # ftp&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 443 # https&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 70 # gopher&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 210 # wais&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 1025-65535 # unregistered ports&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 280 # http-mgmt&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 488 # gss-http&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 591 # filemaker&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl Safe_ports port 777 # multiling http&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl CONNECT method CONNECT&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;refresh_pattern ^ftp: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1440 &amp;nbsp; &amp;nbsp;20% &amp;nbsp; &amp;nbsp; 10080&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;refresh_pattern ^gopher: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1440 &amp;nbsp; &amp;nbsp;0% &amp;nbsp; &amp;nbsp; &amp;nbsp;1440&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;refresh_pattern . &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; 20% &amp;nbsp; &amp;nbsp; 4320&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl apache rep_header Server ^Apache&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;acl NTLMUsers proxy_auth REQUIRED&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access allow all NTLMUsers&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access allow manager localhost&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access deny !localnet&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access deny manager&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access deny !Safe_ports&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access deny CONNECT !SSL_ports&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access allow localhost&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;icp_access allow all&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http_access deny all&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;==========================================&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;[root@centosvm ~]# service squid start&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;NOTE: Ensure squid have permission to access /var/lib/samba/winbindd_privileged&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;eg: chown .squid /var/lib/samba/winbindd_privileged&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Config client PC group policy, run "gpedit.msc" Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Change Network security: LAN Manager authentication level:Send LM &amp;amp; NTLM - use NTLMv2 session security if negotiated&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-5219470557163828880?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/5219470557163828880/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/05/samba-join-domain-win2008-squid.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5219470557163828880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5219470557163828880'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/05/samba-join-domain-win2008-squid.html' title='Samba join domain win2008 + squid authentication with ntlm_auth'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1585233703475336045</id><published>2011-03-29T15:07:00.001+08:00</published><updated>2011-03-29T15:07:59.009+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cisco'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><title type='text'>EtherChannel config</title><content type='html'>==========PAgP Config:=============&lt;br /&gt;Switch(config)# interface type mod/num&lt;br /&gt;Switch(config-if)# channel-protocol pagp&lt;br /&gt;Switch(config-if)# channel-group number mode {on | {{auto | desirable} [non-silent]}}&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;Switch(config)# port-channel load-balance src-dst-port&lt;br /&gt;Switch(config)# interface range gig 3/1 – 4&lt;br /&gt;Switch(config-if)# channel-protocol pagp&lt;br /&gt;Switch(config-if)# channel-group 1 mode desirable non-silent&lt;br /&gt;================================&lt;br /&gt;&lt;br /&gt;=========LACP Config==============&lt;br /&gt;Switch(config)# lacp system-priority priority&lt;br /&gt;Switch(config)# interface type mod/num&lt;br /&gt;Switch(config-if)# channel-protocol lacp&lt;br /&gt;Switch(config-if)# channel-group number mode {on | passive | active}&lt;br /&gt;Switch(config-if)# lacp port-priority priority&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;Switch(config)# lacp system-priority 100&lt;br /&gt;Switch(config)# interface range gig 2/1 – 4 , gig 3/1 – 4&lt;br /&gt;Switch(config-if)# channel-protocol lacp&lt;br /&gt;Switch(config-if)# channel-group 1 mode active&lt;br /&gt;Switch(config-if)# lacp port-priority 100&lt;br /&gt;Switch(config-if)# exit&lt;br /&gt;Switch(config)# interface range gig 2/5 – 8 , gig 3/5 – 8&lt;br /&gt;Switch(config-if)# channel-protocol lacp&lt;br /&gt;Switch(config-if)# channel-group 1 mode active&lt;br /&gt;=================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1585233703475336045?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1585233703475336045/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/03/etherchannel-config.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1585233703475336045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1585233703475336045'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/03/etherchannel-config.html' title='EtherChannel config'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-8283052561334109621</id><published>2011-03-21T17:38:00.001+08:00</published><updated>2011-03-21T21:10:15.817+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Desktop enhancement - Macubuntu</title><content type='html'>&lt;iframe src="http://wowubuntu.com/new-macubuntu.html" width=70% height=800&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-8283052561334109621?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/8283052561334109621/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/03/desktop-enhancement-macubuntu.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8283052561334109621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8283052561334109621'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/03/desktop-enhancement-macubuntu.html' title='Desktop enhancement - Macubuntu'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-9119908068771540083</id><published>2011-03-21T15:47:00.003+08:00</published><updated>2011-03-21T21:10:43.598+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Free accounting system - Features | GnuCash</title><content type='html'>&lt;iframe src="http://www.gnucash.org/features.phtml" width=70% height=800&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-9119908068771540083?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/9119908068771540083/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/03/free-accounting-system-features-gnucash.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9119908068771540083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9119908068771540083'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/03/free-accounting-system-features-gnucash.html' title='Free accounting system - Features | GnuCash'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6805256081341424400</id><published>2011-03-21T15:44:00.001+08:00</published><updated>2011-03-21T15:45:45.496+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Many many icons - NounProject</title><content type='html'>&lt;a href="http://thenounproject.com/"&gt;NounProject&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6805256081341424400?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6805256081341424400/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/03/many-many-icons-nounproject.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6805256081341424400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6805256081341424400'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/03/many-many-icons-nounproject.html' title='Many many icons - NounProject'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-705527681024462026</id><published>2011-03-14T16:45:00.002+08:00</published><updated>2011-03-14T16:46:34.960+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Extending LVM disks in Linux using Vmware virtual disks</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px;"&gt;Here is the current file system. It needs another 3Gb on the LogVol00 filesystem. The Linux system is a VMware virtual system with Virtual disks.&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# df -k&lt;br /&gt;Filesystem 1K-blocks Used Available Use% Mounted on&lt;br /&gt;/dev/mapper/VolGroup00-LogVol00&lt;br /&gt;9127580 6692828 1971088 78% /&lt;br /&gt;/dev/sda1 101086 12651 83216 14% /boot&lt;br /&gt;none 596544 0 596544 0% /dev/shm&lt;br /&gt;&lt;br /&gt;The partitions are as follows&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# sfdisk -s&lt;br /&gt;/dev/sda: 10485760&lt;br /&gt;/dev/sdb: 10485760&lt;br /&gt;/dev/sdc: 10485760&lt;br /&gt;/dev/sdd: 10485760&lt;br /&gt;/dev/sde: 10485760&lt;br /&gt;/dev/sdf: 10485760&lt;br /&gt;&lt;br /&gt;First the Vmware virtual disks needs to increase. 13Gb is the new size. Shutdown the Vmware guest and resize the disk on the Vmware host:&lt;br /&gt;&lt;br /&gt;# vmware-vdiskmanager -x 13GB dbvrac1.vmdk&lt;br /&gt;Using log file /tmp/vmware-root/vdiskmanager.log&lt;br /&gt;The old geometry C/H/S of the disk is: 1305/255/63&lt;br /&gt;The new geometry C/H/S of the disk is: 1697/255/63&lt;br /&gt;Disk expansion completed successfully.&lt;br /&gt;&lt;br /&gt;Start up the Vmware guest again.&lt;br /&gt;This has added space on the /dev/sda partition. This can be seen by running sfdisk -s again:&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# sfdisk -s&lt;br /&gt;/dev/sda: 13631488&lt;br /&gt;/dev/sdb: 10485760&lt;br /&gt;/dev/sdc: 10485760&lt;br /&gt;/dev/sdd: 10485760&lt;br /&gt;/dev/sde: 10485760&lt;br /&gt;/dev/sdf: 10485760&lt;br /&gt;&lt;br /&gt;To use the space, a partition first has to be created on /dev/sda&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# ls -al /dev/sda*&lt;br /&gt;brw-rw---- 1 root disk 8, 0 Jun 29 2009 /dev/sda&lt;br /&gt;brw-rw---- 1 root disk 8, 1 Jun 29 2009 /dev/sda1&lt;br /&gt;brw-rw---- 1 root disk 8, 2 Jun 29 2009 /dev/sda2&lt;br /&gt;&lt;br /&gt;The new partition will be /dev/sda3.&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 /]# fdisk /dev/sda&lt;br /&gt;&lt;br /&gt;Command (m for help): n&lt;br /&gt;Command action&lt;br /&gt;e extended&lt;br /&gt;p primary partition (1-4)&lt;br /&gt;p&lt;br /&gt;Partition number (1-4): 3&lt;br /&gt;First cylinder (1306-1697, default 1306):&lt;br /&gt;Using default value 1306&lt;br /&gt;Last cylinder or +size or +sizeM or +sizeK (1306-1697, default 1697):&lt;br /&gt;Using default value 1697&lt;br /&gt;&lt;br /&gt;Command (m for help): w&lt;br /&gt;The partition table has been altered!&lt;br /&gt;&lt;br /&gt;Calling ioctl() to re-read partition table.&lt;br /&gt;Syncing disks.&lt;br /&gt;&lt;br /&gt;Validate that the new partition has been created&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# ls -al /dev/sda*&lt;br /&gt;brw-rw---- 1 root disk 8, 0 Jun 29 2009 /dev/sda&lt;br /&gt;brw-rw---- 1 root disk 8, 1 Jun 29 2009 /dev/sda1&lt;br /&gt;brw-rw---- 1 root disk 8, 2 Jun 29 2009 /dev/sda2&lt;br /&gt;brw-rw---- 1 root disk 8, 2 Jun 29 2009 /dev/sda3&lt;br /&gt;&lt;br /&gt;/dev/sda3 is the new partition.&lt;br /&gt;Reboot to load the new partition into the kernel.&lt;br /&gt;&lt;br /&gt;Create a physical volume for LVM:&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# pvcreate /dev/sda3&lt;br /&gt;Physical volume "/dev/sda3" successfully created&lt;br /&gt;&lt;br /&gt;Add the new physical volume to the volume group:&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# vgextend VolGroup00 /dev/sda3&lt;br /&gt;Volume group "VolGroup00" successfully extended&lt;br /&gt;&lt;br /&gt;Extend the logical volume over the new space in the volume group.&lt;br /&gt;Find out how much more space can be added:&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# vgdisplay&lt;br /&gt;--- Volume group ---&lt;br /&gt;VG Name VolGroup00&lt;br /&gt;System ID&lt;br /&gt;Format lvm2&lt;br /&gt;Metadata Areas 2&lt;br /&gt;Metadata Sequence No 4&lt;br /&gt;VG Access read/write&lt;br /&gt;VG Status resizable&lt;br /&gt;MAX LV 0&lt;br /&gt;Cur LV 2&lt;br /&gt;Open LV 2&lt;br /&gt;Max PV 0&lt;br /&gt;Cur PV 2&lt;br /&gt;Act PV 2&lt;br /&gt;VG Size 12.88 GB&lt;br /&gt;PE Size 32.00 MB&lt;br /&gt;Total PE 412&lt;br /&gt;Alloc PE / Size 315 / 9.84 GB&lt;br /&gt;Free PE / Size 97 / 3.03 GB&lt;br /&gt;VG UUID 7yenoW-lzsd-xK8a-j2Vj-qgty-TFXK-L0lhTL&lt;br /&gt;&lt;br /&gt;There is 3.03Gb available.&lt;br /&gt;Extend the volume:&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# lvextend -L+3.03G /dev/VolGroup00/LogVol00&lt;br /&gt;Rounding up size to full physical extent 3.03 GB&lt;br /&gt;Extending logical volume LogVol00 to 11.88 GB&lt;br /&gt;Logical volume LogVol00 successfully resized&lt;br /&gt;&lt;br /&gt;Resize the filesystem:&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# resize2fs /dev/VolGroup00/LogVol00&lt;br /&gt;resize2fs 1.35 (28-Feb-2004)&lt;br /&gt;/dev/VolGroup00/LogVol00 is mounted; can't resize a mounted filesystem!&lt;br /&gt;&lt;br /&gt;Cannot use resize2fs as it is online. Use ext2online instead.&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# ext2online /dev/VolGroup00/LogVol00&lt;br /&gt;ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b&lt;br /&gt;&lt;br /&gt;Check file system:&lt;br /&gt;&lt;br /&gt;[root@dbvrac1 ~]# df -k&lt;br /&gt;Filesystem 1K-blocks Used Available Use% Mounted on&lt;br /&gt;/dev/mapper/VolGroup00-LogVol00&lt;br /&gt;12256820 6695112 4940796 58% /&lt;br /&gt;/dev/sda1 101086 12651 83216 14% /boot&lt;br /&gt;none 596544 0 596544 0% /dev/shm&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;ref.: &lt;a href="http://www.dbvisit.com/forums/showthread.php?p=2299"&gt;Extending LVM disks in Linux using Vmware virtual disks - Dbvisit Community&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-705527681024462026?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/705527681024462026/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/03/extending-lvm-disks-in-linux-using.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/705527681024462026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/705527681024462026'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/03/extending-lvm-disks-in-linux-using.html' title='Extending LVM disks in Linux using Vmware virtual disks'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-2550012981450686203</id><published>2011-02-15T16:58:00.002+08:00</published><updated>2011-07-27T14:19:12.273+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><title type='text'>vmware esx update command</title><content type='html'>0.1. Suppose ssh is ready; patch is download from &lt;a href="http://www.vmware.com/patch/download/"&gt;http://www.vmware.com/patch/download/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;0.2 Upload patch file to esx server with scp or using viclient browse datastore and upload&lt;br /&gt;&lt;br /&gt;1. Enter maintain mode&lt;br /&gt;ESX:&lt;br /&gt;vimsh -n -e   /hostsvc/maintenance_mode_enter&lt;br /&gt;ESXi:&lt;br /&gt;vim-cmd&amp;nbsp;/hostsvc/maintenance_mode_enter&lt;br /&gt;&lt;br /&gt;2. Execute update&lt;br /&gt;cd /path/to/patchfile&lt;br /&gt;esxupdate --bundle update-esx-patch.zip update&lt;br /&gt;&lt;br /&gt;3. Exit maintenance mode&lt;br /&gt;ESX:&lt;br /&gt;vimsh -n -e   /hostsvc/maintenance_mode_exit&lt;br /&gt;ESXi:&lt;br /&gt;vim-cmd&amp;nbsp;/hostsvc/maintenance_mode_exit&lt;br /&gt;&lt;br /&gt;4. System reboot&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-2550012981450686203?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/2550012981450686203/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/02/vmware-esx-update-command.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2550012981450686203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2550012981450686203'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/02/vmware-esx-update-command.html' title='vmware esx update command'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-3774024749843245998</id><published>2011-02-11T12:05:00.002+08:00</published><updated>2011-02-11T12:06:50.311+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Using Local Group Policy Editor for security issue</title><content type='html'>ref.: http://www.techrepublic.com/blog/10things/10-ways-to-tweak-windows-7-using-the-local-group-policy-editor/1014&lt;br /&gt;&lt;iframe src="http://www.techrepublic.com/blog/10things/10-ways-to-tweak-windows-7-using-the-local-group-policy-editor/1014" width="650" height="1000"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-3774024749843245998?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/3774024749843245998/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/02/using-local-group-policy-editor-for.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3774024749843245998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3774024749843245998'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/02/using-local-group-policy-editor-for.html' title='Using Local Group Policy Editor for security issue'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1260964247600807304</id><published>2011-01-27T15:31:00.001+08:00</published><updated>2011-01-27T15:33:18.695+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Improve VMware Console Mouse Experience with Windows Server 2008</title><content type='html'>ref.: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1011709&lt;br /&gt;ref.: http://vm-pro.com/improve-vmware-console-mouse-experience-with-windows-server-2008/&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://vm-pro.com/improve-vmware-console-mouse-experience-with-windows-server-2008/" width="700" height="2000"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1260964247600807304?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1260964247600807304/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/01/improve-vmware-console-mouse-experience.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1260964247600807304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1260964247600807304'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/01/improve-vmware-console-mouse-experience.html' title='Improve VMware Console Mouse Experience with Windows Server 2008'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6443533601444038022</id><published>2011-01-21T16:51:00.000+08:00</published><updated>2011-01-21T16:51:46.071+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='command'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><title type='text'>vmware-vmrc example</title><content type='html'>Directly connect to ESX&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;vmware-vmrc -h 192.168.1.123 -m "[datastore1] rayvm/rayvm.vmx"&lt;/div&gt;or&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;vmware-vmrc -h 192.168.1.123 -u "administrator" -p "yourpassword" -m "[datastore1] rayvm/rayvm.vmx"&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;Directly connect to VMware Server&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;vmware-vmrc.exe -h 192.168.1.246:8333 -m "[datastore1] rayvm/rayvm.vmx"&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6443533601444038022?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6443533601444038022/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/01/vmware-vmrc-example.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6443533601444038022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6443533601444038022'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/01/vmware-vmrc-example.html' title='vmware-vmrc example'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-2253838394337309389</id><published>2011-01-18T10:10:00.002+08:00</published><updated>2011-01-18T10:14:39.625+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>VM migrate with vSphere client</title><content type='html'>ref:http://blog.infinity.idv.tw/&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://blog.infinity.idv.tw/index.php/2010/08/04/%E5%88%A9%E7%94%A8vmware-vsphere-client-%E7%9A%84datastore-browser%E5%8A%9F%E8%83%BD%E4%B8%8A%E5%82%B3%E4%B8%8B%E8%BC%89vm%E5%82%99%E4%BB%BD%E8%88%87%E7%A7%BB%E8%BD%89/" width="1000" height="800"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-2253838394337309389?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/2253838394337309389/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/01/vm-migrate-with-vsphere-client.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2253838394337309389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2253838394337309389'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/01/vm-migrate-with-vsphere-client.html' title='VM migrate with vSphere client'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-7961334878175696189</id><published>2011-01-14T14:45:00.000+08:00</published><updated>2011-01-14T14:45:15.109+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Creating a DVD Slideshow Using Imagination</title><content type='html'>The name of the program is Imagination which is available in repository&lt;br /&gt;Export video format: VOB, FLV, 3GP, OGV&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe height="580" src="http://imagination.sourceforge.net/screenshots.html" width="800"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-7961334878175696189?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/7961334878175696189/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2011/01/creating-dvd-slideshow-using.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7961334878175696189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7961334878175696189'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2011/01/creating-dvd-slideshow-using.html' title='Creating a DVD Slideshow Using Imagination'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1718768347501998247</id><published>2010-12-31T13:05:00.000+08:00</published><updated>2010-12-31T13:05:45.090+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><title type='text'>Windows Server Domain and Forest Functional Levels</title><content type='html'>ref.: http://blogs.techrepublic.com.com/datacenter/?p=308&lt;br /&gt;&lt;table border="1" cellpadding="2" cellspacing="1" style="width: 800px;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="bottom" width="95"&gt;&lt;br /&gt;&lt;/td&gt; &lt;td nowrap="true" valign="bottom" width="144"&gt;&lt;b&gt;2000 native&lt;/b&gt;&lt;/td&gt; &lt;td nowrap="true" valign="bottom" width="144"&gt;&lt;b&gt;2003 native&lt;/b&gt;&lt;/td&gt; &lt;td nowrap="true" valign="bottom" width="144"&gt;&lt;b&gt;2008 native&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="95"&gt;&lt;b&gt;DCs allowed&lt;/b&gt;&lt;/td&gt; &lt;td nowrap="true" valign="top" width="144"&gt;W2K, W2K3, W2K8&lt;/td&gt; &lt;td nowrap="true" valign="top" width="144"&gt;W2K3, W2K8&lt;/td&gt; &lt;td nowrap="true" valign="top" width="144"&gt;W2K8 only&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="95"&gt;&lt;b&gt;Domain features&lt;/b&gt;&lt;/td&gt; &lt;td valign="top" width="144"&gt;Universal groups, Group nesting, Group conversions, Security identifier (SID) history&lt;/td&gt; &lt;td valign="top" width="144"&gt;Ability to rename domain controllers via  netdom.exe, Logon time stamp dates, Redirect Users and Computers,  Authorization Manager policies in AD, Constrained delegation, Selective  authentication&lt;/td&gt; &lt;td valign="top" width="144"&gt;Distributed File System replication support  for SYSVOL, Advanced encryption, Last Interactive Logon information,  Fine-grained password policies&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="95"&gt;&lt;b&gt;Forest features&lt;/b&gt;&lt;/td&gt; &lt;td nowrap="true" valign="top" width="144"&gt;All default AD features&lt;/td&gt; &lt;td valign="top" width="144"&gt;Forest trust, domain rename, linked-value  replication, Read-only domain controller deployment, instances of the  dynamic auxiliary class named dynamicObject in a domain directory  partition, convert inetOrgPerson object instance into a User object  instance, create instances of new group types to support role-based  authorization, deactivation and redefinition of attributes and classes  in the schema&lt;/td&gt; &lt;td valign="top" width="144"&gt;No new additional forest-level features&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1718768347501998247?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1718768347501998247/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/12/windows-server-domain-and-forest.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1718768347501998247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1718768347501998247'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/12/windows-server-domain-and-forest.html' title='Windows Server Domain and Forest Functional Levels'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1861459247412290207</id><published>2010-12-09T11:51:00.000+08:00</published><updated>2010-12-09T11:51:30.020+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>ICMP Security Failures Messages</title><content type='html'>&lt;pre&gt;Error Procedures&lt;br /&gt;&lt;br /&gt;   As is usual with ICMP messages, upon receipt of one of these error&lt;br /&gt;   messages that is uninterpretable or otherwise contains an error, no&lt;br /&gt;   ICMP error message is sent in response.  Instead, the message is&lt;br /&gt;   silently discarded.  However, for diagnosis of problems, a node&lt;br /&gt;   SHOULD provide the capability of logging the error, including the&lt;br /&gt;   contents of the silently discarded datagram, and SHOULD record the&lt;br /&gt;   event in a statistics counter.&lt;br /&gt;&lt;br /&gt;   On receipt, special care MUST be taken that the ICMP message actually&lt;br /&gt;   includes information that matches a previously sent IP datagram.&lt;br /&gt;   Otherwise, this might provide an opportunity for a denial of service&lt;br /&gt;   attack.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;   The sending implementation MUST be able to limit the rate at which&lt;br /&gt;   these messages are generated.  The rate limit parameters SHOULD be&lt;br /&gt;   configurable.  How the limits are applied (such as, by destination or&lt;br /&gt;   per interface) is left to the implementor's discretion.&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;Security Considerations&lt;br /&gt;&lt;br /&gt;   When a prior Security Association between the parties has not&lt;br /&gt;   expired, these messages SHOULD be sent with authentication.&lt;br /&gt;&lt;br /&gt;   However, the node MUST NOT dynamically establish a new Security&lt;br /&gt;   Association for the sole purpose of authenticating these messages.&lt;br /&gt;   Automated key management is computationally intensive.  This could be&lt;br /&gt;   used for a very serious denial of service attack.  It would be very&lt;br /&gt;   easy to swamp a target with bogus SPIs from random IP Sources, and&lt;br /&gt;   have it start up numerous useless key management sessions to&lt;br /&gt;   authentically inform the putative sender.&lt;br /&gt;&lt;br /&gt;   In the event of loss of state (such as a system crash), the node will&lt;br /&gt;   need to send failure messages to all parties that attempt subsequent&lt;br /&gt;   communication.  In this case, the node may have lost the key&lt;br /&gt;   management technique that was used to establish the Security&lt;br /&gt;   Association.&lt;br /&gt;&lt;br /&gt;   Much better to simply let the peers know that there was a failure,&lt;br /&gt;   and let them request key management as needed (at their staggered&lt;br /&gt;   timeouts).  They'll remember the previous key management technique,&lt;br /&gt;   and restart gracefully.  This distributes the restart burden among&lt;br /&gt;   systems, and helps allow the recently failed node to manage its&lt;br /&gt;   computational resources.&lt;br /&gt;&lt;br /&gt;   In addition, these messages inform the recipient when the ICMP sender&lt;br /&gt;   is under attack.  Unlike other ICMP error messages, the messages&lt;br /&gt;   provide sufficient data to determine that these messages are in&lt;br /&gt;   response to previously sent messages.&lt;br /&gt;&lt;br /&gt;   Therefore, it is imperative that the recipient accept both&lt;br /&gt;   authenticated and unauthenticated failure messages.  The recipient's&lt;br /&gt;   log SHOULD indicate when the ICMP messages are not validated, and&lt;br /&gt;   when the ICMP messages are not in response to a valid previous&lt;br /&gt;   message.&lt;br /&gt;&lt;br /&gt;   There is some concern that sending these messages may result in the&lt;br /&gt;   leak of security information.  For example, an attacker might use&lt;br /&gt;   these messages to test or verify potential forged keys.  However,&lt;br /&gt;   this information is already available through the simple expedient of&lt;br /&gt;   using Echo facilities, or waiting for a TCP 3-way handshake.&lt;br /&gt;&lt;br /&gt;   The rate limiting mechanism also limits this form of leak, as many&lt;br /&gt;   messages will not result in an error indication.  At the very least,&lt;br /&gt;   this will lengthen the time factor for verifying such information.&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;ref.:http://www.faqs.org/rfcs/rfc2521.html&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1861459247412290207?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1861459247412290207/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/12/icmp-security-failures-messages.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1861459247412290207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1861459247412290207'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/12/icmp-security-failures-messages.html' title='ICMP Security Failures Messages'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4968266241095713611</id><published>2010-12-09T09:47:00.000+08:00</published><updated>2010-12-09T09:47:03.526+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Install X server via YUM on Redhat/CentOS</title><content type='html'>&lt;span style="font-size: x-small;"&gt;First you can see all the yum groups available with the command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;yum grouplist&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can install X and Gnome or KDE like this:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;yum groupinstall "X Window System" "GNOME Desktop Environment"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;b&gt;yum groupinstall "X Window System" "KDE (K Desktop Environment)"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You may also want to add some other groups from the list like &lt;b&gt;"Graphical Internet" or "Office/Productivity"&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;ref: http://wikinux.wetpaint.com/page/Install+X+server+via+YUM+on+Redhat%2FCentOS&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4968266241095713611?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4968266241095713611/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/12/install-x-server-via-yum-on.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4968266241095713611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4968266241095713611'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/12/install-x-server-via-yum-on.html' title='Install X server via YUM on Redhat/CentOS'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1954999949846694121</id><published>2010-11-11T15:15:00.001+08:00</published><updated>2010-11-11T15:18:18.281+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Migrate user accounts from linux server to another linux server</title><content type='html'>ref.: http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Backup&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# mkdir /root/move/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# export UGIDLIMIT=500&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;# awk -v LIMIT=$UGIDLIMIT -F: '($3&amp;gt;=LIMIT) &amp;amp;&amp;amp; ($3!=65534)' /etc/passwd &amp;gt; /root/move/passwd.mig&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# awk -v LIMIT=$UGIDLIMIT -F: '($3&amp;gt;=LIMIT) &amp;amp;&amp;amp; ($3!=65534)' /etc/group &amp;gt; /root/move/group.mig&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# awk -v LIMIT=$UGIDLIMIT -F: '($3&amp;gt;=LIMIT) &amp;amp;&amp;amp; ($3!=65534) {print $1}' /etc/passwd | tee - |egrep -f - /etc/shadow &amp;gt;  /root/move/shadow.mig&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# cp /etc/gshadow /root/move/gshadow.mig&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# tar -zcvpf /root/move/home.tar.gz /home&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# tar -zcvpf /root/move/mail.tar.gz /var/spool/mail&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Restore&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;&lt;code&gt;# mkdir /root/newsusers.bak&lt;br /&gt;# cp /etc/passwd /etc/shadow /etc/group /etc/gshadow /root/newsusers.bak&lt;/code&gt;&lt;code&gt;&lt;br /&gt;# cd /path/to/location&lt;br /&gt;# cat passwd.mig &amp;gt;&amp;gt; /etc/passwd&lt;br /&gt;# cat group.mig &amp;gt;&amp;gt; /etc/group&lt;br /&gt;# cat shadow.mig &amp;gt;&amp;gt; /etc/shadow&lt;br /&gt;# /bin/cp gshadow.mig /etc/gshadow&lt;br /&gt;&lt;/code&gt;&lt;code&gt;# cd /&lt;br /&gt;# tar -zxvf /path/to/location/home.tar.gz&lt;/code&gt;&lt;/div&gt;&lt;code style="font-family: inherit;"&gt;&lt;br /&gt;# cd /&lt;br /&gt;# tar -zxvf /path/to/location/mail.tar.gz&lt;br /&gt;&lt;/code&gt;&lt;code style="font-family: inherit;"&gt;# reboot&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1954999949846694121?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1954999949846694121/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/11/migrate-user-accounts-from-linux-server.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1954999949846694121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1954999949846694121'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/11/migrate-user-accounts-from-linux-server.html' title='Migrate user accounts from linux server to another linux server'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-5575448637354474633</id><published>2010-10-28T18:32:00.000+08:00</published><updated>2010-10-28T18:32:09.289+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Linux delete large number files (argument list too large when using rm)</title><content type='html'>ref.: http://linux.byexamples.com/archives/326/rm-complains-argument-list-too-long/&lt;br /&gt;&lt;br /&gt;There is a limitation of rm command, where you can’t delete a large groups of files with *. For examples,&lt;br /&gt;&lt;pre&gt;&lt;code&gt;rm -rf something*&lt;/code&gt;&lt;/pre&gt;If there are large amount of files initiate with something, rm will fails and complains&lt;br /&gt;&lt;pre&gt;&lt;code&gt;/bin/rm: Argument list too long.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The solution is to make use of find, xargs and rm.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;find . -name 'something*' -print0 | xargs -0 rm -rf&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-5575448637354474633?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/5575448637354474633/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/10/linux-delete-large-number-files.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5575448637354474633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5575448637354474633'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/10/linux-delete-large-number-files.html' title='Linux delete large number files (argument list too large when using rm)'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1850108883742737345</id><published>2010-10-06T10:36:00.000+08:00</published><updated>2010-10-06T10:36:03.375+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Online Diagram Software</title><content type='html'>&lt;a href="http://www.gliffy.com/"&gt;http://www.gliffy.com/&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.gliffy.com/examples/network-diagrams/images/network_diagram_example.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" px="true" src="http://www.gliffy.com/examples/network-diagrams/images/network_diagram_example.png" width="289" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.gliffy.com/examples/flow-charts/images/flow_chart_example.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" px="true" src="http://www.gliffy.com/examples/flow-charts/images/flow_chart_example.png" width="248" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1850108883742737345?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1850108883742737345/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/10/online-diagram-software.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1850108883742737345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1850108883742737345'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/10/online-diagram-software.html' title='Online Diagram Software'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6975772786726146894</id><published>2010-09-08T16:25:00.001+08:00</published><updated>2010-09-08T16:29:39.995+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Data Recovery with Linux</title><content type='html'>&lt;a href="https://help.ubuntu.com/community/DataRecovery"&gt;https://help.ubuntu.com/community/DataRecovery&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cgsecurity.org/wiki/TestDisk"&gt;http://www.cgsecurity.org/wiki/TestDisk&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cgsecurity.org/wiki/PhotoRec"&gt;http://www.cgsecurity.org/wiki/PhotoRec&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6975772786726146894?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6975772786726146894/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/09/data-recovery-with-linux.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6975772786726146894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6975772786726146894'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/09/data-recovery-with-linux.html' title='Data Recovery with Linux'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-5349118895380036129</id><published>2010-07-19T10:26:00.005+08:00</published><updated>2010-07-19T10:38:40.934+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Full backup NTFS partition using Linux</title><content type='html'>&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: inherit;"&gt;Backup:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;i&gt;Suppose backup partition is sda1 (The first partition on master HD) and the backup data will store on another system/drive&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New,monospace; font-size: small;"&gt;0. Optional step, backup boot  menu if your using multiboot. Do it in windows: &lt;span style="background-color: yellow;"&gt;bcdedit /export  "C:\bcdbackup\bcdbackup"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;1. Bootup with rescue CD&lt;br /&gt;2. mount another location to place the backup data, as example we use sda2&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;&lt;span style="background-color: yellow;"&gt;&amp;gt; mkdir /mnt/backup&lt;/span&gt;&lt;br style="background-color: yellow;" /&gt;&lt;span style="background-color: yellow;"&gt;&amp;gt; mount /dev/sda2 /mnt/backup&lt;/span&gt;&lt;br style="background-color: yellow;" /&gt;&lt;span style="background-color: yellow;"&gt;&amp;gt; dd  if=/dev/sda of=sda.mbr bs=512 count=1&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----Backup MBR&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&amp;gt; sfdisk -l /dev/sda &amp;gt;  sda.sf&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---Backup &lt;/span&gt;&lt;span style="font-family: Courier New,monospace; font-size: small;"&gt;partition status&lt;br /&gt;&lt;span style="background-color: yellow;"&gt;&amp;gt; ntfsclone --save-image -o - /dev/sda1 | gzip &amp;gt;  sda1.pimg.gz &lt;/span&gt;&amp;lt;---Wait with coffee&lt;br /&gt;3. Verify the backup data with "&lt;span style="background-color: yellow;"&gt;ls /mnt/backup&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;&lt;b&gt;Restore:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;1. Bootup with rescue CD&lt;br /&gt;2. Start to restore mbr, partition status and partition&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;&lt;br /&gt;&lt;span style="background-color: yellow; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt; mkdir /mnt/backup&lt;/span&gt;&lt;br style="background-color: yellow; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="background-color: yellow; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; &amp;gt; mount /mnt/backup&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;&lt;span style="background-color: yellow;"&gt; /dev/sda2&lt;br /&gt;&amp;gt; cd /mnt/backup&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: yellow; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt; &amp;gt; dd  of=/dev/sda if=sda.mbr bs=512 count=1&lt;br /&gt;&amp;gt; sfdisk -f /dev/sda &amp;lt;  sda.sf&lt;br /&gt;&amp;gt; mknod /dev/sda1 b 8 1&lt;/span&gt;&lt;span style="font-family: Courier New,monospace; font-size: small;"&gt;&lt;span style="background-color: yellow;"&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;------create special or ordinary file for sda1, so you need to check major and minor number&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="background-color: yellow; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt; gunzip &amp;lt; sda1.pimg.gz |  ntfsclone -r -O /dev/sda1 -&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;3. Optional step, do it in windows: &lt;/span&gt;&lt;span style="font-family: Courier New,monospace; font-size: small;"&gt;&lt;span style="background-color: yellow;"&gt;bcdedit /import  "C:\bcdbackup\bcdbackup"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Courier New,monospace; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-5349118895380036129?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/5349118895380036129/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/07/full-backup-ntfs-partition-using-linux.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5349118895380036129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5349118895380036129'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/07/full-backup-ntfs-partition-using-linux.html' title='Full backup NTFS partition using Linux'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6158078071623970873</id><published>2010-06-25T10:24:00.000+08:00</published><updated>2010-06-25T10:24:41.958+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu Document search</title><content type='html'>Good stuff for ubuntu player: &lt;br /&gt;&lt;a href="http://people.canonical.com/%7Ekirkland/search.html"&gt;http://people.canonical.com/~kirkland/search.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6158078071623970873?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6158078071623970873/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/06/ubuntu-document-search.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6158078071623970873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6158078071623970873'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/06/ubuntu-document-search.html' title='Ubuntu Document search'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-8802029548508771421</id><published>2010-06-15T11:02:00.000+08:00</published><updated>2010-06-15T11:03:41.385+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Tomcat5 + Apache on Centos</title><content type='html'>&lt;b&gt;Install Tomcat5:&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The easy way is yum install tomcat5 tomcat5-webapps&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Testing:&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; netstat -ntlp&amp;nbsp; &amp;lt;-----------Check the default 8080 port is ready&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://localhost:8080/&amp;nbsp;&amp;nbsp; &amp;lt;------Test the url&lt;br /&gt;&lt;br /&gt;If you don't wanna join tomcat to apache2 you can stop here.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Join Tomcat to Apache2&lt;/b&gt;&lt;br /&gt;There are several ways to join tomcat to apache2&lt;br /&gt;&lt;ul&gt;&lt;li&gt;jk&amp;nbsp; (mod_jk)&lt;/li&gt;&lt;li&gt;http_proxy&amp;nbsp;&amp;nbsp; (mod_proxy)&lt;/li&gt;&lt;li&gt;proxy_ajp&amp;nbsp;&amp;nbsp;&amp;nbsp; (mod_proxy_ajp)&lt;/li&gt;&lt;/ul&gt;Now I use the easiest way - ajp_proxy:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;vi /etc/httpd/conf.d/proxy_ajp.conf&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;LoadModule proxy_ajp_module modules/mod_proxy_ajp.so&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;ProxyPass /tomcat/ ajp://localhost:8009/&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Double check the proxy_ajp.conf have included in httpd.conf&lt;br /&gt;&lt;br /&gt;restart httpd and test with url "http://localhost/tomcat/"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-8802029548508771421?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/8802029548508771421/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/06/tomcat5-apache-on-centos.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8802029548508771421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/8802029548508771421'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/06/tomcat5-apache-on-centos.html' title='Tomcat5 + Apache on Centos'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4344112591000063299</id><published>2010-06-10T17:05:00.000+08:00</published><updated>2010-06-10T17:06:55.037+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Clamav install with yum in Centos</title><content type='html'>1: Create yum repository file&lt;br /&gt;vi /etc/yum.repos.d/dag.repo&lt;br /&gt;[dag] &lt;br /&gt;name=Dag RPM Repository for RHEL5 &lt;br /&gt;baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/ &lt;br /&gt;enabled=1 &lt;br /&gt;gpgcheck=1 &lt;br /&gt;&lt;br /&gt;2: Download and import the key&lt;br /&gt;wget &lt;span style="color: red;"&gt;&lt;a class="postlink" href="http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt"&gt;http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;rpm --import RPM-GPG-KEY.dag.txt&lt;br /&gt;&lt;br /&gt;3: yum install clamd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4344112591000063299?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4344112591000063299/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/06/clamav-install-with-yum-in-centos.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4344112591000063299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4344112591000063299'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/06/clamav-install-with-yum-in-centos.html' title='Clamav install with yum in Centos'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-9112535160071386923</id><published>2010-06-10T14:15:00.000+08:00</published><updated>2010-06-10T18:45:12.572+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Apache htaccess Digest Authentication config</title><content type='html'>Suppose the http document directory is /var/www/html&lt;br /&gt;&lt;b&gt;Step 1&lt;/b&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Then create .htaccess file in it&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;vi /var/www/html/.htaccess&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AuthName&amp;nbsp; "myauth"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Authtype&amp;nbsp; Digest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AuthDigestProvider file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AuthUserFile /etc/httpd/conf.d/.digpass&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Require valid-user&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2&lt;/b&gt;&lt;br /&gt;issue the follow command to create login account&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;htdigest -c /etc/httpd/conf.d/.digpass myauth tom&lt;br /&gt;&lt;br /&gt;ps.: Don't forget to change "AllowOverride AuthConfig" in httpd.conf&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-9112535160071386923?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/9112535160071386923/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/06/apache-htaccess-digest-authentication.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9112535160071386923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9112535160071386923'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/06/apache-htaccess-digest-authentication.html' title='Apache htaccess Digest Authentication config'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4032064446124618107</id><published>2010-05-27T18:04:00.000+08:00</published><updated>2010-05-27T18:15:34.729+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Apache+SSL in Centos</title><content type='html'>&lt;pre&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;1. Install package&lt;/span&gt;&lt;br /&gt;yum install mod_ssl openssl&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;2. Create CA and generate Cert&lt;/span&gt;&lt;br /&gt;# Generate private key &lt;br /&gt;openssl genrsa -out ca.key 1024 &lt;br /&gt;&lt;br /&gt;# Generate CSR &lt;br /&gt;openssl req -new -key ca.key -out ca.csr&lt;br /&gt;&lt;br /&gt;# Generate Self Signed Key&lt;br /&gt;openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt&lt;br /&gt;&lt;br /&gt;# Move the files to the correct locations&lt;br /&gt;mv ca.crt /etc/pki/tls/certs&lt;br /&gt;mv ca.key /etc/pki/tls/private/ca.key&lt;br /&gt;mv ca.csr /etc/pki/tls/private/ca.csr&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;3. Config SSL for httpd&lt;/span&gt;&lt;br /&gt;Setup the path for the cert and ca key&lt;br /&gt;vi /etc/httpd/conf.d/ssl.conf &lt;br /&gt;SSLCertificateFile /etc/pki/tls/certs/ca.crt&lt;br /&gt;SSLCertificateKeyFile /etc/pki/tls/private/ca.key&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color: yellow; font-size: large;"&gt;4. Setup Virtual Host in Apache&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;virtualhost *:443&amp;gt;&lt;br /&gt;SSLEngine on&lt;br /&gt;SSLCertificateFile /etc/pki/tls/certs/ca.crt&lt;br /&gt;SSLCertificateKeyFile /etc/pki/tls/private/ca.key&lt;br /&gt;&amp;lt;Directory /var/www/vhosts/yoursite.com/httpsdocs&amp;gt;&lt;br /&gt;AllowOverride All&lt;br /&gt;&amp;lt;/directory&amp;gt;&lt;br /&gt;DocumentRoot /var/www/vhosts/yoursite.com/httpsdocs&lt;br /&gt;ServerName yoursite.com&lt;br /&gt;&amp;lt;/virtualhost&amp;gt;&lt;br /&gt;&lt;br /&gt;/etc/init.d/httpd restart&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4032064446124618107?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4032064446124618107/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/05/apachessl-in-centos.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4032064446124618107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4032064446124618107'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/05/apachessl-in-centos.html' title='Apache+SSL in Centos'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-602144843160437667</id><published>2010-05-26T17:00:00.000+08:00</published><updated>2010-05-27T20:55:46.191+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Apache htaccess simple config</title><content type='html'>&lt;span style="font-size: large;"&gt;AllowOverride AuthConfig&lt;/span&gt; - Provide login screen before view the web site&lt;br /&gt;Sample config:&lt;br /&gt;&lt;b style="background-color: yellow; color: black;"&gt;httpd.conf&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="term_write"&gt;====================================&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;    Options FollowSymLinks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;    AllowOverride AuthConfig&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;    Order allow,deny&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;    Allow from all&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AccessFileName .htaccess&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="term_write"&gt;====================================&lt;/span&gt;&lt;/pre&gt;&lt;b&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="background-color: yellow; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/var/www/html/.htaccess&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="term_write"&gt;====================================&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="term_write"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AuthName     "htaccess protect"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Authtype     Basic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AuthUserFile /var/www/.htpasswd &amp;lt;---the .htpasswd file will be created later&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;require      valid-user&lt;/span&gt;&lt;/span&gt;&lt;span class="term_write"&gt;&lt;br /&gt;(or you can change to specify user "require user     tom")&lt;br /&gt;====================================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create .htpasswd file:&lt;br /&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;htpasswd -c /var/www/.htpasswd owner&lt;br /&gt;&lt;br /&gt;Add another account:&lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;htpasswd /var/www/.htpasswd tom&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-602144843160437667?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/602144843160437667/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/05/apache-htaccess-simple-config.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/602144843160437667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/602144843160437667'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/05/apache-htaccess-simple-config.html' title='Apache htaccess simple config'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-3675465853132164160</id><published>2010-05-21T12:21:00.002+08:00</published><updated>2010-09-10T17:30:49.551+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>vmware remote console on firefox 3.6.x problem</title><content type='html'>&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;The problem is the vmrc plugin is not available on firefox 3.6.x, it return timeout error. So my solution is just run the vmrc directly, you can follow the steps:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;copy the plugin from /&lt;/span&gt;&lt;code style="font-size: 1.4em;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin/ to client site.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;on client, just unzip it, (for me, unzip vmware-vmrc-linux-x64.xpi)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;after extract, you can see vmware-vmrc in plugin folder, run it directly and give the hostname (e.g: 192.168.0.2:8333), username and password.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code style="font-size: 1.4em;"&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Linux:&lt;br /&gt;vmware-vmrc -h [&amp;lt;hostname&amp;gt;] [-u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt;] [-M &amp;lt;moid&amp;gt; | &amp;lt;datastore path&amp;gt;]&lt;br /&gt;&lt;br /&gt;Windows:&lt;br /&gt;vmware-vmrc.exe -h &amp;lt;hostname&amp;gt; [-u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt;] -M &amp;lt;moid&amp;gt; | &amp;lt;datastore path&amp;gt;&lt;br /&gt;&lt;br /&gt;You can find the object id (moid) from vmInventory.xml&lt;br /&gt;For example: "C:\Program Files (x86)\Common Files\VMware\VMware Remote Console Plug-in\vmware-vmrc.exe" -h localhost:8333 -M 16&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-3675465853132164160?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/3675465853132164160/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/05/vmware-remote-console-on-firefox-36x.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3675465853132164160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3675465853132164160'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/05/vmware-remote-console-on-firefox-36x.html' title='vmware remote console on firefox 3.6.x problem'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6679843782547840065</id><published>2010-05-11T15:44:00.000+08:00</published><updated>2010-05-11T15:44:25.371+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Windows startup no desktop screen -- explorer.exe don't startup</title><content type='html'>open registry (menu Start -&amp;gt; run (or run Comand prompt): regedit).&lt;br /&gt;&lt;br /&gt;open: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ Current&lt;br /&gt;Version \ Winlogon&lt;br /&gt;&lt;br /&gt;At right pane there is "Shell". The value of it must be "explorer.exe"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6679843782547840065?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6679843782547840065/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/05/windows-startup-no-desktop-screen.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6679843782547840065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6679843782547840065'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/05/windows-startup-no-desktop-screen.html' title='Windows startup no desktop screen -- explorer.exe don&apos;t startup'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-5310447598823994224</id><published>2010-05-03T16:31:00.001+08:00</published><updated>2011-12-15T11:39:08.566+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>sql 2008 server express installation fail - Performance counter registry hive consistency</title><content type='html'>Solution1:&lt;br /&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;Install with the following command:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;C:\Users\Administrator\Downloads\SQLEXPRWT_x64_EN.exe U&amp;gt;setup.exe /ACTION=install /SKIPRULES=PerfMonCounterNotCorruptedCheck&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;&lt;span lang="EN-US" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; font-family: Verdana, sans-serif; font-size: 8.5pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Solution2 (Environment: win vista sp2 32bit):&lt;br /&gt;I fixed by change the registry&lt;br /&gt;go to &lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: Arial;"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows  NT\CurrentVersion\Perflib&lt;br /&gt;then you can copy 0404 reg key and create new reg key call 004&lt;br /&gt;Then install again.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-5310447598823994224?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/5310447598823994224/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/05/sql-2008-server-express-installation.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5310447598823994224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5310447598823994224'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/05/sql-2008-server-express-installation.html' title='sql 2008 server express installation fail - Performance counter registry hive consistency'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4427373985831215135</id><published>2010-05-02T21:34:00.000+08:00</published><updated>2010-05-02T21:34:23.229+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu 內的千千靜聽 － amarok</title><content type='html'>apt-get install amarok&lt;br /&gt;&lt;br /&gt;&lt;a href="https://help.ubuntu.com/community/Amarok"&gt;https://help.ubuntu.com/community/Amarok&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4427373985831215135?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4427373985831215135/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/05/ubuntu-amarok.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4427373985831215135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4427373985831215135'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/05/ubuntu-amarok.html' title='Ubuntu 內的千千靜聽 － amarok'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1865816432244341413</id><published>2010-04-22T14:39:00.000+08:00</published><updated>2010-04-22T14:39:36.851+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Debian/Ubuntu inter-vlan configuration</title><content type='html'>Suppose your switch is ready.&lt;br /&gt;Install vlan package &amp;gt; add 802.1q module &amp;gt; config interface&lt;br /&gt;&lt;br /&gt;1. apt-get install vlan&lt;br /&gt;&lt;br /&gt;2. modprobe 8021q&lt;br /&gt;&lt;br /&gt;3. vi /etc/network/interfaces&lt;br /&gt;#add the following content, here I create 3 VLANs&lt;br /&gt;&lt;br /&gt;auto vlan10 vlan20 vlan30&lt;br /&gt;&lt;br /&gt;iface vlan10 inet static&lt;br /&gt;address 192.168.10.1&lt;br /&gt;netmask 255.255.255.0&lt;br /&gt;mtu 1500&lt;br /&gt;vlan_raw_device eth0&lt;br /&gt;&lt;br /&gt;iface vlan20 inet static&lt;br /&gt;address 192.168.20.1&lt;br /&gt;netmask  255.255.255.0&lt;br /&gt;mtu 1500&lt;br /&gt;vlan_raw_device eth0&lt;br /&gt;&lt;br /&gt;iface vlan30 inet static&lt;br /&gt;address 192.168.30.1&lt;br /&gt;netmask  255.255.255.0&lt;br /&gt;mtu 1500&lt;br /&gt;vlan_raw_device eth0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1865816432244341413?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1865816432244341413/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/04/debianubuntu-inter-vlan-configuration.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1865816432244341413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1865816432244341413'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/04/debianubuntu-inter-vlan-configuration.html' title='Debian/Ubuntu inter-vlan configuration'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4483794902775764342</id><published>2010-04-14T21:16:00.000+08:00</published><updated>2010-04-15T15:20:09.949+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>iptables in NAT (MASQUERADE, SNAT, DNAT)</title><content type='html'>Assumption in the case to config NAT&lt;br /&gt;eth0 connection to external network&lt;br /&gt;eth1 connection to internal network&lt;br /&gt;Enable ip route&lt;br /&gt;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;Set up IP FORWARDing and Masquerading &lt;br /&gt;(this is the most simple method to config NAT for internal users)&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]#&lt;/span&gt;&lt;code style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;/code&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;[root@linux ~]#&lt;/span&gt;&lt;code style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;/code&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;[root@linux ~]#&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For this case using MASQUERADE, there is alternative&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;[root@linux ~]#iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE&lt;/span&gt;&lt;/pre&gt;(suppose ppp0 is ready for external network)&lt;br /&gt;&lt;br /&gt;More information (Just sample for your reference):&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;SNAT&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;Example: Internal users access external network with private IP&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]#iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 202.175.12.34&lt;/span&gt;&lt;br /&gt;&lt;i style="color: blue;"&gt;(Map source addresses to 202.175.12.34)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]#iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 202.175.12.34-202.175.12.39&lt;/span&gt;&lt;br /&gt;&lt;i style="color: blue;"&gt;(Map source addresses to the range of 202.175.12.34~202.175.12.39)&lt;/i&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;DNAT&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Example: External users access internal server&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A PREROUTING -i eth0 -j DNAT --to 192.168.1.10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A PREROUTING -i eth0 -j DNAT --to 192.168.1.5-192.168.1.10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to 192.168.1.10:80 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to 192.168.1.10:8080&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -t nat -A PREROUTING -p tcp  --dport 80 -j REDIRECT --to-ports 8080&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4483794902775764342?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4483794902775764342/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/04/iptables-in-nat-masquerade-snat-dnat.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4483794902775764342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4483794902775764342'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/04/iptables-in-nat-masquerade-snat-dnat.html' title='iptables in NAT (MASQUERADE, SNAT, DNAT)'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-7397266734824425014</id><published>2010-04-14T19:49:00.000+08:00</published><updated>2010-04-14T20:09:46.502+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>iptables general configuration</title><content type='html'>&lt;b&gt;&lt;span style="font-size: large;"&gt;List iptables contents&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -L -n&lt;/span&gt;&lt;br /&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# iptables -L -nv&lt;/span&gt;&lt;br /&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# iptables -t nat -L -n&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: large;"&gt;Flush iptables contents&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# iptables -F&lt;/span&gt;&lt;br /&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# iptables -t nat -F&lt;/span&gt;&lt;br /&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# iptables -F FORWARD&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# iptables -X MYCHAIN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Set policy for chain&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[root@linux ~]# &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -P INPUT DROP&lt;/span&gt;&lt;br /&gt;Result:&lt;br /&gt;Chain INPUT (policy &lt;span class="term_write"&gt;DROP&lt;/span&gt;)&lt;br /&gt;target     prot opt source               destination&lt;span class="term_command"&gt; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Add rules to the chain&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="term_command"&gt;&lt;br /&gt;Template:&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables [-AI Chain] [-io interface] [-p protocal] &lt;/span&gt;&lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[-s source ip] [-d destination ip] -j [ACCEPT|DROP]&lt;/span&gt;&lt;br /&gt;Example:&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -i eth0 -s 192.168.0.1 -j ACCEPT&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -i eth0 -s 192.168.1.0/24 -j ACCEPT&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -s 192.168.2.200 -j LOG&lt;/span&gt;&lt;br /&gt;&lt;i style="color: blue;"&gt;(log all traffic from 192.168.2.200 and record to /var/log/messages)&lt;/i&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -p icmp -j ACCEPT&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -i eth0 -p tcp --dport 21 -j DROP&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -i eth0 -p udp --dport 137:138 -j ACCEPT&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -i eth0 -p tcp -s 192.168.1.0/24 \&lt;/span&gt;&lt;br /&gt;&amp;gt; &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;--sport 1024:65534 --dport ssh -j DROP&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -m state &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;--state RELATED,ESTABLISHED -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;i style="color: blue;"&gt;(Accept the response packet, here state can be NEW,RELATED,ESTABLISHED,INVALID)&lt;/i&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -m state --state INVALID -j DROP&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -A INPUT -m mac --mac-source aa:bb:cc:dd:ee:ff &lt;/span&gt;&lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Insert a rule to the chain&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -I INPUT 2 -i eth0 -p tcp --dport 21 -j DROP&lt;/span&gt;&lt;br /&gt;&lt;i style="color: blue;"&gt;(Insert to the 2rd rule)&lt;/i&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Replace a rule&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -R INPUT 2 -i eth0 -p tcp --dport 21 -j DROP&lt;/span&gt;&lt;br /&gt;&lt;i style="color: blue;"&gt;(Replace the 2rd rule)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: large;"&gt;&lt;b&gt;Delete rules&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -D INPUT -i eth0 -p tcp --dport 21 -j DROP&lt;/span&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables -D INPUT 2&lt;/span&gt;&lt;i style="color: blue;"&gt;&lt;br /&gt;(Delete the 2rd rule)&lt;/i&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif; font-size: large;"&gt;&lt;br /&gt;Save and Restore&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Whatever you did in command, it will lost after system reboot, so we need to save&lt;br /&gt;to the file that will load when system bootup. For redhat distribution, it will &lt;br /&gt;save in /etc/sysconfig/iptables&lt;br /&gt;Two command used to backup and restore.&lt;br /&gt;Example:&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables-save &amp;gt; filename&lt;/span&gt;&lt;br /&gt;&lt;i style="color: blue;"&gt;(Save iptables from running config to a file)&lt;/i&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables-save &amp;gt; /etc/sysconfig/iptables&lt;/span&gt;&lt;i style="color: blue;"&gt;&lt;br /&gt;(Save iptables from running config to startup config)&lt;/i&gt;&lt;br /&gt;[root@linux ~]# &lt;span class="term_command" style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;iptables-restore &amp;lt; filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-7397266734824425014?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/7397266734824425014/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/04/iptables-general-configuration.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7397266734824425014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7397266734824425014'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/04/iptables-general-configuration.html' title='iptables general configuration'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-3775328007348851742</id><published>2010-04-08T18:47:00.001+08:00</published><updated>2010-04-08T18:51:55.658+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>vsftpd simple config</title><content type='html'>&lt;span style="font-size: medium;"&gt;&lt;span style="font-size: x-small;"&gt;ref.: http://ubuntuforums.org&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;Basic Setup&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To disable anonymous login and to enable local users login and give them  write permissions:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset; height: 146px; margin: 0px; overflow: auto; padding: 6px; text-align: left; width: 640px;"&gt;# No anonymous login&lt;br /&gt;anonymous_enable=NO&lt;br /&gt;# Let local users login&lt;br /&gt;# If you connect from the internet with local users, you should enable TLS/SSL/FTPS&lt;br /&gt;local_enable=YES&lt;br /&gt;&lt;br /&gt;# Write permissions&lt;br /&gt;write_enable=YES&lt;/pre&gt;&lt;/div&gt;NOTE: It is not advisable to use FTP without TLS/SSL/FTPS over the  internet because the FTP protocol does not encrypt passwords. If you do  need to transfer files over FTP, consider the use of virtual users  (same system users but with non system passwords) or TLS/SSL/FTPS (see  below).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;To chroot users&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; To jail/chroot users (not the vsftpd service), there are three  choices. Search for "chroot_local_users" on the file and consider one of  the following:&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset; height: 226px; margin: 0px; overflow: auto; padding: 6px; text-align: left; width: 640px;"&gt;# 1. All users are jailed by default:&lt;br /&gt;chroot_local_user=YES&lt;br /&gt;chroot_list_enable=NO&lt;br /&gt;&lt;br /&gt;# 2. Just some users are jailed:&lt;br /&gt;chroot_local_user=NO&lt;br /&gt;chroot_list_enable=YES&lt;br /&gt;# Create the file /etc/vsftpd.chroot_list with a list of the jailed users.&lt;br /&gt;&lt;br /&gt;# 3. Just some users are "free":&lt;br /&gt;chroot_local_user=YES&lt;br /&gt;chroot_list_enable=YES&lt;br /&gt;# Create the file /etc/vsftpd.chroot_list with a list of the "free" users.&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-size: medium;"&gt;To deny (or allow) just some users to login&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To deny some users to login, add the following options in the end of the  file:&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset; height: 50px; margin: 0px; overflow: auto; padding: 6px; text-align: left; width: 640px;"&gt;userlist_deny=YES&lt;br /&gt;userlist_file=/etc/vsftpd.denied_users&lt;/pre&gt;&lt;/div&gt;In the file /etc/vsftpd.denied_users add the username of the users  that &lt;b&gt;can't&lt;/b&gt; login. One username per line.&lt;br /&gt;&lt;br /&gt;To allow just some users to login:&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset; height: 66px; margin: 0px; overflow: auto; padding: 6px; text-align: left; width: 640px;"&gt;userlist_deny=NO&lt;br /&gt;userlist_enable=YES&lt;br /&gt;userlist_file=/etc/vsftpd.allowed_users&lt;/pre&gt;&lt;/div&gt;In the file /etc/vsftpd.allowed_users add the username of the  users that &lt;b&gt;can&lt;/b&gt; login.&lt;br /&gt;&lt;br /&gt;The not allowed users will get an error that they can't login before  they type their password.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;TLS/SSL/FTPS&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;NOTE: you definitely have to use this if you connect from the  Internet.&lt;br /&gt;&lt;br /&gt;To use vsftpd with encryption (it's safer), change or add the following  options (some options aren't on the original config file, so add them):&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset; height: 210px; margin: 0px; overflow: auto; padding: 6px; text-align: left; width: 640px;"&gt;ssl_enable=YES&lt;br /&gt;allow_anon_ssl=NO&lt;br /&gt;force_local_data_ssl=YES&lt;br /&gt;force_local_logins_ssl=YES&lt;br /&gt;ssl_tlsv1=YES&lt;br /&gt;ssl_sslv2=YES&lt;br /&gt;ssl_sslv3=YES&lt;br /&gt;# Filezilla uses port 21 if you don't set any port&lt;br /&gt;# in Servertype "FTPES - FTP over explicit TLS/SSL"&lt;br /&gt;# Port 990 is the default used for FTPS protocol.&lt;br /&gt;# Uncomment it if you want/have to use port 990.&lt;br /&gt;#listen_port=990&lt;/pre&gt;&lt;/div&gt;No need to create a certificate. vstfpd uses the certificate  Ubuntu creates upon it's installation, the "snake-oil" certificate  (openssl package, installed by default).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-3775328007348851742?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/3775328007348851742/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/04/vsftpd-simple-config.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3775328007348851742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3775328007348851742'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/04/vsftpd-simple-config.html' title='vsftpd simple config'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-5462753733971803765</id><published>2010-04-08T13:54:00.000+08:00</published><updated>2010-04-08T13:55:15.998+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Install a VNC Server in Ubuntu</title><content type='html'>Step1: Install vnc4server and xinetd &lt;br /&gt;&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;sudo apt-get install vnc4server xinetd&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step2: Edit ~/.vnc/xstartup&lt;br /&gt;Uncomment the lines that start with unset and exec.  Comment out the  lines that start with xsetroot, vncconfig, xterm, and twm.&lt;br /&gt;The final  file should look like:&lt;br /&gt;&lt;b style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;#!/bin/sh&lt;br /&gt;# Uncomment the following two  lines for normal desktop:&lt;br /&gt;unset SESSION_MANAGER&lt;br /&gt;exec  /etc/X11/xinit/xinitrc&lt;br /&gt;[ -x /etc/vnc/xstartup ] &amp;amp;&amp;amp; exec  /etc/vnc/xstartup&lt;br /&gt;[ -r $HOME/.Xresources ] &amp;amp;&amp;amp; xrdb  $HOME/.Xresources&lt;br /&gt;#xsetroot -solid grey&lt;br /&gt;#vncconfig -iconic &amp;amp;&lt;br /&gt;#xterm  -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &amp;amp;&lt;br /&gt;#twm  &amp;amp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step3: Stop vncserver&lt;br /&gt;&lt;b style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;vnc4server -kill :1&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step4: start vncserver&lt;br /&gt;&lt;b style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;vnc4server&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-5462753733971803765?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/5462753733971803765/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/04/install-vnc-server-in-ubuntu.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5462753733971803765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5462753733971803765'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/04/install-vnc-server-in-ubuntu.html' title='Install a VNC Server in Ubuntu'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4208134028822921648</id><published>2010-03-25T15:57:00.000+08:00</published><updated>2010-05-06T20:05:17.546+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>No Password login - SSH</title><content type='html'>&lt;h3&gt;Step 1: Create public and private keys using ssh-key-gen on  local-host&lt;/h3&gt;&lt;pre&gt;jsmith@local-host$ &lt;span style="color: red;"&gt;[Note: You are on local-host here]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;jsmith@local-host$ &lt;b&gt;ssh-keygen&lt;/b&gt;&lt;br /&gt;Generating public/private rsa key pair.&lt;br /&gt;Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):&lt;span style="color: red;"&gt;[Enter key]&lt;/span&gt;&lt;br /&gt;Enter passphrase (empty for no passphrase): &lt;span style="color: red;"&gt;[Press enter key]&lt;/span&gt;&lt;br /&gt;Enter same passphrase again: &lt;span style="color: red;"&gt;[Pess enter key]&lt;/span&gt;&lt;br /&gt;Your identification has been saved in /home/jsmith/.ssh/id_rsa.&lt;br /&gt;Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.&lt;br /&gt;The key fingerprint is:&lt;br /&gt;33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 &lt;br /&gt;jsmith@local-host&lt;br /&gt;&lt;/pre&gt;&lt;h3&gt;Step 2: Copy the public key to remote-host using ssh-copy-id&lt;/h3&gt;jsmith@local-host$ &lt;b&gt;ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host&lt;/b&gt; &lt;br /&gt;jsmith@remote-host's password: &lt;br /&gt;Now try logging into the machine, with "ssh 'remote-host'", and check in:  .ssh/authorized_keys  to make sure we haven't added extra keys that you weren't expecting.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step 3: Login to remote-host without entering the password&lt;/h3&gt;&lt;pre&gt;jsmith@local-host$ &lt;b&gt;ssh remote-host&lt;/b&gt;&lt;br /&gt;Last login: Sun Nov 16 17:22:33 2008 from 192.168.1.2&lt;br /&gt;&lt;span style="color: red;"&gt;[Note: SSH did not ask for password.]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;jsmith@remote-host$ &lt;span style="color: red;"&gt;[Note: You are on remote-host here]&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;h3&gt;ref.: http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4208134028822921648?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4208134028822921648/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/03/no-password-login-ssh.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4208134028822921648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4208134028822921648'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/03/no-password-login-ssh.html' title='No Password login - SSH'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6975991599395438589</id><published>2010-03-23T14:51:00.000+08:00</published><updated>2010-03-23T16:01:18.773+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Apache+SSL in Debian Quick Setup</title><content type='html'>Step1: &lt;b&gt;apt-get install apache2 openssl&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step2: (Generate cert file)&lt;br /&gt;&lt;pre&gt;&lt;b&gt;mkdir /etc/apache2/ssl&lt;/b&gt;&lt;br /&gt; &lt;br /&gt;  &lt;b&gt;RANDFILE=/dev/random openssl req $@ -new -x509 -days 365 -nodes \&lt;br /&gt;    -out /etc/apache2/ssl/apache.pem \&lt;br /&gt;    -keyout /etc/apache2/ssl/apache.pem&lt;br /&gt;&lt;br /&gt;  chmod 600 /etc/apache2/ssl/apache.pem&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step3: (Config for apache2)&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;  &lt;/span&gt;&lt;b&gt;cd /etc/apache2/sites-available/&lt;br /&gt;  cp default ssl&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step4: (Enable the site. This is done by making a sym-link to the configuration &lt;br /&gt;from /etc/apache2/sites-enabled/.)&lt;br /&gt;  &lt;b&gt;a2ensite ssl&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step5: (To enable the ssl module from /etc/apache2/mods-available)&lt;br /&gt; &lt;b&gt; a2enmod ssl&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step6: (Add 443 port to /etc/apache2/ports.conf)&lt;br /&gt;  &lt;b&gt;Listen 443&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Step7: (Edit /etc/apache2/sites-available/ssl)&lt;br /&gt;&lt;b&gt;  NameVirtualHost *:443&lt;br /&gt;  &lt;virtualhost *:443=""&gt;&lt;br /&gt;   SSLEngine On&lt;br /&gt;   SSLCertificateFile /etc/apache2/ssl/apache.pem&lt;/virtualhost&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Step8: Restart apache2  /etc/init.d/apache2 restart &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6975991599395438589?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6975991599395438589/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/03/apachessl-in-debian-quick-setup.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6975991599395438589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6975991599395438589'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/03/apachessl-in-debian-quick-setup.html' title='Apache+SSL in Debian Quick Setup'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-7923611592052969218</id><published>2010-03-15T14:56:00.000+08:00</published><updated>2010-03-15T14:59:19.665+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Simple logrotate - make your log file archieve</title><content type='html'>If you want to make your log files archieve, you can create file in /etc/logrotate.d, those files will be included in logrotate.conf&lt;br /&gt;Here is the file sample:&lt;br /&gt;&lt;pre&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/var/log/linuxserver/linux.log {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;        rotate 7&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;        daily&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;        compress&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;        delaycompress&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;        missingok&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;        notifempty&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;        create 660 linuxuser linuxuser } &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This config file will run daily, create maximum 7 archives owned by linuxuser &lt;br /&gt;and linuxuser group with 660 permissions,compress all logs and exclude only yesterdays and empty log files.&lt;br /&gt;Here are some selected logrotate configuration keywords.&lt;/pre&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;daily&lt;/td&gt; &lt;td&gt;Log files are rotated every day.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;weekly&lt;/td&gt; &lt;td&gt;Log files are rotated if the current weekday is less than the  weekday of the last rotation or if more than a week has passed since the  last rotation. This is normally the same as rotating logs on the first  day of the week, but if logrotate is not being run every night a log  rotation will happen at the first valid opportunity.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;monthly&lt;/td&gt; &lt;td&gt;Log files are rotated the first time logrotate is run in a month  (this is normally on the first day of the month).&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;notifempty&lt;/td&gt; &lt;td&gt;Do not rotate the log if it is empty (this overrides the ifempty  option).&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;nocompress&lt;/td&gt; &lt;td&gt;Old versions of log files are not compressed.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;delaycompress&lt;/td&gt; &lt;td&gt;Postpone compression of the previous log file to the next rotation  cycle.  This only has effect when used in combination with compress. It  can be used when some program cannot be told to close its logfile and  thus might continue writing to the previous log file for some time.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;compress&lt;/td&gt; &lt;td&gt;Old versions of log files are compressed with gzip by default.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;mail address&lt;/td&gt; &lt;td&gt;When a log is rotated out of existence, it is mailed to address. If  no mail should be generated by a particular log, the nomail directive  may be used.&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;missingok&lt;/td&gt; &lt;td&gt;If the log file is missing, go on to the next one without issuing an  error message.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;To run the logrotate manually, issue the command:&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;logrotate -v /etc/logrotate.conf&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-7923611592052969218?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/7923611592052969218/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/03/simple-logrotate.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7923611592052969218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7923611592052969218'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/03/simple-logrotate.html' title='Simple logrotate - make your log file archieve'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-112562444526116406</id><published>2010-03-11T15:29:00.001+08:00</published><updated>2010-03-11T15:29:11.637+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Journaled quota</title><content type='html'>&lt;h2&gt;Journaled quota&lt;/h2&gt;&lt;span style="font-family: Courier New;"&gt;&lt;span class="term_command"&gt;(Assume installed quota package)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Courier New;"&gt;&lt;span class="term_command"&gt;vi /etc/fstab&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family: Courier New;"&gt;/dev/sda1 / ext4 defaults&lt;span class="term_command"&gt;,&lt;/span&gt;&lt;span style="font-family: Courier New;"&gt;usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0&lt;/span&gt;&lt;/span&gt; 0 1&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;touch /aquota.user /aquota.group&lt;/li&gt;&lt;li&gt;mount -o remount /&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Courier New;"&gt;&lt;span class="term_command"&gt;quotacheck -avug&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Courier New;"&gt;quotaon -avug&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Courier New;"&gt;edquota -u ray&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: Courier New;"&gt;&lt;span class="term_command"&gt;edquota -g myquotagrp&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-112562444526116406?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/112562444526116406/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/03/journaled-quota.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/112562444526116406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/112562444526116406'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/03/journaled-quota.html' title='Journaled quota'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6886659397242669500</id><published>2010-03-10T23:57:00.000+08:00</published><updated>2010-03-11T00:03:11.274+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>RPM command example</title><content type='html'>&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Install&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size: small;"&gt;# &lt;b&gt;rpm -ivh foo-2.0-4.i386.rpm&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;# &lt;b&gt;rpm -i ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm&lt;/b&gt;&lt;br /&gt;# &lt;b&gt;rpm -i http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm&lt;/b&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;br /&gt;Erase&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;# &lt;b&gt;rpm -e foo&lt;/b&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;br /&gt;Upgrade&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;# &lt;b&gt;rpm -Uvh foo-1.0-2.i386.rpm&lt;/b&gt;&lt;br /&gt;# &lt;b&gt;rpm -Uvh ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm&lt;/b&gt;&lt;br /&gt;# &lt;b&gt;rpm -Uvh http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;Query&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;# &lt;b&gt;rpm -qa  &amp;lt;------&lt;/b&gt;To &lt;u&gt;query all installed packages&lt;/u&gt;.&lt;/pre&gt;&lt;pre&gt;# &lt;b&gt;rpm -q foo&lt;/b&gt;&lt;b&gt;&lt;b&gt;  &amp;lt;------&lt;/b&gt;&lt;/b&gt;To &lt;u&gt;query a RPM package&lt;/u&gt;.&lt;/pre&gt;&lt;pre&gt;# &lt;b&gt;rpm -qi foo&lt;/b&gt;&lt;b&gt;&lt;b&gt;  &amp;lt;------&lt;/b&gt;&lt;/b&gt;To &lt;u&gt;display package information&lt;/u&gt;.&lt;/pre&gt;&lt;pre&gt;# &lt;b&gt;rpm -ql foo&lt;/b&gt;&lt;b&gt;&lt;b&gt;  &amp;lt;------&lt;/b&gt;&lt;/b&gt;To &lt;u&gt;list files in installed package&lt;/u&gt;&lt;/pre&gt;&lt;pre&gt;# &lt;b&gt;rpm -qf /usr/bin/mysql&lt;/b&gt;&lt;b&gt;&lt;b&gt;  &amp;lt;------&lt;/b&gt;&lt;/b&gt;&lt;u&gt;Which package owns a file?&lt;/u&gt;&lt;br /&gt;mysql-3.23.52-3&lt;/pre&gt;&lt;pre&gt;# &lt;b&gt;rpm -qpl kernel-2.4.20-18.10.1.i686.rpm&lt;/b&gt;&lt;br /&gt;# &lt;b&gt;rpm -qpl ftp://ftp.redhat.com/pub/redhat/RPMS/foo-1.0-1.i386.rpm&lt;/b&gt;&lt;br /&gt;# &lt;b&gt;rpm -qpl http://oss.oracle.com/projects/firewire/dist/files/kernel-2.4.20-18.10.1.i686.rpm&lt;/b&gt;&lt;/pre&gt;&lt;u&gt;List files in RPM file&lt;/u&gt;.&lt;br /&gt;&lt;pre&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;Verify&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;# &lt;b&gt;rpm --verify mysql&lt;/b&gt;&lt;/pre&gt;To &lt;u&gt;verify an installed package&lt;/u&gt;. The output    is listed using the following codes that signify what failed:      &lt;br /&gt;&lt;pre&gt;S File size&lt;br /&gt;  M Mode (includes permissions and file type)&lt;br /&gt;  5 MD5 sum&lt;br /&gt;  L Symlink &lt;br /&gt;  D Device &lt;br /&gt;  U User &lt;br /&gt;  G Group &lt;br /&gt;  T Mtime&lt;/pre&gt;&lt;br /&gt;Take for example the following:    &lt;br /&gt;&lt;pre&gt;# &lt;b&gt;rpm --verify mysql&lt;/b&gt;&lt;br /&gt;  S.5....T c /etc/my.cnf&lt;/pre&gt;This example indicates that file &lt;tt&gt;/etc/my.cnf&lt;/tt&gt; failed on: &lt;br /&gt;&lt;pre&gt;File size &lt;br /&gt;  MD5 Sum &lt;br /&gt;  Modified Time &lt;/pre&gt;However, the "c" tells us this is a configuration file so    that explains the changes. It should still be looked at to   determine what the changes were.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6886659397242669500?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6886659397242669500/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/03/rpm-command-example.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6886659397242669500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6886659397242669500'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/03/rpm-command-example.html' title='RPM command example'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-3348298959676992194</id><published>2010-01-29T12:37:00.000+08:00</published><updated>2010-01-30T23:52:15.920+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Recommended application and installation for new Ubuntu user</title><content type='html'>For those just finished the system installation, please look below:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Setup input method:&lt;/b&gt;&lt;br /&gt;go System&amp;gt;administration&amp;gt;language support&amp;gt;install/remove languages then choose what you want.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Compiz fusion - using simple-ccsm:&lt;/b&gt;&lt;br /&gt;open terminal, execute the command "apt-get install simple-ccsm"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Google desktop:&lt;/b&gt;&lt;br /&gt;You can download and install the plugin on your desktop. &lt;a href="http://desktop.google.com/plugins/"&gt;&lt;br /&gt;http://desktop.google.com/plugins/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Virtual box&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.virtualbox.org/wiki/Linux_Downloads"&gt;http://www.virtualbox.org/wiki/Linux_Downloads&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. vmserver&lt;/b&gt;&lt;br /&gt;&lt;a href="http://register.vmware.com/content/download.html"&gt;http://register.vmware.com/content/download.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...to be continuous&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-3348298959676992194?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/3348298959676992194/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/recommended-application-and.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3348298959676992194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3348298959676992194'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/recommended-application-and.html' title='Recommended application and installation for new Ubuntu user'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-7633754502119548391</id><published>2010-01-27T12:03:00.000+08:00</published><updated>2010-01-28T21:03:09.229+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Linux - Compression and Uncompression Example</title><content type='html'>&lt;b&gt;compress&lt;/b&gt;&lt;br /&gt;compress bigfile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;--------- compress bigfile to be bigfile.Z, bigfile will be disappear.&lt;br /&gt;compress -r myfolder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---------compress all file to be .Z file in myfolder&lt;br /&gt;compress -c bigfile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---------display the result to stdout&lt;br /&gt;compress -c bigfile &amp;gt; smallfile.Z &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---------by which, unchange bigfile but saveas another compressed file(smallfile.Z).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;uncompress &lt;/b&gt;&lt;br /&gt;uncompress smallfile.Z&lt;br /&gt;&lt;br /&gt;&lt;b&gt;gzip&lt;/b&gt;&lt;br /&gt;gzip bigfile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;--------- compress bigfile to be bigfile.gz&lt;br /&gt;gzip -9 bigfile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;--------- compress bigfile to be bigfile.gz, -9 is best quality but slowest, -1 is the fastest but low compress, default is -6.&lt;br /&gt;gzip -c bigfile &amp;gt; smallfile.gz &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;--------- unchange bigfile but save as another compressed file(smallfile.gz).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;gunzip&lt;/b&gt;&lt;br /&gt;gunzip smallfile.gz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;--------- extract the gz file&lt;br /&gt;gunzip -c smallfile.gz &amp;gt; file&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;--------- extract smallfile.gz to a file,and don't smallfile.gz&lt;br /&gt;&lt;b&gt;&lt;br /&gt;zcat&lt;/b&gt;&lt;br /&gt;zcat smallfile.gz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---------see the file content without unzip&lt;br /&gt;&lt;br /&gt;&lt;b&gt;bzip2, bunzip2, bzcat&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;bzip2 default compress level 2&lt;br /&gt;the usage is like gzip, gunzip, zcat&lt;br /&gt;(Hints: gzip is better than compress, bzip2 is the best)&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;tar&lt;/b&gt;&lt;br /&gt;&lt;i&gt;option:&lt;br /&gt;&lt;/i&gt;-c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; create, write tarfile&lt;br /&gt;-t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list content&lt;br /&gt;-z&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;use gzip compress&lt;br /&gt;-j&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;use bzip2 compress&lt;br /&gt;-x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extract or restore&lt;br /&gt;-v&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; view progress&lt;br /&gt;-p&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Restore the named files to their original modes, and ACLs if applicable&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Example&lt;/i&gt;&lt;br /&gt;tar -cf testfolder.tar /path/to/testfolder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---------------Create tar file&lt;br /&gt;tar -xvf testfolder.tar&amp;nbsp;-C /path/to/folder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;-----------Extract tar file to another folder&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tar &amp;amp; gzip&lt;/b&gt;&lt;br /&gt;tar -zpcvf testfolder.tar.gz /path/to/testfolder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------Tar and gzip a folder&lt;br /&gt;tar -zpcvf testfolder.tar.gz --exclude=/path/to/testfolder/subfolder1 /path/to/testfolder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------Tar and gzip a folder except subfolder1&lt;br /&gt;tar -zxvf testfolder.tar.gz -C /path/to/folder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------Extract the file to another&lt;br /&gt;tar -ztf testfolder.tar.gz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------View the content&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Tar &amp;amp; bzip2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;tar -jpcvf testfolder.tar.bz2 /path/to/testfolder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------Tar and gzip a folder&lt;br /&gt;tar -jpcvf testfolder.tar.bz2 --exclude=/path/to/testfolder/subfolder1 /path/to/testfolder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------Tar and bzip2 a folder except subfolder1&lt;br /&gt;tar -jxvf testfolder.tar.bz2 -C /path/to/folder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------Extract the file to another&lt;br /&gt;tar -jtf testfolder.tar.bz2 &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----------View the content&lt;br /&gt;&lt;br /&gt;&lt;b&gt;dump&lt;/b&gt;&lt;br /&gt;&lt;i&gt;for example: lets backup the partition /boot&lt;/i&gt;&lt;br /&gt;dump -S /boot&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---------------------Show how many size will be used&lt;br /&gt;dump -0uf /home/myfolder/boot.dump /boot&amp;nbsp;&amp;nbsp; &amp;lt;-----------dump the whole partition, 0 is compress level, u means update record to /etc/dumpupdate, f is specify the file name&lt;br /&gt;dump -0j -f /home/myfolder/boot.dump /boot&amp;nbsp;&amp;nbsp; &amp;lt;-----------bump the whole partition with bzip2 compress.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;restore&lt;/b&gt;&lt;br /&gt;restore -tf /home/myfolder/boot.dump &amp;lt;---------------- View the dump file content&lt;br /&gt;restore -rf /home/myfolder/boot.dump &amp;lt;---------------- Restore with dump file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-7633754502119548391?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/7633754502119548391/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/linux-compression-and-uncompression.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7633754502119548391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7633754502119548391'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/linux-compression-and-uncompression.html' title='Linux - Compression and Uncompression Example'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-851924500031904353</id><published>2010-01-20T22:30:00.000+08:00</published><updated>2010-01-21T20:16:31.350+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Change process priority - nice and renice</title><content type='html'>&lt;b&gt;Nice number&lt;/b&gt;&lt;br /&gt;• Range: -20 ~ +19&lt;br /&gt;• User process default: 0&lt;br /&gt;• + no. lower the priority&lt;br /&gt;• - no. raise the priority&lt;br /&gt;• Only root can lower the no.&lt;br /&gt;• Don’t assign +no. to fg jobs -- sluggish&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Syntax&lt;/b&gt;&lt;br /&gt;• Just nice shows current priority&lt;br /&gt;• nice [-n no.] [command]&lt;br /&gt;• nice [-no.] [command]&lt;br /&gt;• Normal user: no. = 1~19&lt;br /&gt;• Root: no. = -20~19&lt;br /&gt;• Not specified no.: default to 10&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Examples&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[law@localhost ~]$ nice seq 1000000&amp;amp;&lt;br /&gt;&lt;i&gt;Using default nice# 10 to reduce priority&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;[law@localhost ~]$ nice -n -10 vi /etc/hosts.deny&lt;br /&gt;&lt;i&gt;Start vi at high priority (-10)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;renice&lt;/b&gt;&lt;br /&gt;Modify nice no. of a running program&lt;br /&gt;Syntax:&lt;br /&gt;Renice [+|-]nicenumber [option] targets&lt;br /&gt;&lt;br /&gt;Examples&lt;br /&gt;[law@localhost ~]$ renice 19 501&lt;br /&gt;&lt;i&gt;&amp;nbsp;Lower process 501's priority&lt;/i&gt;&lt;br /&gt;[law@localhost ~]$ renice -10 -u law -p 501&lt;br /&gt;&lt;i&gt;&amp;nbsp;Increase all law's process and process 501&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-851924500031904353?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/851924500031904353/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/change-process-priority-nice-and-renice.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/851924500031904353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/851924500031904353'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/change-process-priority-nice-and-renice.html' title='Change process priority - nice and renice'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1217076691228791625</id><published>2010-01-20T22:22:00.000+08:00</published><updated>2010-01-21T14:09:30.959+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Checking system status</title><content type='html'>&lt;b&gt;ps aux&amp;nbsp;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----show all process&lt;br /&gt;&lt;b&gt;ps auxf&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----show all process as tree format&lt;br /&gt;&lt;b&gt;ps a -l&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----here -l means long format, see detail&lt;br /&gt;&lt;br /&gt;&lt;b&gt;pstree&amp;nbsp;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----show process as tree format&lt;br /&gt;&lt;b&gt;pstree -p&amp;nbsp;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----display with pid&lt;br /&gt;&lt;b&gt;pstree -H 1974&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----high light the 1974 process&lt;br /&gt;&lt;br /&gt;&lt;b&gt;top&lt;/b&gt;&lt;br /&gt;&lt;b&gt;top -d 2&amp;nbsp;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----Change data with 2 second.&lt;br /&gt;&lt;b&gt;top -b -n 2 &amp;gt; /home/ray/topresult&amp;nbsp;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp; &amp;lt;----run top 2 times and redirect the result to a file&lt;i&gt;&lt;br /&gt;in top interface:&lt;br /&gt;press q is exit&lt;br /&gt;press M is sort by memory&lt;br /&gt;press &amp;lt; or &amp;gt; means sort by previous or next column&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;free -m &lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----Check memory status&lt;br /&gt;&lt;br /&gt;&lt;b&gt;netstat -ntlp&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----Show the network status, here "l" means those listening process&lt;br /&gt;&lt;br /&gt;&lt;b&gt;vmstat 2&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----Check CPU status, take snapshot with 2 seconds&lt;br /&gt;&lt;b&gt;vmstat 2 4&lt;/b&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----Check CPU status, take snapshot with 2 seconds and do it 4 times&lt;br /&gt;&lt;b&gt;vmstat -d &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;----Show disk read write status&lt;br /&gt;&lt;br /&gt;&lt;b&gt;df -h  &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;lt;----Show harddisk space size&lt;br /&gt;&lt;br /&gt;&lt;b&gt;runlevel  &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&amp;lt;----Show previous and current runlevel&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1217076691228791625?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1217076691228791625/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/checking-system-status.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1217076691228791625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1217076691228791625'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/checking-system-status.html' title='Checking system status'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-2507189055112113544</id><published>2010-01-19T18:33:00.000+08:00</published><updated>2010-01-19T18:41:07.872+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Linux command - cut, sed, awk</title><content type='html'>&lt;b&gt;Cut&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;cut -c 1-7 f1 will output the first 7 characters in each line of file 'f1'.&lt;br /&gt;&lt;br /&gt;cut -c 2,4-7,10- f1 will output the character 2, characters 4 – 7, characters 10 until the end of line in each line of file 'f1'.&lt;br /&gt;&lt;br /&gt;cut -f 1,4,5 f1 will output 'fields' 1, 4 and 5 in file 'f1'. The fields are assumed to be separated by tab in 'f1'.&lt;br /&gt;&lt;br /&gt;cut -d ' ' -f 1,4,5 f1 will output 'fields' 1, 4 and 5 in file 'f1'. The fields are assumed to be separated by a single space in 'f1'.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sed&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let's make a test file&lt;br /&gt;ls -l /etc &gt; testsed&lt;br /&gt;&lt;br /&gt;"d" means delete&lt;br /&gt;sed '1,4d' testsed&lt;br /&gt;sed '/yum/d' testsed&lt;br /&gt;sed '/yum/!d' testsed&lt;br /&gt;&lt;br /&gt;"s" is replace, -n means hide the other output, p is display&lt;br /&gt;sed -n 's/pass/xxxxx/p' testsed&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Awk&lt;/b&gt;&lt;br /&gt;Make another file to test awk&lt;br /&gt;ps aux &gt; testawk&lt;br /&gt;&lt;br /&gt;Show column 11&lt;br /&gt;awk '{print $11}' testawk&lt;br /&gt;&lt;br /&gt;awk '/sbin/{print $2,$11}' testawk&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-2507189055112113544?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/2507189055112113544/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/linux-command-cut-sed-awk.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2507189055112113544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2507189055112113544'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/linux-command-cut-sed-awk.html' title='Linux command - cut, sed, awk'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-7913986635344767965</id><published>2010-01-18T23:40:00.000+08:00</published><updated>2010-01-18T23:40:47.440+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>ps aux 各欄位的意義</title><content type='html'>在 ps aux 顯示的項目中，各欄位的意義為：&lt;br /&gt;&lt;br /&gt;    * USER：該 process 屬於那個使用者帳號的？&lt;br /&gt;    * PID ：該 process 的程序識別碼。&lt;br /&gt;    * %CPU：該 process 使用掉的 CPU 資源百分比；&lt;br /&gt;    * %MEM：該 process 所佔用的實體記憶體百分比；&lt;br /&gt;    * VSZ ：該 process 使用掉的虛擬記憶體量 (Kbytes)&lt;br /&gt;    * RSS ：該 process 佔用的固定的記憶體量 (Kbytes)&lt;br /&gt;    * TTY ：該 process 是在那個終端機上面運作，若與終端機無關則顯示 ?，另外， tty1-tty6 是本機上面的登入者程序，若為 pts/0 等等的，則表示為由網路連接進主機的程序。&lt;br /&gt;    * STAT：該程序目前的狀態，狀態顯示與 ps -l 的 S 旗標相同 (R/S/T/Z)&lt;br /&gt;    * START：該 process 被觸發啟動的時間；&lt;br /&gt;    * TIME ：該 process 實際使用 CPU 運作的時間。&lt;br /&gt;    * COMMAND：該程序的實際指令為何？&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-7913986635344767965?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/7913986635344767965/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/ps-aux.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7913986635344767965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7913986635344767965'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/ps-aux.html' title='ps aux 各欄位的意義'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6067640314630031754</id><published>2010-01-18T17:25:00.000+08:00</published><updated>2010-05-31T23:13:14.553+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Fine tune your VM - Extend vm disk size in Linux</title><content type='html'>Step1: Login with admin, shutdown your PC&lt;br /&gt;&lt;br /&gt;Step2: Eg: Extend your vm to 40GB&lt;br /&gt;vmware-vdiskmanager -x 40GB winxp.vmdk&lt;br /&gt;Then your disk space would be expanded, but the free space is not assigned to your system.&lt;br /&gt;&lt;br /&gt;Step3: List your registered vm, check the ID &lt;br /&gt;vmware-vim-cmd vmsvc/getallvms &lt;br /&gt;&lt;br /&gt;Step4: Poweron your vm&lt;br /&gt;vmware-vim-cmd vmsvc/power.on 96&lt;br /&gt;&lt;br /&gt;Step5: If you the vm is windows, then go to computer manager to assign the free space to C: or D: as you like.&lt;br /&gt;To expand system driver (such as C: which holding winxp) then you may need to do it with thrid party partition tools. Here you can get more information: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1004071&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6067640314630031754?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6067640314630031754/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/fine-tune-your-vm-extend-vm-disk-size.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6067640314630031754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6067640314630031754'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/fine-tune-your-vm-extend-vm-disk-size.html' title='Fine tune your VM - Extend vm disk size in Linux'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6747594376901504242</id><published>2010-01-10T14:08:00.000+08:00</published><updated>2010-01-10T14:08:55.651+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Fedora 12 enable root login in GUI</title><content type='html'>1. edit /etc/pam.d/gdm and /etc/pam.d/gdm-password&lt;br /&gt;2. Add comment(#) to the following line&lt;br /&gt;# auth required pam_succeed_if.so user != root quiet&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6747594376901504242?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6747594376901504242/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/fedora-12-enable-root-login-in-gui.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6747594376901504242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6747594376901504242'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/fedora-12-enable-root-login-in-gui.html' title='Fedora 12 enable root login in GUI'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-744482883583387691</id><published>2010-01-07T18:49:00.001+08:00</published><updated>2010-01-07T18:50:29.728+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>editor - vi</title><content type='html'>&lt;pre&gt;.vi 的操作模式&lt;br /&gt;==============&lt;br /&gt;        vi 提供兩種操作模式：輸入模式(insert mode)和指令模式(command mode)&lt;br /&gt;        。當使用者進入 vi 後，即處在指令模式下，此刻鍵入之任何字元皆被視為&lt;br /&gt;        指令。在此模式下可進行刪除、修改等動作。若要輸入資料，則需進入輸入&lt;br /&gt;        模式。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.輸入模式&lt;br /&gt;=========&lt;br /&gt;        如何進入輸入模式&lt;br /&gt;                a (append)      由游標之後加入資料。&lt;br /&gt;                A               由該行之末加入資料。&lt;br /&gt;                i (insert)      由游標之前加入資料。&lt;br /&gt;                I               由該行之首加入資料。&lt;br /&gt;                o (open)        新增一行於該行之下供輸入資料之用。&lt;br /&gt;                O               新增一行於該行之上供輸入資料之用。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;如何離開輸入模式&lt;br /&gt;                《ESC》 結束輸入模式。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.指令模式&lt;br /&gt;=========&lt;br /&gt;游標之移動&lt;br /&gt;        h       向左移一個字元。&lt;br /&gt;        j       向上移一個字元。&lt;br /&gt;        k       向下移一個字元。&lt;br /&gt;        l       向右移一個字元。&lt;br /&gt;        0       移至該行之首&lt;br /&gt;        $       移至該行之末。&lt;br /&gt;        ^       移至該行的第一個字元處。&lt;br /&gt;        H       移至視窗的第一列。&lt;br /&gt;        M       移至視窗的中間那列。&lt;br /&gt;        L       移至視窗的最後一列。&lt;br /&gt;        G       移至該檔案的最後一列。&lt;br /&gt;        +       移至下一列的第一個字元處。&lt;br /&gt;        -       移至上一列的第一個字元處。&lt;br /&gt;        (       移至該句之首。 (註一)&lt;br /&gt;        )       移至該句之末。&lt;br /&gt;        {       移至該段落之首。 (註二)&lt;br /&gt;        }       移至該段落之末。&lt;br /&gt;        nG      移至該檔案的第 n 列。&lt;br /&gt;        n+      移至游標所在位置之後的第 n 列。&lt;br /&gt;        n-      移至游標所在位置之前的第 n 列。&lt;br /&gt;        &amp;lt;Ctrl&amp;gt;&amp;lt;g&amp;gt;       會顯示該行之行號、檔案名稱、檔案中最末行之行號、游標&lt;br /&gt;                        所在行號佔總行號之百分比。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;註一：句子(sentence)在vi中是指以『！』、『.』或『？』結束的一串字。&lt;br /&gt;        註二：段落(paragraph)在vi中是指以空白行隔開的文字。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.視窗的移動&lt;br /&gt;===========&lt;br /&gt;        &amp;lt;Ctrl&amp;gt;&amp;lt;f&amp;gt;       視窗往下捲一頁。&lt;br /&gt;        &amp;lt;Ctrl&amp;gt;&amp;lt;b&amp;gt;       視窗往上捲一頁。&lt;br /&gt;        &amp;lt;Ctrl&amp;gt;&amp;lt;d&amp;gt;       視窗往下捲半頁。&lt;br /&gt;        &amp;lt;Ctrl&amp;gt;&amp;lt;u&amp;gt;       視窗往上捲半頁。&lt;br /&gt;        &amp;lt;Ctrl&amp;gt;&amp;lt;e&amp;gt;       視窗往下捲一行。&lt;br /&gt;        &amp;lt;Ctrl&amp;gt;&amp;lt;y&amp;gt;       視窗往上捲一行。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.刪除、複製及修改指令介紹 (此單元較少使用)&lt;br /&gt;=========================&lt;br /&gt;        d(delete)、c(change)和y(yank)這一類的指令在 vi 中的指令格式為：&lt;br /&gt;        Operator + Scope = command&lt;br /&gt;        (運算子)   (範圍)&lt;br /&gt;        運算子：&lt;br /&gt;        d       刪除指令。刪除資料，但會將刪除資料複製到記憶體緩衝區。&lt;br /&gt;        y       將資料(字組、行列、句子或段落)複製到緩衝區。&lt;br /&gt;        p       放置(put)指令，與 d 和 y 配和使用。可將最後delete或yank的資&lt;br /&gt;                料放置於游標所在位置之行列下。&lt;br /&gt;        c       修改(change)指令，類似delete與insert的組和。刪除一個字組、句&lt;br /&gt;                子等之資料，並插入新鍵資料。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;範圍：&lt;br /&gt;        e       由游標所在位置至該字串的最後一個字元。&lt;br /&gt;        w       由游標所在位置至下一個字串的第一個字元。&lt;br /&gt;        b       由游標所在位置至前一個字串的第一個字元。&lt;br /&gt;        $       由游標所在位置至該行的最後一個字元。&lt;br /&gt;        0       由游標所在位置至該行的第一個字元。&lt;br /&gt;        )       由游標所在位置至下一個句子的第一個字元。&lt;br /&gt;        (       由游標所在位置至該句子的第一個字元。&lt;br /&gt;        {       由游標所在位置至該段落的最後一個字元。&lt;br /&gt;        }       由游標所在位置至該段落的第一個字元。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;整行動作&lt;br /&gt;        dd      刪除整行。&lt;br /&gt;        D       以行為單位，刪除游標後之所有字元。&lt;br /&gt;        cc      修改整行的內容。&lt;br /&gt;        yy      yank整行，使游標所在該行複製到記憶體緩衝區。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.刪除與修改&lt;br /&gt;===========&lt;br /&gt;        x       刪除游標所在該字元。&lt;br /&gt;        X       刪除游標所在之前一字元。&lt;br /&gt;        dd      刪除游標所在該行。&lt;br /&gt;        r       用接於此指令之後的字元取代(replace)游標所在字元。&lt;br /&gt;                如： ra 將游標所在字元以 a 取代之。&lt;br /&gt;        R       進入取代狀態，直到《ESC》為止。&lt;br /&gt;        s       刪除游標所在之字元，並進入輸入模式直到《ESC》。&lt;br /&gt;        S       刪除游標所在之該行資料，並進入輸入模式直到《ESC》。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.搬移與複製&lt;br /&gt;==========&lt;br /&gt;        利用 delete 及 put 指令可完成資料搬移之目的。&lt;br /&gt;        利用 yank 及 put 指令可完成資料複製之目的。&lt;br /&gt;        yank 和 delete 可將指定的資料複製到記憶體緩衝區，而藉由 put 指令&lt;br /&gt;        可將緩衝區內的資料複製到螢幕上。&lt;br /&gt;        例：&lt;br /&gt;        搬移一行        ‧在該行執行 dd&lt;br /&gt;                        ‧游標移至目的地&lt;br /&gt;                        ‧執行 p&lt;br /&gt;        複製一行        ‧在該行執行 yy&lt;br /&gt;                        ‧游標移至目的地&lt;br /&gt;                        ‧執行 p&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.指令重複&lt;br /&gt;=========&lt;br /&gt;        在指令模式中，可在指令前面加入一數字 n，則此指令動作會重複執行 n&lt;br /&gt;        次。&lt;br /&gt;        例：&lt;br /&gt;        刪除10行                ‧10dd&lt;br /&gt;        複製10行                ‧10yy&lt;br /&gt;                                ‧游標移至目的地&lt;br /&gt;                                ‧p&lt;br /&gt;        指標往下移10行  ‧10j&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.取消前一動作(Undo)&lt;br /&gt;===================&lt;br /&gt;        即復原執行上一指令前的內容。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;u       恢復最後一個指令之前的結果。&lt;br /&gt;        U       恢復游標該行之所有改變。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.搜尋&lt;br /&gt;=====&lt;br /&gt;        在vi中可搜尋某一字串，使游標移至該處。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;/字串           往游標之後尋找該字串。&lt;br /&gt;        ?字串           往游標之前尋找該字串。&lt;br /&gt;        n               往下繼續尋找下一個相同的字串。&lt;br /&gt;        N               往上繼續尋找下一個相同的字串。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.資料的連接&lt;br /&gt;===========&lt;br /&gt;        J       句子的連接。將游標所在之下一行連接至游標該行的後面。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;若某行資料太長亦可將其分成兩行，只要將游標移至分開點，進入輸入模式&lt;br /&gt;        (可利用 a、i等指令)再按《Enter》即可。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.環境的設定&lt;br /&gt;===========&lt;br /&gt;        ：set nu                設定資料的行號。&lt;br /&gt;        ：set nonu              取消行號設定。&lt;br /&gt;        ：set ai                自動內縮。&lt;br /&gt;        ：set noai              取消自動內縮。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;自動內縮(automatic indentation)&lt;br /&gt;        在編輯文件或程式時，有時會遇到需要內縮的狀況，『：set ai』即提供自&lt;br /&gt;        動內縮的功能，用下例解釋之：&lt;br /&gt;        ‧vi test&lt;br /&gt;        ‧(進入編輯視窗後)&lt;br /&gt;          this is the test for auto indent&lt;br /&gt;          《Tab》start indent           ← ：set ai (設自動內縮)&lt;br /&gt;          《Tab》data&lt;br /&gt;          《Tab》data&lt;br /&gt;          《Tab》data                   ← ：set noai (取消自動內縮)&lt;br /&gt;        the end of auto indent.&lt;br /&gt;        ‧註：&amp;lt;Ctrl&amp;gt;&amp;lt;d&amp;gt; 可刪除《Tab》字元。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.ex指令&lt;br /&gt;=======&lt;br /&gt;        讀寫資料&lt;br /&gt;        ：w                     將緩衝區的資料寫入磁碟中。&lt;br /&gt;        ：10,20w test   將第10行至第20行的資料寫入test檔案。&lt;br /&gt;        ：10,20w&amp;gt;&amp;gt;test  將第10行至第20行的資料加在test檔案之後。&lt;br /&gt;        ：r test                將test檔案的資料讀入編輯緩衝區的最後。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;刪除、複製及搬移&lt;br /&gt;        ：10,20d                刪除第10行至第20行的資料。&lt;br /&gt;        ：10d                   刪除第10行的資料。&lt;br /&gt;        ：%d                    刪除整個編輯緩衝區。&lt;br /&gt;        ：10,20co30             將第10行至第20行的資料複製至第30行之後。&lt;br /&gt;        ：10,20mo30             將第10行至第20行的資料搬移至第30行之後。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;字串搜尋與取代&lt;br /&gt;        s(substitute)指令可搜尋某行列範圍。&lt;br /&gt;        g(global)指令則可搜尋整個編輯緩衝區的資料。&lt;br /&gt;        s指令以第一個滿足該條件的字串為其取代的對象，若該行有數個滿足該條&lt;br /&gt;        件的字串，也僅能取代第一個，若想取代所有的字串則需加上g參數。&lt;br /&gt;        ：1,$s/old/new/g                將檔案中所有的『old』改成『new』。&lt;br /&gt;        ：10,20s/^/   /         將第10行至第20行資料的最前面插入5個空白。&lt;br /&gt;        ：%s/old/new/g          將編輯緩衝區中所有的『old』改成『new』。&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.恢復編輯時被中斷的檔案&lt;br /&gt;=======================&lt;br /&gt;        在編輯過程中，若系統當掉或連線中斷，而緩衝區的資料並還未&lt;br /&gt;        被寫回磁碟時，當再度回到系統，執行下列指令即可回復中斷前&lt;br /&gt;        的檔案內容。&lt;br /&gt;        %vi -r filename&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;.編輯多個檔案&lt;br /&gt;=============&lt;br /&gt;        vi亦提供同時編輯多個檔案的功能，方法如下：&lt;br /&gt;        %vi file1 file2 ..&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;當第一個檔案編修完成後，可利用『：w』將該緩衝區存檔，而後&lt;br /&gt;        再利用 『：n』載入下一個檔案。&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-744482883583387691?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/744482883583387691/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2010/01/editor-vi.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/744482883583387691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/744482883583387691'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2010/01/editor-vi.html' title='editor - vi'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-3011016116046242241</id><published>2009-12-30T16:30:00.000+08:00</published><updated>2009-12-31T11:16:16.841+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Basic file management commands</title><content type='html'>&lt;span style="font-size: small;"&gt;Command Purpose&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;cd&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sets location in filesystem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;ls&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Displays contents of directory&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;file&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Determines file’s type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;cat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Displays file’s contents&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;more&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Displays file’s contents one screen at a time&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;less&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Displays file’s contents one screen at a time&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;wc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Shows character, word, and line counts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;head&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Displays first few lines of a file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;tail&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Displays last few lines of a file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;touch &amp;nbsp; &lt;/b&gt;Changes file’s timestamp; create an empty file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;cp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Copies a file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;dd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Copies a file from one device to another&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;mv&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Changes a file’s name or location in the filesystem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;rm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;Deletes a file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;mkdir&amp;nbsp;&amp;nbsp; &lt;/b&gt;Creates a directory&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;rmdir&amp;nbsp;&amp;nbsp; &lt;/b&gt;Deletes a directory&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;Example:&lt;br /&gt;$ cd /home/hadden/letters&amp;nbsp;&amp;nbsp; &amp;lt;---using absolute path&lt;/span&gt;&lt;br /&gt;$ cd letters&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---using relative path&lt;/span&gt;&lt;br /&gt;$ pwd&lt;br /&gt;/home/hadden/letters/Aug&lt;br /&gt;$ cd&lt;br /&gt;$ pwd&lt;br /&gt;/home/hadden&lt;br /&gt;=====================================&lt;b&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;br /&gt;file&lt;/span&gt;&lt;/b&gt;&lt;i&gt;&lt;br /&gt;The file utility enables you to get information about the contents of a file without having to examine the file directly.&lt;br /&gt;The syntax for file is &lt;/i&gt;&lt;br /&gt;file [options] filename &lt;br /&gt;Example&lt;br /&gt;$ file home&lt;br /&gt;home: directory&lt;br /&gt;======================================&lt;b&gt;&lt;br /&gt;&lt;br /&gt;cat&lt;/b&gt;&lt;i&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;The cat (concatenate file) command can be used to create new files; however, it is primarily used to send the contents of one or more files to your display or other output device. cat’s functionality can be increased by using either &amp;gt; or &amp;gt;&amp;gt;.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;Example:&lt;br /&gt;To create a new file, type&lt;br /&gt;$ cat &amp;gt; newfilename&lt;br /&gt;file contents&lt;br /&gt;Ctrl-D&lt;br /&gt;&lt;br /&gt;To display the contents of one or more files to the standard output, type&lt;br /&gt;$ cat file1 file2&lt;br /&gt;&lt;br /&gt;To combine multiple files into one, type&lt;br /&gt;cat file1 file2 file3 &amp;gt; newfile&lt;br /&gt;&lt;br /&gt;To add the contents of file1 to the end of file2, type&lt;br /&gt;$ cat file1 &amp;gt;&amp;gt; file2&lt;br /&gt;==============================&lt;b&gt;&lt;br /&gt;wc&lt;/b&gt;&lt;i&gt;&lt;br /&gt;The output appears as the number of lines, number of words, number of characters, and filename&lt;/i&gt;&lt;br /&gt;Example: &lt;br /&gt;$ wc /etc/passwd&lt;br /&gt;33 45 1564/etc/passwd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;==================================&lt;br /&gt;&lt;br /&gt;&lt;b&gt;head and tail&lt;/b&gt;&lt;i style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;Like their names imply, these two commands let you look at either the beginning or end&lt;br /&gt;of one or more files.&lt;/i&gt;&lt;br /&gt;Example:&lt;br /&gt;To show the first seven line of the file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;$ head -7 /etc/passwd&lt;br /&gt;To show the last five line of the file.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;$ tail -5 /var/log/messages&lt;br /&gt;if no option, default is 10 line.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;=======================================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;"&gt;&lt;b&gt;touch&lt;/b&gt;&lt;br /&gt;&lt;i&gt;touch is used to change the date and time of the last access or modification. The syntax is&lt;/i&gt; &lt;br /&gt;touch [options] [date] filename&lt;br /&gt;If the file does not exist, touch will create a new file of 0 length. If no date or time is specified, the current system time is used.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;code&gt;touch -d '14:24' file1&lt;br /&gt;================================================&lt;b&gt;&lt;br /&gt;&lt;br /&gt;cp&lt;/b&gt;&lt;br /&gt;The cp command copies both files and directories. The copy operation will overwrite any existing file with the same name, so be careful. To prevent this, you can use the -b (backup target file) or the -i (interactive) option.&lt;br /&gt;To recursively copy one directory’s contents to another, use either the -r or -R option. This also will recursively copy the directory structure.&lt;br /&gt;For example:&lt;br /&gt;cp -r /home/peter /root&lt;br /&gt;&lt;br /&gt;================================================&lt;br /&gt;&lt;b&gt;dd&lt;/b&gt;&lt;br /&gt;The dd (device to device copy) is a special kind of copy utility.&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;span style="color: black; font-family: Verdana; font-size: small;"&gt;example:&lt;br /&gt;full hard disk copy&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;dd if=/dev/hdx of=/path/to/image&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;&lt;span style="color: #cc0066;"&gt;&lt;span style="color: black;"&gt;Restore Backup of hard disk copy&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Verdana; font-size: small;"&gt;dd if=/path/to/image of=/dev/hdx&lt;br /&gt;=============================&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mv&lt;/b&gt;&lt;br /&gt;The mv command is used to rename or move files to another location on the directory tree.&lt;br /&gt;&lt;br /&gt;The syntax for mv is&lt;br /&gt;mv [option] [source file] [target file]&lt;br /&gt;=============================&lt;br /&gt;&lt;br /&gt;&lt;b&gt;rm&lt;/b&gt;&lt;br /&gt;The rm command can be used to remove individual or multiple files and directories. After a file has been deleted, it is gone, so use it cautiously.&lt;br /&gt;Use the -i option to require confirmation before files are deleted. &lt;br /&gt;Otherwise, you might be left with a nonbootable system. The -f option will force deletion of write-protected files.&lt;br /&gt;&lt;br /&gt;Be careful when you do this &lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rm -rf myfolder&lt;/span&gt;&lt;br /&gt;=============================&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mkdir&lt;/b&gt;&lt;br /&gt;The mkdir command is used to create one or more directories. If no options are used, the parent directory must exist to create a child directory, as in the following examples&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mkdir testing&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mkdir testing/child&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;br /&gt;It also can create the parent and child directories in a single command by using the -p option.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;mkdir -p testing/parent/child&lt;/span&gt;&lt;br /&gt;============================&lt;br /&gt;&lt;br /&gt;&lt;b&gt;rmdir&lt;/b&gt;&lt;br /&gt;The rmdir command will delete only empty directories. &lt;br /&gt;&lt;br /&gt;Use the parent (-p) option to remove directory hierarchies.&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rmdir -p testing/parent/child&lt;/span&gt;&lt;br /&gt;This command deletes the child directory only. If there are more subdirectories in the parent directory, they will not be deleted. &lt;br /&gt;&lt;br /&gt;However, if you type&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rmdir -p testing/parent/*&lt;/span&gt;&lt;br /&gt;all empty subdirectories of the directory parent will be deleted.&lt;br /&gt;===================================&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-3011016116046242241?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/3011016116046242241/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/12/basic-file-management-commands.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3011016116046242241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3011016116046242241'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/12/basic-file-management-commands.html' title='Basic file management commands'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-9027760149491051634</id><published>2009-12-30T10:44:00.000+08:00</published><updated>2010-01-02T15:36:56.170+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Linux simple shell commands</title><content type='html'>&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Linux commands general format:&lt;/b&gt;&lt;br /&gt;command [-option] &lt;/span&gt;&lt;span style="font-size: small;"&gt;parameter1 parameter2 ...&lt;b&gt;&lt;br /&gt;&lt;br /&gt;startx&lt;/b&gt; - start x window system ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;init 3 &lt;/b&gt;- 關閉圖形介面, 進入純文字介面的環境&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;uname &lt;/b&gt;- 顯示linux kernel版本&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;[root@localhost ~]# uname -r&lt;br /&gt;2.6.31.9-174.fc12.i686  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;shutdown&lt;/b&gt; - 關閉系統 &lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;[root@localhost ~]# shutdown -h now         &amp;lt;---現在關閉系統&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;span style="font-size: small;"&gt;[root@localhost ~]# shutdown -r +1          &amp;lt;---一分鐘後&lt;/span&gt;&lt;span style="font-size: small;"&gt;reboot&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;pwd &lt;/b&gt;- 顯示所在目錄位置 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;ls&lt;/b&gt; - 顯示當前目錄檔案&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;man&lt;/b&gt; - 顯示指令說明&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;cat,more,less&lt;/b&gt; -&amp;nbsp; 顯示檔案內容&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;echo &lt;/b&gt;- 在螢幕上面顯示變數&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;[root@localhost ~]# echo $PATH /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;[root@localhost ~]# myname=ray    &amp;lt;---等號兩邊不能直接接空白字元 &lt;br /&gt;[root@localhost ~]# echo $myname &lt;/span&gt;&lt;span style="font-size: small;"&gt;ray&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;env &lt;/b&gt;- 觀察環境變數與常見環境變數說明&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;set &lt;/b&gt;- &lt;/span&gt;觀察所有變數 (含環境變數與自訂變數)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;export &lt;/b&gt;- 自訂變數轉成環境變數&lt;b&gt;&lt;br /&gt;&lt;br /&gt;history&lt;/b&gt; - 顯示執行過的指令&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-9027760149491051634?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/9027760149491051634/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/12/linux-simple-shell-commands.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9027760149491051634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9027760149491051634'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/12/linux-simple-shell-commands.html' title='Linux simple shell commands'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6824480720440438287</id><published>2009-12-28T16:58:00.000+08:00</published><updated>2010-01-21T12:55:22.159+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Linux Bootup Process</title><content type='html'>1. Hardware poweron&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; hardware test, load BIOS&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; Find boot device (harddisk, cdrom, usb...)&lt;br /&gt;&lt;br /&gt;2. Load harddisk &amp;amp; Boot loader (GRUB)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; Execute boot loader in MBR&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; Boot menu select OS&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; The MBR then needs to know which partitions on the disk have boot loader code specific to their operating systems in their boot sectors and then attempts to boot one of them.&lt;br /&gt;&lt;br /&gt;3. Load kernel&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; Load kernel into memory&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; Detect hardware and load the driver&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; pass control on to the kernel &lt;br /&gt;&lt;br /&gt;4. Kernel init task&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; Establish memory management&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; detects the type of CPU&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; any additional functionality&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;5. Run the /sbin/init program&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; system check&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; verify the integrity of the file systems&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; start vital programs for operating system to function properly.&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; Inspects the /etc/inittab file to determine operation mode or runlevel&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; launch process depend on runlevel&lt;br /&gt;&lt;br /&gt;6. System initialization&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;gt; run /etc/rc.d/rc.sysinit&lt;br /&gt;&lt;br /&gt;7. Init run level service&lt;br /&gt;&lt;br /&gt;8. Init run file in /etc/rc.d/rc.local&lt;br /&gt;&lt;br /&gt;9. Init prepare login environment and wait user login&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6824480720440438287?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6824480720440438287/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/12/linux-bootup-process.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6824480720440438287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6824480720440438287'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/12/linux-bootup-process.html' title='Linux Bootup Process'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-3060931273072499526</id><published>2009-12-15T09:53:00.000+08:00</published><updated>2009-12-15T09:53:58.666+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Linux的各種Distribution分析</title><content type='html'>&lt;span style="line-height: 26px; text-indent: 0px;"&gt;ref.: http://www.lawtw.com/article.php?template=article_content&amp;amp;parent_path=,1,777,&amp;amp;article_category_id=817&amp;amp;job_id=4602&amp;amp;article_id=4565&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 26px; text-indent: 0px;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 26px; text-indent: 0px;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="line-height: 26px; text-indent: 0px;"&gt;Redhat==Linux忠實擁護著==半封閉式的Open Source &lt;br /&gt;&lt;br /&gt;台 灣目前沒有自行研發的Linux Distribution，根據調查，使用率最高的是RedHat Linux，引用國內Linufab的調查資料所知，使用Linux的人52%都使用Redhat，因此Redhat相對性的應用性產品最多，其中 RedHat所研發出來的RPM套件機制更是廣泛被各大Linux Distribution所使用，但是事實上RedHat並非是最好的Distribution，因為其在軟體的安裝上需要各軟體套件高度的相依性 (package dependence)：，常造成一般使用著極大的困擾〈可以參考以下網址http://pc510.ev.ncku.edu.tw/~vbird /linux_redhat7.2/37command_5rpmtarball.html〉，且由於RedHat內含了非標準的系統核心修補程式，這會 讓使用者自行設定系統的時候遇到困難，支援RedHat的軟體不管是商業或非商業軟體最多，這當然是其他Distribution所比不上的優勢。還有一 點就是台灣的非營利性組織CLE專門針對RedHat做繁體中文化的工作。更重要的是當你遇到問題能夠替你解決問題的人也越多。 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Mandrake===新手的Linux==全開放式的Open Source &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Linux Mandrake 發行套件是由 MandrakeSoft 公司所發行的。該公司是在一九九八年由一群 Linux 狂熱者所共同組成，並且努力朝向讓 Linux 易於使用的目標前進。為了達到這個目標，Mandrake 提供了一個極佳的圖形介面安裝程式。 &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Mandrake是這一年來最紅的Linux Distribution，其標榜的就是可以跟視窗比美的簡易安裝過程，安裝的過程是所有的Distribution中最容易安裝且最容易做系統多重分割 的喔，而且畫面也最精緻，也許跟這Distribution是法國人發明的原因，所以多了一點法國人的浪費，除此之外他的中文化也做得最 好，Mandrake 著重卓面用戶，在安裝及使用上比較簡單，及採用比較多圖形介面，所以對於新手來說是一個不錯的選擇，如果你是想使用Mandrake作為替代 Windows的系統，推薦你使用Mandrake，但是由於Mandrake是根據RedHat作修改，因此RedHat的缺點Mandrake不只 有，Mandrake更是把它發揚光大，比如rpm的問題，沒有辦法很好的處理隨插即用ISA卡。不過由於它是屬於全開放式的Open Source Liinux ，所以它的軟體研發跟更新速度是非常的快。 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Debian==進階的LInux==穩定性的Open Source &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Debian 於一九九三年八月十六日誕生，主要是希望能提供一個穩定且無問題的 Linux Distribution。Debian 並無企業的支持，完全是由很多的研發人員自行研發，Debian出名在於其穩定性，主要是由於其利用了外掛認證模組讓眾多的研發人員可以處理軟體認證的問 題，也相對的保障了Debian的穩定性。 &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;問題在於Debian完全是純文字安裝介面，初學著不適合使用這Distribution，甚至連分割都只有類似fdisk的工具，無法自動分割，因此 Debian實在不適合初學著使用，而且由於其講求穩定性，因此該Distribution的核心跟軟體總是比較舊。提到Debian就要提到其最著名的 更新軟體==APT，這軟體是由Debian所研發，其最突出的功能就是能夠非常完整的解決RPM相依性和更新軟體的問題，這軟體能夠良好的解決各 Linux Distribution軟體的安裝和更新問題。 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Suse==歐洲的LInux==良好的系統架構跟資料庫 &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;提到歐洲的Linux Distribution，RedHat根本不夠看，Susse才是大哥大，SuSe是由德國S.u.S.E. Gmbh於五年前開始發展S.u.S.E. Linux 4.2 是其第一個Distribution，SuSe的優點在於其跟很多的資料庫大廠甲骨文以及 IBM 這類資料庫廠商達成合作夥伴關係，讓他們的資料庫產品能夠在 SuSE Linux 發行套件上面順暢地運作，因此其穩定性跟強調資料庫的特性讓其在歐洲極受歡迎，Debian」的軟體資料庫應該說是是眾家Linux中最完整的，從來源、 作者、ftp、www、patch、管理者都有詳細的記錄，安裝系統也考慮的比RPM來得週到，許多的Distribution都會借用Debian系統 設計的觀念，「Debian」提供「Intel」、「Alpha」、「Motorola 68K」、「Sun SPARC」等眾多版本；此外也正在對「ARM」、「MIPS」、「Sun UltraSPARC」、「GNU Hurd」、「Beowulf」做支援，不僅系統穩定支援也多，對於XWindows的支援也有它的一套。 「Debian」使用族群主要在Linux的進階族群，商業氣息目前不高，銷量並不像其它Distribution那麼好，但其潛在商業價值非常地高。 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;OpenLinux==Caldera完全封閉極度商業化 Open Sources &lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;唯一有在台灣設立分公司的 Linux開發公司，這個月宣佈Caldera OpenLinux 將更改為 SCO Linux powered by UnitedLinux ，Caldera Open Unix 將更改為 SCO UnixWare ，Caldera 夥伴計劃更改為 TeamSCO ，Caldera 全球服務更改為 SCO 全球服務，同時提供Linux 跟 Unix服務。 &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;OpenLinux在台灣推廣最為積極，不僅設立公司而且跟翔威資訊還有聯成電腦合作開發認證課程合作，因此有不少的公司採用該系統，不過由於該公司採 用封閉式的方式開發Open Linux所以軟體跟核心的更新速度極漫，不是很受開放性社群的歡迎，但是由於其封閉式的特性使得該公司對於核心的掌握跟軟體的穩定性提供了極佳的保障， 這也是為何它是除了RedHat外賣得最好的Distribution。 &lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-3060931273072499526?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/3060931273072499526/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/12/linuxdistribution.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3060931273072499526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/3060931273072499526'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/12/linuxdistribution.html' title='Linux的各種Distribution分析'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-7274867798320282658</id><published>2009-12-01T09:42:00.000+08:00</published><updated>2009-12-01T16:45:25.737+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Cache 50 Windows logins for better availability (快取的網域登入資訊)</title><content type='html'>ref.: http://support.microsoft.com/kb/172931 &lt;br /&gt;&lt;br /&gt;快取 Windows 記憶體前一個使用者的登入資訊在本機，以便如果在更新登入嘗試時無法使用登入伺服器，它們可以登入。 &lt;br /&gt;&lt;br /&gt;快取登入資訊由下列機碼控制:&lt;br /&gt;Windows Registry Editor Version 5.00&lt;br /&gt;&amp;nbsp; &lt;br /&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]&lt;br /&gt;"cachedlogonscount"="0 - 50"&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-7274867798320282658?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/7274867798320282658/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/11/cache-50-windows-logins-for-better.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7274867798320282658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7274867798320282658'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/11/cache-50-windows-logins-for-better.html' title='Cache 50 Windows logins for better availability (快取的網域登入資訊)'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4794447229374588771</id><published>2009-11-25T14:06:00.000+08:00</published><updated>2010-01-18T17:02:51.491+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Virtualization - VMLite XP Mode</title><content type='html'>ref.: &lt;a href="http://www.vmlite.com/index.php/products/vmlite-xp-mode"&gt;http://www.vmlite.com/index.php/products/vmlite-xp-mode&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Provides similar functions as Virtual PC and Windows XP Mode from Microsoft&lt;/li&gt;&lt;li&gt;No requirement for hardware-assisted virtualization, namely, it runs without VT-x or AMD-v&lt;/li&gt;&lt;li&gt;Provides seamless integration&amp;nbsp;with host desktop to run applications from&amp;nbsp;Windows XP virtual machine&lt;/li&gt;&lt;li&gt;Host files can be accessed from within the XP Mode virtual machine easily&lt;/li&gt;&lt;li&gt;Control-C/V can be used to copy files and other contexts between host and vm, between different vms.&lt;/li&gt;&lt;li&gt;Support 3rd party virtual machine images: VMDK, VHD, VDI, HDD&lt;/li&gt;&lt;li&gt;Runs on any PC with Windows&amp;nbsp;XP and above as host operating systems&lt;/li&gt;&lt;li&gt;Highly performed, XP Mode boots in&amp;nbsp;20 seconds&lt;/li&gt;&lt;li&gt;Supports XP, Vista, Windows 7, 2003 server, 2008 server as guest, for example, you can run&amp;nbsp;Windows 7&amp;nbsp;on XP to have similar integration features&lt;/li&gt;&lt;li&gt;Supports Virtual Application Mode - if you start a vm application from host Start menu, this program is launched within a special context, called "Virtual Application Mode", where My Documents, My Desktop, and other special shell folders will be redirected to the host. For example, if you launch XP Mode Word from host Start menu, you will see green borders, and when you save a new document to My Documents, it will be actually saved to your host My Documents folder.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4794447229374588771?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4794447229374588771/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/11/virtualization-vmlite-xp-mode.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4794447229374588771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4794447229374588771'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/11/virtualization-vmlite-xp-mode.html' title='Virtualization - VMLite XP Mode'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-2489195123150512016</id><published>2009-11-07T13:44:00.001+08:00</published><updated>2009-11-07T13:44:01.212+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Ubuntu pppoe dialup problem with Network Manager</title><content type='html'>Step1: ensure eth is ready&lt;br /&gt;Step2: &gt;sudo service network-manager stop&lt;br /&gt;Step3: &gt;sudo pppoeconf&lt;br /&gt;Step4(optional): add nameserver to /etc/resolv.conf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-2489195123150512016?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/2489195123150512016/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/11/ubuntu-pppoe-dialup-problem-with.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2489195123150512016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2489195123150512016'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/11/ubuntu-pppoe-dialup-problem-with.html' title='Ubuntu pppoe dialup problem with Network Manager'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1071109849321842956</id><published>2009-11-03T17:25:00.001+08:00</published><updated>2009-11-03T17:26:18.865+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='troubleshoot'/><title type='text'>Mozilla Firefox &amp; Thunderbird remove master password</title><content type='html'>Method 1: Go to Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\xxxxxxx.default and rename key3.db to key3.db.bak&lt;br /&gt;&lt;br /&gt;Method 2: run the url chrome://pippki/content/resetpassword.xul and press the reset buttom.&lt;br /&gt;For thunderbird, you can evaluate the url in Tools&amp;gt;Error console.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1071109849321842956?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1071109849321842956/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/11/mozilla-firefox-thunderbird-remove.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1071109849321842956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1071109849321842956'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/11/mozilla-firefox-thunderbird-remove.html' title='Mozilla Firefox &amp;amp; Thunderbird remove master password'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4662783164916842685</id><published>2009-10-01T16:01:00.001+08:00</published><updated>2009-10-01T16:01:53.869+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>IDS vs. IPS Explained</title><content type='html'>Layered security is the key to protecting any size network, and for most companies, that means deploying both intrusion detection systems (IDS) and intrusion prevention systems (IPS). When it comes to IPS and IDS, it?s not a question of which technology to add to your security infrastructure ? both are required for maximum protection against malicious traffic. In fact, vendors are increasingly combining the two technologies into a single box.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;IDS&lt;/strong&gt;&lt;br /&gt;At its most basic, an IDS device is passive, watching packets of data traverse the network from a monitoring port, comparing the traffic to configured rules, and setting off an alarm if it detects anything suspicious. An IDS can detect several types of malicious traffic that would slip by a typical firewall, including network attacks against services, data-driven attacks on applications, host-based attacks like unauthorized logins, and malware like viruses, Trojan horses, and worms. Most IDS products use several methods to detect threats, usually signature-based detection, anomaly-based detection, and stateful protocol analysis.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;IPS&lt;/strong&gt;&lt;br /&gt;At its most basic, an IPS has all the features of a good IDS, but can also stop malicious traffic from invading the enterprise. Unlike an IDS, an IPS sits inline with traffic flows on a network, actively shutting down attempted attacks as they?re sent over the wire. It can stop the attack by terminating the network connection or user session originating the attack, by blocking access to the target from the user account, IP address, or other attribute associated with that attacker, or by blocking all access to the targeted host, service, or application.&lt;br /&gt;&lt;br /&gt;In addition, an IPS can respond to a detected threat in two other ways. It can reconfigure other security controls, such as a firewall or router, to block an attack. Some IPS devices can even apply patches if the host has particular vulnerabilities. In addition, some IPS can remove the malicious contents of an attack to mitigate the packets, perhaps deleting an infected attachment from an email before forwarding the email to the user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4662783164916842685?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4662783164916842685/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/10/ids-vs-ips-explained.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4662783164916842685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4662783164916842685'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/10/ids-vs-ips-explained.html' title='IDS vs. IPS Explained'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1875105780035576906</id><published>2009-09-29T10:34:00.000+08:00</published><updated>2009-09-29T10:34:35.976+08:00</updated><title type='text'>Setup Openssl + freeRADIUS</title><content type='html'>&lt;span style="color: red;"&gt;&lt;b&gt;&lt;span style="font-size: 14pt; line-height: 1.3em;"&gt;Openssl Ceritification Step&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Create ca certification by openssl&lt;br /&gt;&lt;b&gt;#cd /etc/ssl/&lt;br /&gt;#/usr/lib/ssl/misc/CA.pl -newca -- ubuntu directory&lt;/b&gt;&lt;br /&gt;or&lt;br /&gt;&lt;b&gt;#/usr/share/ssl/misc/CA.pl -newca -- opensuse directory&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;CA certificate filename (or enter to create)&lt;br /&gt;&lt;br /&gt;Making CA certificate ...&lt;br /&gt;Generating a 1024 bit RSA private key&lt;br /&gt;..........................++++++&lt;br /&gt;..........++++++&lt;br /&gt;writing new private key to './CA/private/cakey.pem'&lt;br /&gt;Enter PEM pass phrase: 12345&lt;br /&gt;Verifying - Enter PEM pass phrase: 12345&lt;br /&gt;-----&lt;br /&gt;You are about to be asked to enter information that will be incorporated&lt;br /&gt;into your certificate request.&lt;br /&gt;What you are about to enter is what is called a Distinguished Name or a DN.&lt;br /&gt;There are quite a few fields but you can leave some blank&lt;br /&gt;For some fields there will be a default value,&lt;br /&gt;If you enter '.', the field will be left blank.&lt;br /&gt;-----&lt;br /&gt;Country Name (2 letter code) [AU]:TW&lt;br /&gt;State or Province Name (full name) [Some-State]:Taipei&lt;br /&gt;Locality Name (eg, city) []:Taipei&lt;br /&gt;Organization Name (eg, company) [Internet Widgits Pty Ltd]:QMI&lt;br /&gt;Organizational Unit Name (eg, section) []:DQA&lt;br /&gt;Common Name (eg, YOUR name) []:rootca&lt;br /&gt;Email Address []:bryan.yu@qmitw.com&lt;br /&gt;&lt;br /&gt;Please enter the following 'extra' attributes&lt;br /&gt;to be sent with your certificate request&lt;br /&gt;A challenge password []: don't need to input&lt;br /&gt;An optional company name []: don't need to input&lt;br /&gt;Using configuration from /usr/lib/ssl/openssl.cnf&lt;br /&gt;Using configuration from /usr/share/ssl/openssl.cnf&lt;br /&gt;Enter pass phrase for ./demoCA/private/cakey.pem: 12345&lt;br /&gt;&lt;br /&gt;Check that the request matches the signature&lt;br /&gt;Signature ok&lt;br /&gt;Certificate Details:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial Number:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 91:23:c3:97:8a:c5:d8:e5&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Validity&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Not Before: Mar 17 14:38:09 2008 GMT&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Not After : Mar 17 14:38:09 2011 GMT&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Subject:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; countryName&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= TW&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stateOrProvinceName&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= LinKou&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; organizationName&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = QMI&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; organizationalUnitName&amp;nbsp; &amp;nbsp; = DQA&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; commonName&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = rootca&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; emailAddress&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &lt;a href="mailto:bryan.yu@qmitw.com"&gt;bryan.yu@qmitw.com&lt;/a&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509v3 extensions:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509v3 Subject Key Identifier: &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FF:DA:F6:63:4E:6F:20:16:85:BC:CE:E4:6E:EA:17:48:B5:DE:87:25&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509v3 Authority Key Identifier: &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keyid:FF:DA:F6:63:4E:6F:20:16:85:BC:CE:E4:6E:EA:17:48:B5:DE:87:25&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DirName:/C=TW/ST=LinKou/O=QMI/OU=DQA/CN=rootca/emailAddress=&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href="mailto:bryan.yu@qmitw.com"&gt;bryan.yu@qmitw.com&lt;/a&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serial:91:23:C3:97:8A:C5:D8:E5&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; X509v3 Basic Constraints: &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CA:TRUE&lt;br /&gt;Certificate is to be certified until Mar 17 14:38:09 2011 GMT (1095 days)&lt;br /&gt;&lt;br /&gt;Write out database with 1 new entries&lt;br /&gt;Data Base Updated&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;2. Let's start to create a server certificate signing request using OpenSSL's req command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#openssl req -new -nodes -keyout server_key.pem -out server_req.pem -days 730 -config ./openssl.cnf&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;3. Next step, let's use our CA key to sign the request by using OpenSSL's ca command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#openssl ca -config ./openssl.cnf -policy policy_anything -out server_cert.pem -infiles ./server_req.pem&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;4. Open your signed certificate with the text editor ( example: vi ) of your choice and delete everything before the line -----BEGIN CERTIFICATE-----. Concatenate it and your key into a single file, like this: &lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cat server_key.pem server_cert.pem &amp;gt; server_keycert.pem&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;5. We need to create a client certificate signing request now. The OpenSSL command to do this is similar to that used to create server certificates:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#openssl req -new -keyout client_key.pem -out client_req.pem -days 730 -config ./openssl.cnf&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;6. Next step -- we sign the client certificate's signing request:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#openssl ca -config ./openssl.cnf -policy policy_anything -out client_cert.pem -infiles ./client_req.pem&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;7. If your certificate is to be used by Windows XP or Vista client, you need to do one more step.&lt;br /&gt;You need to convert the certificate file(s) to a PKCS12-format file, with this command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#openssl pkcs12 -export -in client_cert.pem -inkey client_key.pem -out client_cert.p12 -clcerts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;8. Before we dive into FreeRADIUS' configuration files, we need to create two files that FreeRADIUS must have in order to use TLS. The first is a Diffie-Hellman parameters file, or dh file, which is used for negotiating TLS session keys. To create a dh file, issue this command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#openssl dhparam -check -text -5 512 -out dh&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;9. The second file you need is a data file that contains a random bitstream that also is used in TLS operations. Do not simply stick the current timestamp or any other similarly nonrandom string into a file called random, as is suggested in at least one WPA procedure I've seen on the Internet. Rather, use the kernel's high-quality random number generator. Run this command:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#dd if=/dev/urandom of=random count=2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;b&gt;&lt;span style="font-size: 14pt; line-height: 1.3em;"&gt;FreeRadius Configuration Step&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Check permission of radius directory and then modify parameter what you need in radiusd.conf&lt;br /&gt;&lt;b&gt;#cd /etc/raddb/&lt;br /&gt;#vi radiusd.conf&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;2. Changes in eap.conf&lt;br /&gt;&lt;br /&gt;eap {&lt;br /&gt;&amp;nbsp; default_eap_type = tls&lt;br /&gt;&amp;nbsp; tls {&lt;br /&gt;&amp;nbsp; &amp;nbsp; # The following parameters tell radiusd where to&lt;br /&gt;&amp;nbsp; &amp;nbsp; # find its certs and keys, plus dh &amp;amp; random files:&lt;br /&gt;&amp;nbsp; &amp;nbsp; private_key_password = 12345&lt;br /&gt;&amp;nbsp; &amp;nbsp; private_key_file = /etc/ssl/server_keycert.pem&lt;br /&gt;&amp;nbsp; &amp;nbsp; certificate_file = /etc/ssl/server_keycert.pem&lt;br /&gt;&amp;nbsp; &amp;nbsp; CA_file = /etc/ssl/CA/cacert.pem&lt;br /&gt;&amp;nbsp; &amp;nbsp; dh_file = /etc/ssl/dh&lt;br /&gt;&amp;nbsp; &amp;nbsp; random_file = /etc/ssl/random&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;3. Access Point Entry in clients.conf&lt;br /&gt;&lt;br /&gt;client 192.168.1.1/32 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; secret&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = 12345678&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; shortname&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= test ap&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Configuring Windows XP Clients Step&lt;br /&gt;&lt;br /&gt;And that brings us to configuring a Windows XP wireless client to use your newly WPA-enabled access point. This being a Linux magazine, I'm not going to describe this process in painstaking detail-for that you can see section 4.3 of Ken Roser's HOWTO, listed in the on-line Resources. In summary, you need to:&lt;br /&gt;&lt;br /&gt;1. Run the command mmc from Start --&amp;gt; Run&lt;br /&gt;&lt;br /&gt;2. In Microsoft Management Console, select File?Add/Remove Snap-in, add the Certificates snap-in and set it to manage certificates for My user account and, on the next screen, only for the Local computer.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;3. Copy your CA (cacert.pem) certificate to your Windows system's hard drive, for example, to C:\cacert.pem.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;4. From within MMC, expand Console Root and Certificates - Current User and right-click on Trusted Root Certification Authorities. In the pop-up menu, select All Tasks--&amp;gt;Import. Tell the subsequent wizard to import the file C:\cacert.pem and to store it in Trusted Root Certification Authorities.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;5. Copy your client certificate/key file to your Windows system, for example, to C:\client_cert.p12.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;6. From within MMC?Console Root?Certificates, expand Personal and right-click on Certificates. In the pop-up menu, select All Tasks--&amp;gt;Import. Tell the subsequent wizard to import the file C:\client_cert.p12.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;7. The certificate-import wizard then prompts you for the certificate's passphrase. In the same dialog, it offers the option to enable strong private key protection. Unfortunately, enabling this breaks WPA, so be sure to leave this option unchecked. Also, leave the option to mark this key as exportable unchecked--you're better off backing up the password-protected file you just imported rather than allowing the imported nonprotected version to be exportable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1875105780035576906?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1875105780035576906/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/setup-openssl-freeradius.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1875105780035576906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1875105780035576906'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/setup-openssl-freeradius.html' title='Setup Openssl + freeRADIUS'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-2638943263914855420</id><published>2009-09-24T23:17:00.000+08:00</published><updated>2009-09-25T12:23:27.516+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>RADIUS Issues</title><content type='html'>&lt;b&gt;Response authenticator based Shared Secret Attack&lt;/b&gt;&lt;br /&gt;Attacker observes a valid access request packet and the associated return packet(access-accept/access-reject packet), then launch offline exhaustive attack on the shared secret.&lt;br /&gt;They can &lt;span style="color: red;"&gt;guess shared secret by pre-compute MD5(Code+ID+length+RequestAuth+Attributes) and resume the hash once.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;User-Password Attribute Based Shared Secret Attack&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;Attacker observes the traffic and try to &lt;span style="color: red;"&gt;authenticate to client with a known password,&lt;/span&gt; and capture the resulting Access-Request packet and &lt;span style="color: red;"&gt;XOR the User-password attribute with the password they provided to client&lt;/span&gt;. This results in the value of &lt;span style="color: red;"&gt;MD5(S+RA)&lt;/span&gt;. RA is known in the client request packet, so attacker can launch &lt;span style="color: red;"&gt;offline exhaustive attack&lt;/span&gt; to get shared secret.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;User-Password Based Password Attack&lt;/b&gt;&lt;br /&gt;As the previous attack method, attacker can&lt;span style="color: red;"&gt; get the value of MD5(S+RA),&lt;/span&gt; and replay the modified access request packet as &lt;span style="color: red;"&gt;pretending a client&lt;/span&gt;. If server dosen't impose user based rate limits, this will allow the attacker to get the correct password.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Request Authenticator Based Attacks&lt;/b&gt;&lt;br /&gt;The security of RADIUS depends on the generation of the RA(Request Authenticator)&amp;nbsp; field, but a lot of implementations using poor PRNG(pseudo random number generation) to generate the RA.  If the client uses a PRNG that repeats values (or has a short cycle), the protocol ceases to provide the intended level of protection.&lt;br /&gt;&lt;br /&gt;These attacks require the attacker to cause client to produce a particular identifier value. An attacker can insert a series of extra requests to the client, forcing the desired identifier. Even if the identifier were not generated in a readily attackable way, it would still only increase the work factor by 256 times.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Passive User-Password Compromise Through Repeated Request Authenticator&lt;/b&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Build dictionary RA--User Password Attribure&lt;/span&gt; &lt;br /&gt;If the attacker can sniff the traffic between the RADIUS client and the RADIUS server, they can passively produce a dictionary of Request Authenticators, and the associated (protected) User-Password attributes. If the attacker observes a repeated Request Authenticator, they can remove any influence of the Shared Secret from the first 16 octets of the passwords by XORing the first 16 octets of the protected passwords together.  This yields the first 16 octets of the two (now unprotected) user passwords XORed together.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Active User-Password Compromise through Repeated Request Authenticators&lt;/b&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Build dictionary RA--MD(S+RA)&lt;/span&gt; &lt;br /&gt;Attacker authenticate many times using known passwords and intercept the generated Access-Request packets, extracting the RA and user-password attribute. Then XOR the known password with user-password attribute and be left with the MD5(S+RA) value. Finally, the attacker generates a dictionary of RA and associated MD5(S+RA) value.&lt;br /&gt;Attacker can use this dictionary(RA--MD(S+RA)) to recover the first 16 octets from the protected region of the user password, since c1=p1 XOR MD5(S+RA).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Replay of Server Responses through Repeated Request Authenticators&lt;/b&gt;&lt;br /&gt;&lt;div style="color: red;"&gt;Using dictionary RA--ID--associate server response&lt;br /&gt;&lt;/div&gt;Attacker observe the client request, check RA and ID from the dictionary, then pretend as server the return the associate response to client.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DOS arising from the prediction of the Request Authenticators&lt;/b&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Build dictionary predict RA values and associated server response&lt;/span&gt;, then response the client's valid request with access-reject packets, implement DOS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-2638943263914855420?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/2638943263914855420/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/radius-issues.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2638943263914855420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/2638943263914855420'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/radius-issues.html' title='RADIUS Issues'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6692092329625582519</id><published>2009-09-24T12:34:00.000+08:00</published><updated>2009-09-25T10:59:26.491+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>RADIUS authentication procedure</title><content type='html'>&lt;div style="background-color: white;"&gt;&lt;b&gt;RADIUS packet&lt;/b&gt; is below (from the RFC): &lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style="background-color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;0                   1                   2                   3&lt;br /&gt;0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1&lt;br /&gt;+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;|     Code      |  Identifier   |            Length             |&lt;br /&gt;+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;|                                                               |&lt;br /&gt;|                         Authenticator                         |&lt;br /&gt;|                                                               |&lt;br /&gt;|                                                               |&lt;br /&gt;+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&lt;br /&gt;|  Attributes ...&lt;br /&gt;+-+-+-+-+-+-+-+-+-+-+-+-+-&lt;/pre&gt;&lt;pre style="background-color: white;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;ul style="background-color: white;"&gt;&lt;li&gt; The code establishes the type of RADIUS packet.  The codes are: &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table align="center" border="1" style="background-color: white;"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;Value&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;Description&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;1 &lt;br /&gt;&lt;/td&gt;  &lt;td&gt;Access-Request&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;2 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Access-Accept&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;3 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Access-Reject&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;4 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Accounting-Request&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;5 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Accounting-Response&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;11 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Access-Challenge&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;12 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Status-Server (experimental)&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;13 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Status-Client (experimental)&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;255 &lt;br /&gt;&lt;/td&gt; &lt;td&gt;Reserved&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;ul style="background-color: white;"&gt;&lt;li&gt;&amp;nbsp;&lt;span style="background-color: white; font-family: Arial,Helvetica,sans-serif;"&gt;The identifier is a one octet value that allows the RADIUS client to match a RADIUS response with the correct outstanding request. &lt;/span&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;it is usually implemented as a simple counter that is incremented for each request.&lt;/span&gt;&lt;/li&gt;&lt;li&gt; &lt;span style="background-color: white;"&gt;The attributes section is where an arbitrary number of attribute fields are stored. The only pertinent attributes for this discussion are the User-Name and User-Password attributes.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div style="background-color: white;"&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Initial client processing&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;span style="background-color: white;"&gt;The client creates an Access-Request RADIUS packet, including at least &lt;/span&gt;the User-Name and User-Password attributes.&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;The Access-Request packet's identifier field is generated by the client.&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;The Access-Request packet contains a 16 octet Request Authenticator in the authenticator field.  This Request authenticator is a randomly chosen 16 octet string.&amp;nbsp;  &lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;This packet is completely unprotected, except for the User-Password attribute, which is protected as follows:&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;c1 = p1 XOR MD5(S + RA)&lt;br /&gt;c2 = p2 XOR MD5(S + c1)&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;cn = pn XOR MD5(S + cn-1)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;The User-Password attribute contains &lt;b&gt;c1+c2+...+cn&lt;/b&gt;, Where + denotes concatenation.&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;Here S is shared secret in server or client, RA is psuedo-random 128bit request authenticator, p1,p2 and so on is 16 octet block by breaking the password &lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;b&gt;Server processing&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;ul&gt;&lt;li style="color: red;"&gt;Extract the username and password using the same shared secret&lt;/li&gt;&lt;li style="color: red;"&gt;Validate the account&lt;/li&gt;&lt;li&gt;&lt;span style="color: red;"&gt;Compute response authenticator which is MD5(code+ID+Length+RequestAuth+Attribute+secret), and send back the response packet to client&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The server receives the RADIUS Access-Request packet and verifies the packet with shared secret first, it can go through a slightly modified version of the client's protection process on the User-Password attribute and obtain the unprotected password. It then uses its authentication database to validate the username and password. If the password is valid, the server creates an Access-Accept packet to send back to the client, otherwise, send back with Access-Reject packet. Both the Access-Accept packet and the Access-Reject packet use the same identifier value from the client's Access-Request packet, and put a Response Authenticator in the Authenticator field. The response authenticator = MD5(Code+ID+Length+RequestAuth+Attributes+Secret)&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;b&gt;Client post processing&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;ul&gt;&lt;li style="color: red;"&gt;Match ID&lt;/li&gt;&lt;li style="color: red;"&gt;Compute the Response Authenticator as the server performed&lt;/li&gt;&lt;li&gt;&lt;span style="color: red;"&gt;Check the code field for the result&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;When the client receives a response packet, it attempts to match it with an outstanding request using the identifier field, then verifies the Response Authenticator by performing the same Response Authenticator calculation the server performed, and then comparing the result with the Authenticator field.&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;If the client received a verified Access-Accept packet, the username and password are considered to be correct, and the user is authenticated.&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: white;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6692092329625582519?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6692092329625582519/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/radius-authentication-procedure.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6692092329625582519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6692092329625582519'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/radius-authentication-procedure.html' title='RADIUS authentication procedure'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-4404376575926999341</id><published>2009-09-22T21:36:00.000+08:00</published><updated>2009-09-22T21:36:41.468+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Linux - Ubuntu general shortcut</title><content type='html'>&lt;b&gt;&lt;span style="font-size: small;"&gt;General keyboard shortcuts&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl+A&lt;/b&gt; = Select all (In Documents, Firefox, Nautilus, etc, not Terminal) &lt;br /&gt;&lt;b&gt;Ctrl+C&lt;/b&gt; = Copy (In Documents, Firefox, Nautilus, etc, not Terminal) &lt;br /&gt;&lt;b&gt;Ctrl+V&lt;/b&gt; = Paste (In Documents, Firefox, Nautilus, etc, not Terminal) &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl+N&lt;/b&gt; = New (Create a new document, not in terminal)&lt;br /&gt;&lt;b&gt;Ctrl+O&lt;/b&gt; = Open (Open a document,  not in terminal)&lt;br /&gt;&lt;b&gt;Ctrl+S&lt;/b&gt; = Save (Save the current document,  not in terminal)&lt;br /&gt;&lt;b&gt;Ctrl+P&lt;/b&gt; = Print (Print the current document,  not in terminal)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl+E&lt;/b&gt; = Send To... (Send the current document to an email recipient or remote location,  not in terminal)&lt;br /&gt;&lt;b&gt;Ctrl+W&lt;/b&gt; = Close (Close the current document,  not in terminal)&lt;br /&gt;&lt;b&gt;Ctrl+Q&lt;/b&gt; = Quit (Quit the application, not in terminal)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl + Alt + F1&lt;/b&gt; = Switch to the first virtual terminal&lt;br /&gt;&lt;b&gt;Ctrl + Alt + F2(F3)(F4)(F5)(F6)&lt;/b&gt; = Select the different virtual terminals &lt;br /&gt;&lt;b&gt;Ctrl + Alt + F7&lt;/b&gt; = Switch to current terminal session with X&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl+Alt++&lt;/b&gt; = Switch to next X resolution (Depends of your X configuration)&lt;br /&gt;&lt;b&gt;Ctrl+Alt+-&lt;/b&gt; = Switch to previous X resolution (Depends of your X configuration)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl + Alt + Backspace&lt;/b&gt; = Kill X server&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Alt+Tab&lt;/b&gt; = Switch between open programs&lt;br /&gt;&lt;b&gt;Printscrn&lt;/b&gt; = Print sreen&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Command line / Terminal shortcuts&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl+C&lt;/b&gt; = Kill process (Kill the current process in terminal, also used to copy elsewhere)&lt;br /&gt;&lt;b&gt;Ctrl+Z&lt;/b&gt; = Send process to background&lt;br /&gt;&lt;b&gt;Ctrl+D&lt;/b&gt; = Log out from the current terminal. In X, this may log you out after  a shuting down the emulator.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl+A&lt;/b&gt; = Home (Move cursor to beginning of line)&lt;br /&gt;&lt;b&gt;Ctrl+E&lt;/b&gt; = End (Move cursor to end of line)&lt;br /&gt;&lt;b&gt;Tab&lt;/b&gt; = List available commands from typed letters (Ex: type iw and click tab, output = iwconfig iwevent iwgetid iwlist iwpriv iwspy)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ctrl+U&lt;/b&gt; = Delete current line&lt;br /&gt;&lt;b&gt;Ctrl+K&lt;/b&gt; = Delete current line from cursor&lt;br /&gt;&lt;b&gt;Ctrl+W&lt;/b&gt; = Delete word before cursor in terminal (Terminal only, also used to close the current document elsewhere)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Arrows up and down&lt;/b&gt; = Browse command history&lt;br /&gt;&lt;b&gt;Ctrl+R&lt;/b&gt; = History search (Finds the last command matching the letters you type)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Shift+PageUp / PageDown&lt;/b&gt; = Scroll terminal output&lt;br /&gt;&lt;b&gt;Ctrl+L&lt;/b&gt; = Clears terminal output&lt;br /&gt;&lt;b&gt;Shift+insert&lt;/b&gt; = Paste&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Create a custom keyboard shortcut&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Method1: &lt;/b&gt;&lt;br /&gt;&lt;b style="font-weight: normal;"&gt;shell&amp;gt;sudo&amp;nbsp;&lt;/b&gt; apt-get install xbindkeys&lt;br /&gt;&lt;b style="font-weight: normal;"&gt;shell&amp;gt;&lt;/b&gt;sudo apt-get install xbindkeys-config&lt;br /&gt;&lt;b style="font-weight: normal;"&gt;shell&amp;gt;xbindkeys&lt;/b&gt;&lt;br /&gt;&lt;b style="font-weight: normal;"&gt;shell&amp;gt;xbindkeys-config&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="font-weight: normal;"&gt;&lt;b&gt;Method2&lt;/b&gt;:&amp;nbsp;&lt;/b&gt;&lt;b&gt;&lt;b style="font-weight: normal;"&gt; &lt;/b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Using metacity (the default GNOME window manager)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;1&lt;/span&gt;&lt;/b&gt;- Open GConf editor (Applications -&amp;gt; System Tools -&amp;gt; Configuration Editor), go to apps -&amp;gt; metacity -&amp;gt; keybinding_commands, and now choose a command, for my example I choose command_1. Edit command_1 writing xkill in order to run xkill (or every command you want to launch like in a terminal).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;2&lt;/span&gt;&lt;/b&gt;- In the same directory go to global_keybindings. Edit command_1 (or the command you choose in part 1) with the wanted shortcut like that : &lt;alt&gt;a (to use the windows key just edit the field with &lt;b&gt;Super_L&lt;/b&gt;)&lt;b&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/alt&gt;&lt;br /&gt;&lt;br /&gt;ref.:&lt;br /&gt;http://ubuntuforums.org/showthread.php?t=50794&lt;br /&gt;http://ubuntuforums.org/showthread.php?t=79560&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-4404376575926999341?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/4404376575926999341/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/linux-ubuntu-general-shortcut.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4404376575926999341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/4404376575926999341'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/linux-ubuntu-general-shortcut.html' title='Linux - Ubuntu general shortcut'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-5914144439373757837</id><published>2009-09-20T22:18:00.000+08:00</published><updated>2009-09-20T22:19:41.712+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cisco'/><category scheme='http://www.blogger.com/atom/ns#' term='router'/><category scheme='http://www.blogger.com/atom/ns#' term='ospf'/><title type='text'>OSPF</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_97fjjXSzM0M/SrYzTg-i6lI/AAAAAAAAAOI/gzcElUAdDQE/s1600-h/OSPF_msg_hello.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_97fjjXSzM0M/SrYzOrK8XCI/AAAAAAAAAOA/RchYyywTwCw/s1600-h/OSPF_msg.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_97fjjXSzM0M/SrYzOrK8XCI/AAAAAAAAAOA/RchYyywTwCw/s400/OSPF_msg.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Hello - Hello packets are used to establish and maintain adjacency with other OSPF routers. The hello protocol is discussed in detail in the next topic. &lt;br /&gt;&lt;br /&gt;2. DBD - The Database Description (DBD) packet contains an abbreviated list of the sending router's link-state database and is used by receiving routers to check against the local link-state database. &lt;br /&gt;&lt;br /&gt;3. LSR - Receiving routers can then request more information about any entry in the DBD by sending a Link-State Request (LSR). &lt;br /&gt;&lt;br /&gt;4. LSU - Link-State Update (LSU) packets are used to reply to LSRs as well as to announce new information. LSUs contain seven different types of Link-State Advertisements (LSAs). LSUs and LSAs are briefly discussed in a later topic.&lt;br /&gt;&lt;br /&gt;5. LSAck - When an LSU is received, the router sends a Link-State Acknowledgement (LSAck) to confirm receipt of the LSU.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_97fjjXSzM0M/SrYzTg-i6lI/AAAAAAAAAOI/gzcElUAdDQE/s1600-h/OSPF_msg_hello.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_97fjjXSzM0M/SrYzTg-i6lI/AAAAAAAAAOI/gzcElUAdDQE/s400/OSPF_msg_hello.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OSPF router initial procedure&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Sending Hello packets on all OSPF-enabled interfaces to determine if there are any neighbors on those links. OSPF Hello packets are sent as multicast to an address reserved for ALLSPFRouters at 224.0.0.5 (By default, OSPF Hello packets are sent every 10 seconds on multiaccess and point-to-point segments and every 30 seconds on non-broadcast multiaccess (NBMA) segments (Frame Relay, X.25, ATM). )&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Before two routers can form an OSPF neighbor adjacency, they must agree on three values: Hello interval, Dead interval, and network type.&lt;/li&gt;&lt;li&gt;Send Link-state updates (LSUs) to advertise routing information. An LSU packet can contain 11 different types of Link-State Advertisements (LSAs).&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;LSA type: 1&amp;nbsp;&amp;nbsp;&amp;nbsp; Router LSAs&lt;/li&gt;&lt;li&gt;type 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Network LSAs&lt;/li&gt;&lt;li&gt;type 3 or 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Summary LSAs&lt;/li&gt;&lt;li&gt;type 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Autonomous System Extrenal LSAs&lt;/li&gt;&lt;li&gt;type 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Multicast OSPF LSAs&lt;/li&gt;&lt;li&gt;type 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Defined for Not-So-Stubby Areas&lt;/li&gt;&lt;li&gt;type 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; External Attributes LSA for BGP&lt;/li&gt;&lt;li&gt;type 9,10,11&amp;nbsp;&amp;nbsp; Opaque LSAs&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Each OSPF router maintains a link-state database containing the LSAs received from all other routers. Once a router has received all of LSAs and built its local link-state database. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;OSPF uses Dijkstra's shortest path first (SPF) algorithm to create an SPF tree.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The SPF tree is then used to populate the IP routing table with the best paths to each network.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-5914144439373757837?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/5914144439373757837/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/ospf.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5914144439373757837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/5914144439373757837'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/ospf.html' title='OSPF'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_97fjjXSzM0M/SrYzOrK8XCI/AAAAAAAAAOA/RchYyywTwCw/s72-c/OSPF_msg.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-6975490542021845284</id><published>2009-09-16T23:07:00.000+08:00</published><updated>2009-09-16T23:15:19.574+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cisco'/><category scheme='http://www.blogger.com/atom/ns#' term='eigrp'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='router'/><title type='text'>Eigrp - what happens after network command is issued</title><content type='html'>&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Here is EIGRP message&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_97fjjXSzM0M/SrEA0i_FnII/AAAAAAAAAN4/2NkMbjCDBgk/s1600-h/EIGRP_msg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_97fjjXSzM0M/SrEA0i_FnII/AAAAAAAAAN4/2NkMbjCDBgk/s400/EIGRP_msg.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;As soon as you configure network command on eigrp, following things happen in the given order:&lt;/span&gt;&lt;/div&gt;&lt;div style="color: red; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Step 1. Hellos are sent. &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: red; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Step 2. Receive Update.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: red; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Step 3. Run the dual and install the best route for the network learned in 2nd step.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: red; font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Step 4. Send update about that interface.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;An important observation here is that first of all, the above 4 steps are executed for directly connected networks.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;You must be knowing this..i guess..&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;But notice their order..&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Suppose there are two routers R1 and R2 connected via a serial link&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Suppose there is a fast ethernet on each of the router R1 and R2..&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Let the serial interfaces be named as R1S and R2S.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Let the fast ethernet interfaces be named as R1F and R2F&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;So R1 and R2 are connected via R1S and R2S...&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;As soon as u configure the network command, following things happen on Router R1..&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;a) Hello sent to R1F&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;b) Received update from R1F about that network&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;c) Run Dual and calculate the best path with the available data and feasible successor for the network learnt in step b. Enter the successor in routing table.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;So you see, although local networks are already in the routing table, yet DUAL recalculates the best path and recreate the routing table with that network ..&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;d) Send update about network of R1F&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;"" At this stage ROUTING TABLE IS CREATED ( With one fastethernet network )...although Hellos are YET TO BESENT TO serial interface R1S. """&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;e) Hello sent to R1S&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;f) Received update from R1S about that network&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;g) Run Dual and calculate the best path and feasible successor for the network learnt in step f. Enter the successor in routing table.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;h) Send update about network of R1S&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;After the above steps, neighbour adjancency is established with R2 if all the parameters are okay..&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;SO IT MEANS HELLOS ARE NOT IMMEDIATELY SENT ON ALL THE APPROPRIATE INTERFACES..&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;It is sent on one interface and then above 4 steps get executed in the above order.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Then hello is sent on 2nd interface and then again above 4 steps get executed in the given order.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;Similar process goes on for the other interfaces that are enabled for receiving and sending EIGRP updates.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;So routing table is created (though it is not complete) BEFORE hellos are sent out all the appropriate interfaces.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;ref.:https://cisco.hosted.jivesoftware.com/message/5596&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-6975490542021845284?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/6975490542021845284/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/eigrp-what-happens-after-network.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6975490542021845284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/6975490542021845284'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/eigrp-what-happens-after-network.html' title='Eigrp - what happens after network command is issued'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_97fjjXSzM0M/SrEA0i_FnII/AAAAAAAAAN4/2NkMbjCDBgk/s72-c/EIGRP_msg.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1876101371153141905</id><published>2009-09-16T00:32:00.000+08:00</published><updated>2009-09-22T21:39:19.089+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Sample IPTABLES configuration for workstation</title><content type='html'>&lt;pre&gt;# /etc/sysconfig/iptables&lt;br /&gt;#&lt;br /&gt;# IPTABLES sample config file for workstation&lt;br /&gt;#&lt;br /&gt;# Make sure you fix the appropriate &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; sections below, and add&lt;br /&gt;# duplicate entries as necessary (with different &lt;i&gt;IPADDR&lt;/i&gt;'s of course)&lt;br /&gt;&lt;br /&gt;# created by Bryan Cardillo&lt;br /&gt;# modified by Daniel Widyono&lt;br /&gt;&lt;br /&gt;# default policy - deny&lt;br /&gt;#&lt;br /&gt;# allow unrestricted icmp (should be tightened)&lt;br /&gt;# allow in/out dns to name servers&lt;br /&gt;# allow in/out ntp to ntp servers&lt;br /&gt;# allow unrestricted ssh out&lt;br /&gt;# allow ssh in from designated hosts&lt;br /&gt;# allow unrestricted in/out from internal interfaces&lt;br /&gt;# allow amanda server to contact and backup local filesystems&lt;br /&gt;# allow http, https access out&lt;br /&gt;# allow lpr client out&lt;br /&gt;# allow ftp client out&lt;br /&gt;&lt;br /&gt;*filter&lt;br /&gt;:INPUT DROP [0:0]&lt;br /&gt;:FORWARD DROP [0:0]&lt;br /&gt;:OUTPUT DROP [0:0]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# LOGGING / DEBUGGING&lt;br /&gt;&lt;/h3&gt;-N accept-n-log&lt;br /&gt;-A accept-n-log -j LOG --log-level 4 --log-prefix "accept-n-log:"&lt;br /&gt;-A accept-n-log -j ACCEPT&lt;br /&gt;-N drop-n-log&lt;br /&gt;-A drop-n-log -j LOG --log-level 4 --log-prefix "drop-n-log:"&lt;br /&gt;-A drop-n-log -j DROP&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# internal interfaces&lt;br /&gt;&lt;/h3&gt;-A INPUT -i lo -j ACCEPT&lt;br /&gt;-A OUTPUT -o lo -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# all outgoing&lt;br /&gt;&lt;/h3&gt;-A OUTPUT -m state --state NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# icmp&lt;br /&gt;&lt;/h3&gt;-A INPUT -p icmp -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# ssh client&lt;br /&gt;&lt;/h3&gt;-A INPUT -p tcp -m tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# http client&lt;br /&gt;&lt;/h3&gt;-A INPUT -p tcp -m tcp --sport http --dport 1024: -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;-A INPUT -p tcp -m tcp --sport https --dport 1024: -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;-A INPUT -p tcp -m tcp --sport webcache --dport 1024: -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# lpr client&lt;br /&gt;&lt;/h3&gt;-A INPUT -p tcp -m tcp --sport printer -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# ftp client (active and passive)&lt;br /&gt;&lt;/h3&gt;-A INPUT  -p tcp -m tcp --sport ftp -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;-A INPUT  -p tcp -m tcp --sport ftp-data -m state --state ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;-A INPUT  -p tcp -m tcp --sport 1024: --dport 1024: -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;h3&gt;# IMAP+SSL&lt;br /&gt;&lt;/h3&gt;-A INPUT  -p tcp -m tcp --sport imaps -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# auth service (identd), for tcp_wrapper'ed services which insist on checking&lt;br /&gt;# Note: it might be possible to just have -A INPUT -j DENY instead, haven't&lt;br /&gt;# tried that yet&lt;br /&gt;&lt;/h3&gt;-A INPUT  -p tcp -m tcp --dport auth  -m state --state NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# Outbound SMTP / e-mail&lt;br /&gt;&lt;/h3&gt;-A INPUT  -p tcp -m tcp --sport smtp  -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# ntp client&lt;br /&gt;# These entries need to match /etc/ntp.conf server entries (see also&lt;br /&gt;# the restrict entries in ntp.conf if you are restricting all by default)&lt;br /&gt;&lt;/h3&gt;-A INPUT -s &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; -p udp -m udp --sport 123 -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# dns client&lt;br /&gt;# These entries need to match /etc/resolv.conf nameserver entries (if you&lt;br /&gt;# use DHCP, you'll need to modify /etc/init.d/iptables to dynamically create&lt;br /&gt;# these entries, or else open port 53 to a range of IP addresses)&lt;br /&gt;&lt;/h3&gt;-A INPUT -s &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; -p udp -m udp --sport 53 -m state --state ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# amanda client (Yuck! This should be cleaned up and debugged some more)&lt;br /&gt;&lt;/h3&gt;-A INPUT -s &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; -p udp -m udp --dport amanda -j ACCEPT&lt;br /&gt;-A INPUT -s &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; -p tcp -m tcp --dport 1024: -j ACCEPT&lt;br /&gt;# debug any straggling issues&lt;br /&gt;-A INPUT -s &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; -j accept-n-log&lt;br /&gt;-A OUTPUT -d &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; -p udp -j accept-n-log&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# rsync client (not typically needed, but just another simple example)&lt;br /&gt;&lt;/h3&gt;#&lt;i&gt; -A INPUT -p tcp -m tcp --sport 873 -m state --state ESTABLISHED -j ACCEPT&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# ssh server (one entry for each allowable client/subnet)&lt;br /&gt;&lt;/h3&gt;-A INPUT -p tcp -m tcp --dport 22 -m state --state INVALID,NEW -j LOG --log-prefix "iptables(ssh connection): "&lt;br /&gt;-A INPUT -s &amp;lt;&lt;i&gt;IPADDR&lt;/i&gt;&amp;gt; -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# http server (Obviously commented out by default)&lt;br /&gt;&lt;/h3&gt;#&lt;i&gt; -A INPUT -p tcp -m tcp --sport 1024: --dport http -m state --state NEW,ESTABLISHED -j ACCEPT&lt;/i&gt;&lt;br /&gt;#&lt;i&gt; -A INPUT -p tcp -m tcp --sport 1024: --dport https -m state --state NEW,ESTABLISHED -j ACCEPT&lt;/i&gt;&lt;br /&gt;#&lt;i&gt; -A INPUT -p tcp -m tcp --sport 1024: --dport webcache -m state --state NEW,ESTABLISHED -j ACCEPT&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# smtp server (Obviously commented out by default)&lt;br /&gt;&lt;/h3&gt;#&lt;i&gt; -A INPUT -p tcp -m tcp --dport smtp -m state --state NEW,ESTABLISHED -j ACCEPT&lt;/i&gt;&lt;br /&gt;#&lt;i&gt; -A INPUT -p tcp -m tcp --sport auth -m state --state ESTABLISHED -j ACCEPT&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# debugging (or to help add new services / clients)&lt;br /&gt;&lt;/h3&gt;#&lt;i&gt; -A INPUT -m state --state ESTABLISHED,RELATED -j accept-n-log&lt;/i&gt;&lt;br /&gt;#&lt;i&gt; -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j accept-n-log&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;# debugging (or to find stray virii / rider programs)&lt;br /&gt;&lt;/h3&gt;#&lt;i&gt; -A OUTPUT -p tcp -j drop-n-log&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;ref.:http://www.liniac.upenn.edu/sysadmin/security/iptables.html&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1876101371153141905?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1876101371153141905/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/sample-iptables-configuration-for.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1876101371153141905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1876101371153141905'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/sample-iptables-configuration-for.html' title='Sample IPTABLES configuration for workstation'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-1267468154428363669</id><published>2009-09-12T18:59:00.000+08:00</published><updated>2009-09-12T18:59:08.590+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cisco'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='router'/><title type='text'>RIP Timers</title><content type='html'>RIP uses four different kinds of timers to regulate its performance:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Route update timer&lt;/b&gt;&amp;nbsp;&amp;nbsp; Sets the interval (typically 30 seconds) between periodic routing updates &lt;br /&gt;in which the router sends a complete copy of its routing table out to all neighbors.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Route invalid timer&lt;/b&gt;&amp;nbsp;&amp;nbsp; Determines the length of time that must elapse (180 seconds) before a &lt;br /&gt;router determines that a route has become invalid. It will come to this conclusion if it hasn’t &lt;br /&gt;heard any updates about a particular route for that period. When that happens, the router will &lt;br /&gt;send out updates to all its neighbors letting them know that the route is invalid.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Holddown timer&amp;nbsp;&lt;/b&gt;&amp;nbsp; This sets the amount of time during which routing information is sup-&lt;br /&gt;pressed. Routes will enter into the holddown state when an update packet is received that indi-&lt;br /&gt;cated the route is unreachable. This continues either until an update packet is received with a &lt;br /&gt;better metric or until the holddown timer expires. The default is 180 seconds.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Route flush timer&amp;nbsp;&lt;/b&gt;&amp;nbsp; Sets the time between a route becoming invalid and its removal from the &lt;br /&gt;routing table (240 seconds). Before it’s removed from the table, the router notifies its neigh-&lt;br /&gt;bors of that route’s impending demise. The value of the route invalid timer must be less than &lt;br /&gt;that of the route flush timer. This gives the router enough time to tell its neighbors about the &lt;br /&gt;invalid route before the local routing table is updated.&lt;br /&gt;&lt;br /&gt;ref.: Cisco Certified Network Associate Study Guide&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-1267468154428363669?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/1267468154428363669/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/rip-timers.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1267468154428363669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/1267468154428363669'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/rip-timers.html' title='RIP Timers'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-124407256001273117</id><published>2009-09-11T11:00:00.001+08:00</published><updated>2010-01-18T17:03:16.782+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='virtualization'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Virtual(portable) desktop for XP - using MojoPAC</title><content type='html'>Installation:&lt;br /&gt;Step 1: go to the site http://www.mojopac.com/ and download mojopac&lt;br /&gt;Step 2: When install the mojopac, you can select the locatation(C:, D: or removable USB) to install the virtual XP&lt;br /&gt;&lt;br /&gt;When you finish the installation, you can find the mojo.exe, execute it to launch your virtual XP.&lt;br /&gt;If you installed to other location, you can copy whole mojo directory to usb drive or other pc, so that you not need to install again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-124407256001273117?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/124407256001273117/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/virtualportable-desktop-for-xp-using.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/124407256001273117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/124407256001273117'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/virtualportable-desktop-for-xp-using.html' title='Virtual(portable) desktop for XP - using MojoPAC'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-9151184637462858188</id><published>2009-09-09T22:38:00.000+08:00</published><updated>2009-09-25T11:01:40.923+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cisco'/><category scheme='http://www.blogger.com/atom/ns#' term='network'/><category scheme='http://www.blogger.com/atom/ns#' term='router'/><title type='text'>Cisco router password recovery</title><content type='html'>step 1: press Ctrl+Break once the router boot up&lt;br /&gt;&lt;br /&gt;step 2: &lt;br /&gt;rommon 1&amp;gt;confreg 0x2142&lt;br /&gt;rommon 2&amp;gt;reset&lt;br /&gt;&lt;br /&gt;======================================================&lt;br /&gt;remark:&lt;br /&gt;0x2000 is boot default ROM software&lt;br /&gt;0x0040 is ignore NVRAM&lt;br /&gt;the last 2 is to specifies default boot file name&lt;br /&gt;&lt;br /&gt;Router default register is 0x2102, you can check it by "sh version"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-9151184637462858188?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/9151184637462858188/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/cisco-router-password-recovery.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9151184637462858188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/9151184637462858188'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/cisco-router-password-recovery.html' title='Cisco router password recovery'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5404995984916199885.post-7259451643008430096</id><published>2009-09-09T21:57:00.000+08:00</published><updated>2009-09-20T22:26:41.781+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu 9.04 on intel GMA500 configuration</title><content type='html'>sudo apt-get update&lt;br /&gt;sudo apt-get dist-upgrade&lt;br /&gt;&lt;br /&gt;sudo vi /etc/apt/sources.list.d/ubuntu-mobile.list&lt;br /&gt;deb http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main&lt;br /&gt;deb-src http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main&lt;br /&gt;sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C6598A30&lt;br /&gt;Now that your Ubuntu-Mobile Key is added do the Following.&lt;br /&gt;&lt;br /&gt;The Following Packages need to be Installed Most are Dependences.&lt;br /&gt;* psb-firmware - Binary firmware for the Poulsbo (psb) 3D X11 driver&lt;br /&gt;* psb-modules - Kernel module built for -generic or -lpia kernel&lt;br /&gt;* psb-kernel-source - Kernel module for the Poulsbo (psb) 2D X11 driver&lt;br /&gt;* psb-kernel-headers - Kernel module headers for the Poulsbo (psb) 2D X11 driver&lt;br /&gt;* xpsb-glx - X11 drivers for Poulsbo (psb) 3D acceleration&lt;br /&gt;* poulsbo-driver-3d - Metapackage for the 3D Poulsbo (psb) X11 driver.&lt;br /&gt;* poulsbo-driver-2d - Metapackage for the 2D Poulsbo (psb) X11 driver.&lt;br /&gt;&lt;br /&gt;sudo apt-get update&lt;br /&gt;sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d psb-firmware&lt;br /&gt;sudo apt-get install psb-kernel-source&lt;br /&gt;&lt;br /&gt;sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak&lt;br /&gt;&lt;br /&gt;sudo vi /etc/X11/xorg.conf&lt;br /&gt;&lt;br /&gt;############################&lt;br /&gt;Section "Monitor"&lt;br /&gt;Identifier      "Configured Monitor"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Screen"&lt;br /&gt;Identifier      "Default Screen"&lt;br /&gt;Monitor         "Configured Monitor"&lt;br /&gt;Device          "Configured Video Device"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "Device"&lt;br /&gt;Identifier      "Configured Video Device"&lt;br /&gt;Option "AccelMethod" "EXA"&lt;br /&gt;#Option "DRI" "off"&lt;br /&gt;Option "IgnoreACPI" "yes"    &lt;br /&gt;Option "MigrationHeuristic" "greedy"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Section "ServerFlags"&lt;br /&gt;Option  "DontZap"       "False"&lt;br /&gt;EndSection&lt;br /&gt;##########################&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5404995984916199885-7259451643008430096?l=raycheang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://raycheang.blogspot.com/feeds/7259451643008430096/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://raycheang.blogspot.com/2009/09/ubuntu-904-on-intel-gma500.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7259451643008430096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5404995984916199885/posts/default/7259451643008430096'/><link rel='alternate' type='text/html' href='http://raycheang.blogspot.com/2009/09/ubuntu-904-on-intel-gma500.html' title='Ubuntu 9.04 on intel GMA500 configuration'/><author><name>..Ray..</name><uri>http://www.blogger.com/profile/11633895736660340740</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_97fjjXSzM0M/SsRi5mPDJrI/AAAAAAAAAOo/HfBlLGHGrzA/S220/Image(120).jpg'/></author><thr:total>0</thr:total></entry></feed>
