<?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-696132948753636518</id><updated>2012-02-02T08:16:30.596+02:00</updated><category term='linux games'/><category term='best linux games'/><title type='text'>Clive's Blog</title><subtitle type='html'>Linux How To</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default?start-index=101&amp;max-results=100'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>112</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-7599010330687991728</id><published>2012-01-28T11:44:00.002+02:00</published><updated>2012-01-28T12:14:22.172+02:00</updated><title type='text'>Installing Fedora 16 on a System that can not boot GPT Labelled Disks</title><content type='html'>Some&amp;nbsp;Systems&amp;nbsp;&lt;span style="font-family: inherit;"&gt;Particularly&lt;/span&gt;&amp;nbsp;Fujitsu Siemens&amp;nbsp;Life books, Apple Macs and some others,&lt;br /&gt;Cannot Boot If the Hard drive is Formatted using this Newer&lt;b&gt; GPT &lt;/b&gt;&amp;nbsp;format.&lt;br /&gt;&lt;br /&gt;Fedora 16 uses the new &lt;b&gt;GPT&lt;/b&gt; format since it does have some benefits.&lt;br /&gt;However&amp;nbsp;if you want to install Fedora 16 on a Lifebook or an Apple mac, you need to do the following.&lt;br /&gt;&lt;br /&gt;You need to pass parameter&lt;b&gt; nogpt&lt;/b&gt; to the Fedora installer.&lt;br /&gt;&lt;br /&gt;To do this, at the initial bootloader menu for the Fedora installation, where you can select to install, install in basic graphics mode, boot to the rescue mode and so on, hit the&lt;b&gt; Tab &lt;/b&gt;key, then edit the command line for the Fedora installer and add the word &lt;b&gt;nogpt&lt;/b&gt;. &amp;nbsp;you can do this when using the Live CD or the Complete distribution DVD.&lt;br /&gt;&lt;br /&gt;Then install as normal and your Machine should now boot and work as expected.&lt;br /&gt;&lt;br /&gt;Do not choose custom partitioning layout, You must let the system create it's own layout first and then if you want , You can edit what it creates to suite your requirements. If you choose custom layout, the 1MB problematic BootBios partition is created and this will give you the following error "&lt;br /&gt;"&lt;b&gt;you have not created a bootloader stage1 target device&lt;/b&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-7599010330687991728?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/7599010330687991728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=7599010330687991728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7599010330687991728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7599010330687991728'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2012/01/installing-fedora-on-system-that-can.html' title='Installing Fedora 16 on a System that can not boot GPT Labelled Disks'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4712453869954328821</id><published>2012-01-23T20:31:00.000+02:00</published><updated>2012-01-23T20:33:36.261+02:00</updated><title type='text'>mount.nfs: access denied by server while mounting</title><content type='html'>If your nfs mounts stop working&lt;br /&gt;and &lt;b&gt;mount-a&lt;/b&gt; gives you the following error.&lt;br /&gt;&lt;b&gt;mount.nfs: access denied by server while mounting /blah_blah_blah/blah_blah&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Chances are, your machine has been upgraded and now uses the NFS version 4 as default nfs version&lt;br /&gt;&amp;nbsp;instead of 3&lt;br /&gt;&lt;br /&gt;To fix this issue you need to explicitly tell nfs to mount your share using the older nfs version 3&lt;br /&gt;&lt;br /&gt;simply add&lt;b&gt; nfsvers=3&lt;/b&gt; &amp;nbsp;to your nfs mount stanza in your&lt;b&gt; /etc/fstab file&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;eg&lt;br /&gt;&lt;b&gt;vi /etc/fstab&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;192.168.1.10:/shared/files &amp;nbsp;/mnt/files nfs soft,intr,&lt;b&gt;nfsvers=3&lt;/b&gt; 0 0&lt;br /&gt;&lt;br /&gt;save the file and type&lt;br /&gt;&lt;b&gt;mount -a &amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Your nfs mounts will now work.&lt;br /&gt;&lt;div&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/696132948753636518-4712453869954328821?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4712453869954328821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4712453869954328821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4712453869954328821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4712453869954328821'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2012/01/mountnfs-access-denied-by-server-while.html' title='mount.nfs: access denied by server while mounting'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6458245289122063609</id><published>2012-01-06T11:14:00.000+02:00</published><updated>2012-01-07T15:27:07.271+02:00</updated><title type='text'>Resolve transparency issues with Guake</title><content type='html'>&lt;span style="background-color: black;"&gt;&lt;span style="color: white; font-family: inherit; line-height: 1.25em;"&gt;If &lt;/span&gt;&lt;span style="color: white; font-family: inherit; line-height: 1.25em;"&gt;you set Guake to start automatically when your computer starts, depending on how quickly your Gnome session loads, there &amp;nbsp;may be an issue with it starting before Gnome has completed it's full initialization.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="max-width: 64em;"&gt;&lt;span style="background-color: black; color: white;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 1.25em;"&gt;when this happens, the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: 20px;"&gt;transparency&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 1.25em;"&gt;&amp;nbsp;in quake does not work as it should, You cannot see the windows behind the Guake terminal, It lets you see your Background wallpaper only.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="max-width: 64em;"&gt;&lt;a href="http://2.bp.blogspot.com/-BLeHZo_onsw/TwbGs7O8QCI/AAAAAAAAAwQ/l2kdLgAC5QI/s1600/guake01.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="209" src="http://2.bp.blogspot.com/-BLeHZo_onsw/TwbGs7O8QCI/AAAAAAAAAwQ/l2kdLgAC5QI/s320/guake01.png" width="320" /&gt;&lt;/a&gt;&lt;span style="background-color: black; color: white;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 1.25em;"&gt;A solution for this is to delay the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: 20px;"&gt;start up&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 1.25em;"&gt;&amp;nbsp;of Guake, so that Gnome is allowed to initialize fully before Guake starts.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;To do this , run&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="color: white; font-family: inherit;"&gt;&lt;b style="background-color: black;"&gt;gnome-session-properties&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="color: white; font-family: inherit;"&gt;&lt;b style="background-color: black;"&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white;"&gt;under startup-programs edit your entry for Guake.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white;"&gt;and add &lt;b&gt;&amp;nbsp;sleep 8 &amp;amp;&amp;amp;&lt;/b&gt; infront of guake,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: black; color: white;"&gt;like so&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;&lt;b&gt;&amp;nbsp;&lt;tt style="max-width: 66em;"&gt;sleep 8 &amp;amp;&amp;amp; guake&lt;/tt&gt;&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 1.25em; max-width: 64em;"&gt;&lt;span style="background-color: black; color: white; font-family: inherit;"&gt;This gives guake an 8 second delay before starting, and should be enough to let Gnome fully initialize, and your transparency will work as it should.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;"&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/696132948753636518-6458245289122063609?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6458245289122063609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6458245289122063609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6458245289122063609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6458245289122063609'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2012/01/resolve-transparency-issues-with-guake.html' title='Resolve transparency issues with Guake'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-BLeHZo_onsw/TwbGs7O8QCI/AAAAAAAAAwQ/l2kdLgAC5QI/s72-c/guake01.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6849475595056488141</id><published>2012-01-04T11:46:00.000+02:00</published><updated>2012-01-04T12:19:30.248+02:00</updated><title type='text'>Problem mounting a LVM</title><content type='html'>To &amp;nbsp;manually mount a drive that contains a LVM (Logical Volume)&lt;br /&gt;do the following.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;lvddisplay&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will output info about your logical volume&lt;br /&gt;the important thing to note here is&lt;br /&gt;the line which says VG Name&lt;br /&gt;&lt;b&gt;VG Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vg_lvm&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;sometimes you will get a lv status as not&amp;nbsp;available&lt;br /&gt;to make it available type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;vgchange -a y&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;this will activate any LVMS that werent active and make them&amp;nbsp;available.&lt;br /&gt;&lt;br /&gt;then to mount the LVM simply type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mount /dev/vg_lvm &amp;nbsp; /mnt&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-6849475595056488141?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6849475595056488141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6849475595056488141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6849475595056488141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6849475595056488141'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2012/01/problem-mounting-lvm.html' title='Problem mounting a LVM'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4361203326124173347</id><published>2011-12-31T10:08:00.004+02:00</published><updated>2011-12-31T10:30:30.467+02:00</updated><title type='text'>Problem installing Oracle Virtual box extension pack</title><content type='html'>If you would like to use the USB ports on your virtual machine in virtual box.&lt;br /&gt;You need to install the virtual box&amp;nbsp;extension&amp;nbsp;pack available from the download section at &lt;a href="http://www.virtualbox.org/"&gt;www.virtualbox.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However opening the downloaded extension pack from virtualbox and clicking the install button, sometimes gives the following error&lt;br /&gt;&lt;br /&gt;&lt;span style="line-height: 18px;"&gt;&lt;span style="color: red; font-family: inherit;"&gt;&lt;b style="background-color: #444444;"&gt;"Failed to install the Extension Pack Oracle_VM_VirtualBox_Extension_Pack-.vbox-extpack.&amp;nbsp; The installer failed with exit code 127: The value for the SHELL variable was not found the /etc/shells file&amp;nbsp;&amp;nbsp;&amp;nbsp; This incident has been reported..&amp;nbsp; Result Code: NS_ERROR_FAILURE (0x80004005) Component: ExtPackManager Interface: IExtPackManager&amp;nbsp;"&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I find that installing the extension pack using the command line fixes this problem.&lt;br /&gt;simply&lt;b&gt; cd&lt;/b&gt; into the folder were the extension pack you downloaded resides,&lt;br /&gt;and type the following. replacing the xxxx with the version of the extension pack you downloaded.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-4.1.xxxx.vbox-extpack&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;and it will install properly, you should get the following back.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Successfully installed "Oracle VM VirtualBox Extension Pack".&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4361203326124173347?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4361203326124173347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4361203326124173347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4361203326124173347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4361203326124173347'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/12/problem-installing-oracle-virtual-box.html' title='Problem installing Oracle Virtual box extension pack'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2055000389294791199</id><published>2011-12-07T14:01:00.001+02:00</published><updated>2011-12-08T12:21:38.813+02:00</updated><title type='text'>Free up space on your hard drive.</title><content type='html'>&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;ext2/ext3 and ext4, file systems automatically reserve space for themselves. (5% by default)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;This is necessary for your root partition, so that &amp;nbsp;if you fill up the hard drive, Linux will still have space to write to the log files and to allow privileged&amp;nbsp;processes to run so that they can avoid file system fragmentation.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;However, if your hard disk is say a 650GB or bigger hard drive, that 5% amounts to a significant amount of disk space, and is a total overkill.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;Additionally, you do not need this reserved space on hard drives that are only used for storage (ie are not part of your root partition)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;so, how do we take back this valuable hard disk real estate ?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;We use tune2fs.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;so as an example, &amp;nbsp;type&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;b&gt;tune2fs -m 1 /dev/sda2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;to change the 5% to 1% on /dev/sda2&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;if /dev/sda was a 650GB hard drive this would give you an additional 26 GB Free!&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;b&gt;tune2fs -m 0 /dev/sda2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;will &amp;nbsp;reduce the 5% to 0%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;to add reserved space for&amp;nbsp;privileged&amp;nbsp;processes back to a &amp;nbsp;drive&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;type&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;b&gt;tune2fs -r 20000 /dev/sda2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;will give back 20000 blocks, which should be more than sufficient&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;you can run tune2fs on &amp;nbsp;Logical volumes as well.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;b&gt;tune2fs -m 1 /dev/mapper/vg-lv_home&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;will reclaim space from your logical volume&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;Just change &lt;b&gt;/dev/mapper/vg/-lv_home&lt;/b&gt; to the name of your logical volume.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;you can see all your volumes and&amp;nbsp;partitions&amp;nbsp;by typing &lt;b&gt;df -h&lt;/b&gt;&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/696132948753636518-2055000389294791199?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2055000389294791199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2055000389294791199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2055000389294791199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2055000389294791199'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/12/free-up-space-on-your-hard-drive.html' title='Free up space on your hard drive.'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5183728030274836449</id><published>2011-12-01T09:58:00.001+02:00</published><updated>2011-12-01T10:01:17.476+02:00</updated><title type='text'>Simple Webserver</title><content type='html'>&lt;b&gt;python -m SimpleHTTPServer&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Will serve your current Directory tree at&lt;br /&gt;&lt;b&gt;http://IP_of_machine_you_ran_the_command_on:8000&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="summary" style="background-color: black; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #aaaaaa; font-family: 'Trebuchet MS', sans-serif, verdana; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;a href="http://www.commandlinefu.com/commands/view/71/serve-current-directory-tree-at-httphostname8000" style="color: #aaaaaa; font-size: 10pt; font-weight: bold;" title="Find out what others think of this command"&gt;Serve current directory tree at http://$HOSTNAME:8000/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="description" style="background-color: black; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #aaaaaa; font-family: 'Trebuchet MS', sans-serif, verdana; font-size: 9pt; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5183728030274836449?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5183728030274836449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5183728030274836449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5183728030274836449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5183728030274836449'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/12/simple-webserver.html' title='Simple Webserver'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-145481895862737612</id><published>2011-11-30T10:06:00.001+02:00</published><updated>2011-12-01T09:54:37.040+02:00</updated><title type='text'>Check your spelling</title><content type='html'>&lt;b&gt;yum install aspell&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;or &lt;b&gt;apt-get install aspell&lt;/b&gt; for Ubuntu systems&lt;br /&gt;&lt;br /&gt;then in future &amp;nbsp;when ever &amp;nbsp;you need to know how to spell a word simply type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;aspell -a &amp;lt;&amp;lt;&amp;lt; 'word'&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-145481895862737612?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/145481895862737612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=145481895862737612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/145481895862737612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/145481895862737612'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/check-your-spelling.html' title='Check your spelling'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1921577429593760572</id><published>2011-11-23T09:28:00.001+02:00</published><updated>2011-11-23T09:31:18.495+02:00</updated><title type='text'>save man pages as pdf</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;man -t ls | ps2pdf - ls.pdf&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Will save the man pages for ls to ls.pdf&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;substitute ls for the programme man pages you want to save as a pdf&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1921577429593760572?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1921577429593760572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1921577429593760572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1921577429593760572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1921577429593760572'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/save-man-pages-as-pdf.html' title='save man pages as pdf'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2995097732165218933</id><published>2011-11-22T17:45:00.001+02:00</published><updated>2011-11-22T18:02:53.970+02:00</updated><title type='text'>Script Terminal Session</title><content type='html'>&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;s&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;cript -f /tmp/filename&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;will place all output of the terminal, including carriage returns, to a file (&lt;b&gt;/tmp/filename&lt;/b&gt;)&lt;br /&gt;&lt;br /&gt;So then on another terminal session type&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;tail -f /tmp/filename&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;This file can be&amp;nbsp;&lt;/span&gt;&lt;b&gt;tail -f&lt;/b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;by one or more terminals to display Live the information of the main terminal.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Great &amp;nbsp;way to share your screen on short notice.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;to Stop scripting type&lt;br /&gt;&amp;nbsp;&amp;lt;&lt;b&gt;Cntrl&amp;gt; D&lt;/b&gt;&lt;/div&gt;&lt;div&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/696132948753636518-2995097732165218933?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2995097732165218933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2995097732165218933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2995097732165218933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2995097732165218933'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/script-terminal-session.html' title='Script Terminal Session'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4961329652075034050</id><published>2011-11-20T16:13:00.001+02:00</published><updated>2011-11-20T16:14:06.604+02:00</updated><title type='text'>Ascii Digital Clock</title><content type='html'>&lt;br /&gt;install banner&lt;br /&gt;&lt;br /&gt;&lt;b&gt;yum install banner&lt;/b&gt;&lt;br /&gt;then type&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;watch -n1 'banner `date +%T`'&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4961329652075034050?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4961329652075034050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4961329652075034050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4961329652075034050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4961329652075034050'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/ascii-digital-clock.html' title='Ascii Digital Clock'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4264808197999510809</id><published>2011-11-19T11:47:00.001+02:00</published><updated>2011-11-19T19:33:05.164+02:00</updated><title type='text'>How To Add a start up script to be Run at Boot time in Ubuntu</title><content type='html'>&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-RSYwViwszJw/Tsd7tD-NXqI/AAAAAAAAAkE/YRW8Ica1rGg/s1600/images+%25281%2529.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-RSYwViwszJw/Tsd7tD-NXqI/AAAAAAAAAkE/YRW8Ica1rGg/s1600/images+%25281%2529.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id="terminal-header" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 4px; padding-left: 0px; padding-right: 0px; padding-top: 0px; zoom: 1;"&gt;&lt;h1 style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; float: left; font-family: inherit; font-size: 20pt; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/h1&gt;&lt;div style="font-style: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;First Save your script in&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp; &lt;b&gt;/etc/init.d/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;then type:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-style: inherit;"&gt;sudo update-rc.d &lt;/span&gt;&lt;i&gt;script_name&lt;/i&gt;&lt;span class="Apple-style-span" style="font-style: inherit;"&gt;&amp;nbsp;&lt;/span&gt;&lt;scriptname style="font-style: inherit;"&gt;&lt;scriptname&gt;defaults&lt;/scriptname&gt;&lt;/scriptname&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;This script will now run each time you boot up.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4264808197999510809?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4264808197999510809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4264808197999510809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4264808197999510809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4264808197999510809'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/how-to-add-start-up-script-to-be-run-at.html' title='How To Add a start up script to be Run at Boot time in Ubuntu'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-RSYwViwszJw/Tsd7tD-NXqI/AAAAAAAAAkE/YRW8Ica1rGg/s72-c/images+%25281%2529.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6371594788319753192</id><published>2011-11-16T15:18:00.001+02:00</published><updated>2011-11-16T15:48:17.391+02:00</updated><title type='text'>sort the contents of a text file in place</title><content type='html'>This will sort the contents of a file without the need to pipe it into a second file.&lt;br /&gt;&lt;br /&gt;great for cron jobs&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #aaaaaa; font-family: 'Trebuchet MS', sans-serif, verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;sort -g name_of_file_to_sort.txt -o $_&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-6371594788319753192?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6371594788319753192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6371594788319753192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6371594788319753192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6371594788319753192'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/sort-contents-of-text-file-in-place.html' title='sort the contents of a text file in place'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2442952458742846348</id><published>2011-11-14T16:34:00.001+02:00</published><updated>2011-11-14T16:39:10.422+02:00</updated><title type='text'>Dropbox Free 2GB account</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/-fziUnT6HJdw/TsEn59Vp5wI/AAAAAAAAAjs/s1i2BWKaduw/s1600/dropbox_thumb.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-fziUnT6HJdw/TsEn59Vp5wI/AAAAAAAAAjs/s1i2BWKaduw/s1600/dropbox_thumb.png" /&gt;&lt;/a&gt;Always have your stuff when you need it with Dropbox.&lt;br /&gt;2GB account is free!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://db.tt/4DAnAvo" target="_blank"&gt;Click Here To open an account&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Dropbox will allow you to share folders across multiple computers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2442952458742846348?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2442952458742846348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2442952458742846348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2442952458742846348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2442952458742846348'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/dropbox-free-2gb-account.html' title='Dropbox Free 2GB account'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-fziUnT6HJdw/TsEn59Vp5wI/AAAAAAAAAjs/s1i2BWKaduw/s72-c/dropbox_thumb.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-398305370124024880</id><published>2011-11-04T12:07:00.004+02:00</published><updated>2011-11-05T19:15:53.758+02:00</updated><title type='text'>Removing old unused Kernels from your Fedora system</title><content type='html'>&lt;div style="font-family: inherit;"&gt;Old unused Kernels can take up a fair amount of Disk Space. &lt;/div&gt;&lt;div style="font-family: inherit;"&gt;To identify kernels that may be safely removed from your System,&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;run the following in a Terminal:&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: inherit;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: inherit;"&gt;&lt;b&gt;curl -O 'http://skvidal.fedorapeople.org/misc/kernel-prune.py'&lt;br /&gt;chmod a+x kernel-prune.py&lt;br /&gt;./kernel-prune.py&lt;/b&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="font-family: inherit;"&gt;&lt;/pre&gt;&lt;span style="font-family: inherit;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;Then to safely remove the kernel versions listed by the above command, run the following as root:&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: inherit;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: inherit;"&gt;&lt;b&gt;PKGS=`./kernel-prune.py`&lt;br /&gt;echo $PKGS&lt;br /&gt;yum remove $PKGS&lt;br /&gt;&lt;/b&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-398305370124024880?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/398305370124024880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=398305370124024880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/398305370124024880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/398305370124024880'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/11/removing-old-unused-kernels-from-your.html' title='Removing old unused Kernels from your Fedora system'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2948576059867547141</id><published>2011-10-28T19:05:00.001+02:00</published><updated>2011-12-06T16:12:27.729+02:00</updated><title type='text'>Remove empty directories or folders</title><content type='html'>&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find -depth -type d -empty -exec rmdir {} \;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2948576059867547141?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2948576059867547141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2948576059867547141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2948576059867547141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2948576059867547141'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/10/remove-empty-directories-or-folders.html' title='Remove empty directories or folders'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6783287146937450309</id><published>2011-10-21T12:29:00.001+02:00</published><updated>2011-10-21T17:23:30.294+02:00</updated><title type='text'>Integrate google contacts into your Mutt address Book</title><content type='html'>Goobook will alow you to interact with your gmail contacts from the command line and also enable mutt to access them&lt;br /&gt;&lt;br /&gt;install goobook&lt;br /&gt;type&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;easy-install -U goobook&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Once installed create .netrc&amp;nbsp; file in your home folder with the credentials to your google account&lt;br /&gt;&lt;b&gt;Vim ~/.netrc&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;inside .netrc put the following&lt;br /&gt;&lt;br /&gt;&lt;b&gt;machine google.com&lt;/b&gt;&lt;br /&gt;&lt;b&gt;login yourgmailaddress@gmail.com&lt;/b&gt;&lt;br /&gt;&lt;b&gt;password yourpassword&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;save the file&lt;br /&gt;&lt;br /&gt;to test if it is working type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;goobook dump_contacts &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;this will dump all your contact information from gmail to stn out&lt;br /&gt;&lt;br /&gt;to search for a string from your gmail contacts type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;goobook query &lt;i&gt;query &lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;eg to search for clive type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;goobook query clive&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;if you want to use goobook from mutt&lt;br /&gt;&lt;br /&gt;edit your &lt;b&gt;.muttrc&lt;/b&gt; file and add in the following line:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;set query_command="goobook query '%s'" &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;to query the address book from inside mutt use the "&lt;b&gt;Q&lt;/b&gt;" key&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you want to be able to use&lt;b&gt; &lt;tab&gt;&lt;/tab&gt;&lt;/b&gt; to complete email addresses instead of &lt;b&gt;Ctrl-t &lt;/b&gt;add this:&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;bind editor &lt;tab&gt; complete-query&lt;/tab&gt;&lt;/b&gt;&lt;/blockquote&gt;To add email addresses (with "a" key normally bound to create-alias command) add the following line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: xx-small;"&gt;&lt;b&gt;macro index,pager A "&lt;pipe-message&gt;goobook add&lt;return&gt;" "add the sender address to Google contacts"&lt;/return&gt;&lt;/pipe-message&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit; font-size: small;"&gt;If you want to add an email's sender to Contacts, press &lt;b&gt;"a"&lt;/b&gt; while it's selected &lt;/span&gt;in the index or pager.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-6783287146937450309?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6783287146937450309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6783287146937450309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6783287146937450309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6783287146937450309'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/10/integrate-google-contacts-into-your.html' title='Integrate google contacts into your Mutt address Book'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4101673644212576262</id><published>2011-09-29T19:50:00.002+02:00</published><updated>2011-09-29T20:01:26.977+02:00</updated><title type='text'>Rename image files according to EXIF date</title><content type='html'>&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;This will rename all of your pictures in a given folder and prefix the date and time that the picture was taken in front of the file name.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Useful if your camera screws up your naming convention of your pictures, or if you want to simply organize all your pictures by date&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;yum install exiv2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;cd to the folder with all your pictures that you want to rename&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;and type:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;exiv2 -r'%Y%m%d-%H%M_:basename:' rename $(ls)&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;will rename to&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;20110929-2005_DSC_3782.JPG&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4101673644212576262?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4101673644212576262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4101673644212576262' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4101673644212576262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4101673644212576262'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/09/rename-image-files-according-to-exif.html' title='Rename image files according to EXIF date'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4111621281778255427</id><published>2011-09-16T11:35:00.000+02:00</published><updated>2011-09-16T11:40:27.317+02:00</updated><title type='text'>Install Oracle 11G 32bit on 64bit Rhel 6</title><content type='html'>&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&amp;nbsp;&lt;a href="http://1.bp.blogspot.com/-AkeMmQn24zg/TnMXswLhSzI/AAAAAAAAAjE/fOPpHUzNQqg/s1600/oracle.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="149" src="http://1.bp.blogspot.com/-AkeMmQn24zg/TnMXswLhSzI/AAAAAAAAAjE/fOPpHUzNQqg/s200/oracle.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/-5vy8N1LfYPs/TnMXtwXoN5I/AAAAAAAAAjI/L_r_5YrOpUQ/s1600/redhat.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-5vy8N1LfYPs/TnMXtwXoN5I/AAAAAAAAAjI/L_r_5YrOpUQ/s1600/redhat.jpg" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Install the following prerequisites&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;yum install gnome-icon-theme-2.28.0-2.el6.noarch sgml-common-0.6.3-32.el6.noarch dmz-cursor-themes-0.4-4.el6.noarch libstdc++-devel-4.4.4-13.el6.x86_64 kernel-headers-2.6.32-71.el6.x86_64 elfutils-libelf-devel-0.148-1.el6.x86_64 libgcc-4.4.4-13.el6.i686 nss-softokn-freebl-3.12.7-1.1.el6.i686 glibc-2.12-1.7.el6.i686 mpfr-2.4.1-6.el6.x86_64 libXt-1.0.7-1.el6.x86_64 libXmu-1.0.5-1.el6.x86_64 libXxf86misc-1.0.2-1.el6.x86_64 libXxf86vm-1.1.0-1.el6.x86_64 libaio-0.3.107-10.el6.i686 libstdc++-4.4.4-13.el6.i686 ncurses-libs-5.7-3.20090208.el6.i686 readline-6.0-3.el6.i686 libICE-1.0.6-1.el6.i686 xorg-x11-xauth-1.0.2-7.1.el6.x86_64 cpp-4.4.4-13.el6.x86_64 libtool-ltdl-2.2.6-15.5.el6.x86_64 unixODBC-2.2.14-11.el6.x86_64 ppl-0.10.2-11.el6.x86_64 cloog-ppl-0.15.7-1.2.el6.x86_64 libmcpp-2.7.2-4.1.el6.x86_64 mcpp-2.7.2-4.1.el6.x86_64 xorg-x11-server-utils-7.4-15.el6.x86_64 compat-db42-4.2.52-15.el6.x86_64 compat-db43-4.3.29-15.el6.x86_64 libdmx-1.1.0-1.el6.x86_64 libXxf86dga-1.1.1-1.el6.x86_64 libXv-1.0.5-1.el6.x86_64 libIDL-0.8.13-2.1.el6.x86_64 ORBit2-2.14.17-3.1.el6.x86_64 GConf2-2.28.0-6.el6.x86_64 libbonobo-2.24.2-4.el6.x86_64 gtk2-engines-2.18.4-5.el6.x86_64 shared-mime-info-0.70-4.el6.x86_64 libdaemon-0.14-1.el6.x86_64 avahi-0.6.25-8.el6.x86_64 avahi-glib-0.6.25-8.el6.x86_64 gnome-vfs2-2.24.2-6.el6.x86_64 libtool-ltdl-2.2.6-15.5.el6.i686 unixODBC-2.2.14-11.el6.i686 libuuid-2.17.2-6.el6.i686 libSM-1.1.0-7.1.el6.i686 libXau-1.0.5-1.el6.i686 xorg-x11-utils-7.4-8.el6.x86_64 compat-libstdc++-33-3.2.3-69.el6.x86_64 celt051-0.5.1.3-0.el6.x86_64 libXp-1.0.0-15.1.el6.x86_64 libxcb-1.5-1.el6.i686 libX11-1.3-2.el6.i686 libXext-1.1-3.el6.i686 ConsoleKit-x11-0.4.1-3.el6.x86_64 libXi-1.3-3.el6.i686 xorg-x11-xinit-1.0.9-13.el6.x86_64 libXtst-1.0.99.2-3.el6.i686 libXt-1.0.7-1.el6.i686 compat-libstdc++-33-3.2.3-69.el6.i686 glibc-headers-2.12-1.7.el6.x86_64 glibc-devel-2.12-1.7.el6.x86_64 gcc-4.4.4-13.el6.x86_64 compat-gcc-34-3.4.6-19.el6.x86_64 gnome-themes-2.28.1-6.el6.noarch system-icon-theme-6.0.0-2.el6.noarch system-gnome-theme-60.0.2-1.el6.noarch ncurses-devel-5.7-3.20090208.el6.x86_64 libgnome-2.28.0-11.el6.x86_64 gcc-c++-4.4.4-13.el6.x86_64 readline-devel-6.0-3.el6.x86_64 glibc-devel-2.12-1.7.el6.i686 compat-db-4.6.21-15.el6.x86_64 unixODBC-devel-2.2.14-11.el6.i686 unixODBC-devel-2.2.14-11.el6.x86_64 libaio-devel-0.3.107-10.el6.i686 libaio-devel-0.3.107-10.el6.x86_64 compat-gcc-34-c++-3.4.6-19.el6.x86_64&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;next you must install the 32 bit version of the Glib libraries&lt;br /&gt;&lt;br /&gt;&lt;b&gt;yum install glib-devel.i686&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;connect to the server with&lt;br /&gt;&lt;b&gt;ssh -X oracle@serverip address&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;./runInstaller -ignoresysprereq&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;the Oracle Xwindow will open on your desktop,&lt;br /&gt;follow instructions to complete the installation.&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;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4111621281778255427?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4111621281778255427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4111621281778255427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4111621281778255427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4111621281778255427'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/09/install-oracle-11g-32-bit-on-64bit-rhel.html' title='Install Oracle 11G 32bit on 64bit Rhel 6'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-AkeMmQn24zg/TnMXswLhSzI/AAAAAAAAAjE/fOPpHUzNQqg/s72-c/oracle.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4654923615959718397</id><published>2011-09-14T16:07:00.008+02:00</published><updated>2011-09-14T16:49:55.936+02:00</updated><title type='text'>Point  RHEL 6 installation to Centos6 repositories</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-xxRDh77z3eU/TnC-vRGWsaI/AAAAAAAAAi4/TEBaCel_f08/s1600/redhat.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 50px; height: 50px;" src="http://2.bp.blogspot.com/-xxRDh77z3eU/TnC-vRGWsaI/AAAAAAAAAi4/TEBaCel_f08/s200/redhat.jpg" alt="" id="BLOGGER_PHOTO_ID_5652227251603157410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-nrgURdt--_w/TnC-vh3wSaI/AAAAAAAAAjA/irJj1aax6mo/s1600/centos.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 100px; height: 100px;" src="http://1.bp.blogspot.com/-nrgURdt--_w/TnC-vh3wSaI/AAAAAAAAAjA/irJj1aax6mo/s200/centos.jpg" alt="" id="BLOGGER_PHOTO_ID_5652227256105322914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2 id="head-750893adab6fe499d5fac72fbed793e0f90de69e"&gt;Migrating from RHEL6  to CentOS 6&lt;/h2&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mkdir TMP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;yum remove rhnlib abrt-plugin-bugzilla&lt;br /&gt;yum remove redhat-release-notes*&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rpm -e --nodeps redhat-release redhat-indexhtml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for 64 bit version use&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rpm -e --nodeps redhat-release-server.x86_64&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rpm -e --nodeps redhat-indexhtml-6-1.el6.noarch&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cd TMP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-release-6-0.el6.centos.5.x86_64.rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wget http://mirror.centos.org/centos/6/os/x86_64/Packages/centos-indexhtml-6-1.el6.centos.noarch.rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-3.2.27-14.el6.centos.noarch.rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wget http://mirror.centos.org/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rpm -Uvh *.rpm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cd ..&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rm -rf TMP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;yum clean all&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;yum upgrade&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;voila, your Redhat machine can now get updated from the Centos repositories&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4654923615959718397?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4654923615959718397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4654923615959718397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4654923615959718397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4654923615959718397'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/09/point-rhel-6-installation-to-centos6.html' title='Point  RHEL 6 installation to Centos6 repositories'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-xxRDh77z3eU/TnC-vRGWsaI/AAAAAAAAAi4/TEBaCel_f08/s72-c/redhat.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4391447022236756945</id><published>2011-08-30T13:59:00.003+02:00</published><updated>2011-08-30T14:13:55.693+02:00</updated><title type='text'>Spliting 1 large MKV file into 2 smaller MKV files</title><content type='html'>&lt;br /&gt;Lets say you have a 6GB MKV file that you want to split into 2 X 3GB MKV files&lt;br /&gt;&lt;br /&gt;mkvtoolnix to the rescue&lt;br /&gt;&lt;br /&gt;install mkvtoolnix&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;yum install mkvtoolnix&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;once installed cd into the directory that has the file you want to split&lt;br /&gt;lets say the file is called thor.mkv&lt;br /&gt;to split it into 2 files of 3GB each simply type the following.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;mkvmerge --split size 3g thor.mkv -o thor1.mkv&lt;/strong&gt;&lt;br /&gt;hit enter&lt;br /&gt;&lt;br /&gt;you will land up with 2 extra files thor1.mkv and thor2.mkv, each 3gb in size (the original file will also still be in the directory&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4391447022236756945?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4391447022236756945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4391447022236756945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4391447022236756945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4391447022236756945'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/08/spliting-1-large-mkv-file-into-2.html' title='Spliting 1 large MKV file into 2 smaller MKV files'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2793510663284686340</id><published>2011-06-07T08:11:00.007+02:00</published><updated>2011-12-07T14:28:37.199+02:00</updated><title type='text'>Rsync</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/-T0Gx2Zn-7vk/Te3FlvTAaxI/AAAAAAAAAg0/8vktuUs_rv0/s1600/timemachine.jpg"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5615361562542893842" src="http://2.bp.blogspot.com/-T0Gx2Zn-7vk/Te3FlvTAaxI/AAAAAAAAAg0/8vktuUs_rv0/s200/timemachine.jpg" style="cursor: hand; cursor: pointer; float: left; height: 200px; margin: 0 10px 10px 0; width: 200px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2&gt;Backing up data using rsync command&lt;/h2&gt;I have stopped using scp to copy files from computer to computer and far prefer to use rsync.&lt;br /&gt;rsync command uses the same format as scp, (so there is no learning curve and if you are used to using scp, then switching to rsync is no trouble at all) rsync  has the benefit of being able to continue from a failed copy, and also has a wealth of other advantages over scp.&lt;br /&gt;&lt;br /&gt;rsync is a great tool for backing up and restoring files.&lt;br /&gt;&lt;br /&gt;Example of the remote server and folder that needs to be backup or copied:&lt;br /&gt;Remote host name: &lt;b&gt;server.example.com&lt;/b&gt;&lt;br /&gt;Remote folder: &lt;b&gt;/home/serverfolder&lt;/b&gt;/&lt;br /&gt;Remote user: &lt;b&gt;user1&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;        &lt;/b&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rsync -arv user1&lt;/span&gt;&lt;span class="style1" style="font-weight: bold;"&gt;@serverexample.com:/home/serverfolder/ &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span class="style2"&gt;&lt;span style="font-weight: bold;"&gt;/home/cgerada  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="style2"&gt;&lt;/span&gt;&lt;br /&gt;(&lt;span class="style2"&gt;/home/cgerada &lt;/span&gt;is the local  folder path of the machine I am on and to were I want to copy to)&lt;br /&gt;or to copy into the directory that I am currently in you could type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rsync -arv user1&lt;/span&gt;&lt;span class="style1" style="font-weight: bold;"&gt;@serverexample.com:/home/serverfolder/&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; .&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is what the "-arv" option does:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;a &lt;/span&gt;= archive - means it preserves permissions (owners, groups), times, symbolic links, and devices.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;r&lt;/span&gt; = recursive - means it copies directories and sub directories&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;v&lt;/span&gt; = verbose - means that it prints on the screen what is being copied&lt;br /&gt;add &lt;span style="font-weight: bold;"&gt;--progress&lt;/span&gt; at the end of the command to get a running tally of what's going on&lt;br /&gt;eg&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rsync -avr * /media/usb/ --progress&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;another good example&lt;br /&gt;&lt;br /&gt;&lt;b&gt;rsync -avr --progress --delete --log-file=/var/log/$(date +%Y%m%d)_rsync.log user1@serverexample.com:/home/folder/ /home/folder/&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;will create a log file and document the progress into the logfile&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;-- delete&lt;/b&gt; will delete on the destination server what ever files have been deleted from the source&amp;nbsp; (it wont delete files on your source server, only destination)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Excluding files&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;rsync -avr --exclude '*.iso' source/ destination/&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Will Exclude all iso files&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;or you can write it like this , it&amp;nbsp;&lt;/span&gt;doesn't&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;matter, it still works&lt;/span&gt;&lt;br /&gt;&lt;b&gt;rsync -avr source/ destination/ --exclude '*.iso' --progress&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2793510663284686340?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2793510663284686340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2793510663284686340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2793510663284686340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2793510663284686340'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2011/06/rsync.html' title='Rsync'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-T0Gx2Zn-7vk/Te3FlvTAaxI/AAAAAAAAAg0/8vktuUs_rv0/s72-c/timemachine.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4734857556780467630</id><published>2010-12-03T00:23:00.000+02:00</published><updated>2010-12-03T00:24:42.338+02:00</updated><title type='text'>Output your microphone to a remote computer’s speaker</title><content type='html'>&lt;p&gt;&lt;strong&gt;dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp&lt;/strong&gt;&lt;/p&gt; This will output the sound from your microphone port to the ssh  target computer’s speaker port. The sound quality is  bad, so you  will hear a lot of hissing,&lt;br /&gt;but it works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4734857556780467630?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4734857556780467630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4734857556780467630' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4734857556780467630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4734857556780467630'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/12/output-your-microphone-to-remote.html' title='Output your microphone to a remote computer’s speaker'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-8607589909548376896</id><published>2010-12-02T23:46:00.004+02:00</published><updated>2010-12-03T00:03:03.142+02:00</updated><title type='text'>Email alert on Root Login</title><content type='html'>&lt;p&gt;This will allow you to be notified instantly via email whenever  someone logs into your server as  root.&lt;/p&gt;ssh into your server&lt;br /&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;su&lt;/span&gt; to root&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;sudo&lt;/span&gt; -i &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;or &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;su&lt;/span&gt; -&lt;/span&gt;&lt;/p&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;cd&lt;/span&gt; to /root&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;cd&lt;/span&gt; /root&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;edit your .&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;bashrc&lt;/span&gt; file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;vim .&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;bashrc&lt;/span&gt; &lt;/span&gt;  &lt;p&gt; add the following to the end of the file&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;echo 'ALERT - Root Shell Access (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;YourserverName&lt;/span&gt;) on:' `date` `who` |  mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`"  you@yourdomain.com &lt;/p&gt;  &lt;p&gt;Replace &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;YourServerName&lt;/span&gt; with the name of your  server.&lt;/p&gt;&lt;p&gt;Replace you@yourdomain.com with the email address you want the alerts sent to. &lt;/p&gt;  &lt;p&gt;&lt;span style="font-weight: bold;"&gt;:x&lt;/span&gt; to save and exit&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;logout&lt;/span&gt; from your server, close the connection and log back in.&lt;/p&gt;&lt;p&gt; You will  receive an email alert of the root &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;login&lt;/span&gt; after a few minutes. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-8607589909548376896?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/8607589909548376896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=8607589909548376896' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8607589909548376896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8607589909548376896'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/12/email-alert-on-root-login.html' title='Email alert on Root Login'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2095608752834218187</id><published>2010-11-27T13:26:00.001+02:00</published><updated>2010-11-27T13:26:53.120+02:00</updated><title type='text'>Mutt Tips</title><content type='html'>searching in mutt&lt;br /&gt;&lt;br /&gt;    *  ~f brucewayne :From: matches "brucewayne"&lt;br /&gt;    *  ~s party : messages with subject containing "party"&lt;br /&gt;    * ~d &lt;2w : messages less than two weeks old. Also: year, month, week, day.&lt;br /&gt;    * ~t clarkk : To: matches clarkk (useful for sent-mail folders)&lt;br /&gt;    * ~O : old (i.e. unread but not new) messages.&lt;br /&gt;      ~N is new unread.&lt;br /&gt;      ~U is unread, i.e. both together.&lt;br /&gt;    * ~p : messages addressed to you (useful if your inbox is bombarded with mailing list or system report activity).&lt;br /&gt;    * ~p ~U : for messages to you you haven't read yet.&lt;br /&gt;    * . : matches everything. In effect, remove the limit.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;l limit messages matching&lt;br /&gt;l all show all messages&lt;br /&gt;:set sort=from  sort messages by "From"&lt;br /&gt;:set sort=threads  sort messages by "Thread"&lt;br /&gt;:set sort=date  sort messages by "Date"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;mailbox "=cgerada" will show alerts in cgerada mailbox&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2095608752834218187?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2095608752834218187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2095608752834218187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2095608752834218187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2095608752834218187'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/11/mutt-tips.html' title='Mutt Tips'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-3966024799106312273</id><published>2010-11-26T13:56:00.003+02:00</published><updated>2012-01-26T10:40:19.184+02:00</updated><title type='text'>Bash Cheat Sheet</title><content type='html'>&lt;pre class="sheet"&gt; &lt;span style="font-family: inherit;"&gt;!! - Last command (usefull if you forget to run a command as sudo)&lt;br /&gt; sudo !!  (runs last command as sudo)&lt;br /&gt; !foo - Run most recent command starting with 'foo...' (ex. !ps, !mysqladmin)&lt;br /&gt; !foo:p - Print command that !foo would run, and add it as the latest to&lt;br /&gt; command history&lt;br /&gt; !$ - Last 'word' of last command ('/path/to/file' in the command 'ls -lAFh&lt;br /&gt; /path/to/file', '-uroot' in 'mysql -uroot')&lt;br /&gt; !$:p - Print word that !$ would substitute&lt;br /&gt; !* - All but first word of last command ('-lAFh /path/to/file' in the command&lt;br /&gt; 'ls -lAFh /path/to/file', '-uroot' in 'mysql -uroot')&lt;br /&gt; !*:p - Print words that !* would substitute&lt;br /&gt;&lt;br /&gt; ^foo^bar - Replace 'foo' in last command with 'bar', print the result, then&lt;br /&gt; run. ('mysqladmni -uroot', run '^ni^in', results in 'mysqladmin -uroot')&lt;br /&gt;&lt;br /&gt; {a,b,c} passes words to the command, substituting a, b, and c sequentially&lt;br /&gt; (`cp file{,.bk}` runs `cp file file.bk`)&lt;br /&gt;&lt;br /&gt; Ctrl + a - Jump to the start of the line&lt;br /&gt; Ctrl + b - Move back a char&lt;br /&gt; Ctrl + c - Terminate the command&lt;br /&gt; Ctrl + d - Delete from under the cursor&lt;br /&gt; Ctrl + e - Jump to the end of the line&lt;br /&gt; Ctrl + f - Move forward a char&lt;br /&gt; Ctrl + k - Delete to EOL&lt;br /&gt; Ctrl + l - Clear the screen&lt;br /&gt; Ctrl + r - Search the history backwards&lt;br /&gt; Ctrl + R - Search the history backwards with multi occurrence&lt;br /&gt; Ctrl + t - Transpose the current char with the previous&lt;br /&gt; Ctrl + u - Delete backward from cursor&lt;br /&gt; Ctrl + w - Delete backward a word&lt;br /&gt; Ctrl + xx - Move between EOL and current cursor position&lt;br /&gt; Ctrl + x @ - Show possible hostname completions&lt;br /&gt; Ctrl + z - Suspend/ Stop the command&lt;br /&gt; Ctrl + x; Ctrl + e - Edit line into your favorite editor&lt;br /&gt;&lt;br /&gt; Alt + &amp;lt; - Move to the first line in the history  Alt + &amp;gt; - Move to the last line in the history&lt;br /&gt; Alt + ? - Show current completion list&lt;br /&gt; Alt + * - Insert all possible completions&lt;br /&gt; Alt + / - Attempt to complete filename&lt;br /&gt; Alt + . - Yank last argument to previous command&lt;br /&gt; Alt + b - Move backward&lt;br /&gt; Alt + c - Capitalize the word&lt;br /&gt; Alt + d - Delete word&lt;br /&gt; Alt + f - Move forward&lt;br /&gt; Alt + l - Make word lowercase&lt;br /&gt; Alt + n - Search the history forwards non-incremental&lt;br /&gt; Alt + p - Search the history backwards non-incremental&lt;br /&gt; Alt + r - Recall command&lt;br /&gt; Alt + t - Transpose the current word with the previous&lt;br /&gt; Alt + u - Make word uppercase&lt;br /&gt; Alt + back-space - Delete backward from cursor&lt;br /&gt;&lt;br /&gt; (Here "2T" means Press TAB twice)&lt;br /&gt; $ 2T - All available commands(common)&lt;br /&gt; $ (string)2T - All available commands starting with (string)&lt;br /&gt; $ /2T - Entire directory structure including Hidden one&lt;br /&gt; $ (dir)2T - Only Sub Dirs inside (dir) including Hidden one&lt;br /&gt; $ *2T - Only Sub Dirs inside without Hidden one&lt;br /&gt; $ ~2T - All Present Users on system from "/etc/passwd"&lt;br /&gt; $ $2T - All Sys variables&lt;br /&gt; $ @2T - Entries from "/etc/hosts"&lt;br /&gt; $ =2T - Output like ls or dir&lt;br /&gt; .bash_profile = sourced by login shell,&lt;br /&gt; .bashrc = sourced by all shells,&lt;br /&gt; .bash_aliases = should be sourced by .bashrc&lt;br /&gt;&lt;br /&gt;Run something:&lt;br /&gt; for i in a b c; do $i 'hello'; done&lt;br /&gt;&lt;br /&gt;Do something on a bunch of files:&lt;br /&gt; for i in *.rb; do echo $i; done&lt;br /&gt;&lt;br /&gt;If syntax:&lt;br /&gt; if [ -e .ssh ]; then echo "hi"; fi&lt;br /&gt;&lt;br /&gt;file check flags:&lt;br /&gt; -e:  file exists&lt;br /&gt; -f:  regular file (non directory)&lt;br /&gt; -d:  directory&lt;br /&gt; -s:  non-zero file&lt;br /&gt; -x:  execute permission&lt;br /&gt;&lt;br /&gt;Avoid duplicates in your history:&lt;br /&gt; export HISTIGNORE="&amp;amp;:ls:ls *:[bf]g:exit"&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-3966024799106312273?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/3966024799106312273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=3966024799106312273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3966024799106312273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3966024799106312273'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/11/bash-cheat-sheet.html' title='Bash Cheat Sheet'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-846911739325280116</id><published>2010-11-10T23:53:00.004+02:00</published><updated>2011-09-01T12:31:05.638+02:00</updated><title type='text'>SMBCLIENT</title><content type='html'>&lt;span style="font-weight: bold;"&gt;smbclient -L servername&lt;/span&gt;&lt;br /&gt;will show you all available samba / windows shares&lt;br /&gt;&lt;br /&gt;To connect to a windows or samba share type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;smbclient \\\\servername\\share -U username&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you will be asked for your windows password for the username specified&lt;br /&gt;&lt;br /&gt;once connected smbclient works like an  FTP client&lt;br /&gt;&lt;br /&gt;type &lt;span style="font-weight: bold;"&gt;help&lt;/span&gt; for a list of commands.&lt;br /&gt;&lt;br /&gt;Keep in mind, you'll need a leading "\" before spaces (ex: My\ Filename.txt).&lt;br /&gt;&lt;br /&gt;or alternatively  put your filenames in quotes eg "My Filename.txt"&lt;br /&gt;&lt;br /&gt;once connected&lt;br /&gt;to copy directories and subdirectories type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;recurse&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to not be asked (prompted)if you want to replace files. type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;prompt&lt;/span&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-846911739325280116?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/846911739325280116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=846911739325280116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/846911739325280116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/846911739325280116'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/11/smbclient.html' title='SMBCLIENT'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-3160957033125821195</id><published>2010-11-03T11:08:00.018+02:00</published><updated>2010-11-03T16:09:46.398+02:00</updated><title type='text'>Setting UP VNC server on a CentOs or Redhat  server</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_O1RbeaI0mtw/TNFNnu74rbI/AAAAAAAAAfQ/7I8Q4YBTz7g/s1600/vnc.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 200px; height: 173px;" src="http://2.bp.blogspot.com/_O1RbeaI0mtw/TNFNnu74rbI/AAAAAAAAAfQ/7I8Q4YBTz7g/s200/vnc.jpg" alt="" id="BLOGGER_PHOTO_ID_5535290762024496562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;table style="width: 662px; height: 845px;" id="post3122525" class="tborder" align="center" border="0" cellpadding="3" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td class="alt2" id="td_post_3122525" style="border-right: 1px solid rgb(255, 255, 255);"&gt;&lt;div id="post_message_3122525"&gt;To set up &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;VNC&lt;/span&gt;&lt;/span&gt; properly, so that you have access to the local&lt;br /&gt;default X console of your server as if  you are sitting &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;in front&lt;/span&gt;&lt;br /&gt;of the physical server.&lt;br /&gt;follow these steps.&lt;br /&gt;&lt;br /&gt;On the server, type  &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;vncpasswd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; as root to set a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;VNC&lt;/span&gt;&lt;/span&gt; password.&lt;br /&gt;You will use this password when  connecting with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;vncviewer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Edit the file /etc/X11/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;xorg&lt;/span&gt;&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the stanza called Screen, add this line:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Option "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;passwordFile&lt;/span&gt;&lt;/span&gt;" "/root/.vnc/passwd"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then&lt;br /&gt;add in the following lines at the end of the file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Section "Module"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Load "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;glx&lt;/span&gt;&lt;/span&gt;"&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Load "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;dbe&lt;/span&gt;&lt;/span&gt;"&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Load "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;extmod&lt;/span&gt;&lt;/span&gt;"&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Load "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;freetype&lt;/span&gt;&lt;/span&gt;"&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Load "type1"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Load "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;dri&lt;/span&gt;&lt;/span&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Load "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;vnc&lt;/span&gt;&lt;/span&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;EndSection&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;save the file&lt;br /&gt;&lt;br /&gt;Allow the ports in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;iptables&lt;/span&gt;&lt;/span&gt; Firewall&lt;br /&gt;by typing the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;system-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;config&lt;/span&gt;&lt;/span&gt;-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;securitylevel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the "Other ports", add the following range.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5900-5904&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Save and close the tool then restart the firewall by typing the following:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;service &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;iptables&lt;/span&gt;&lt;/span&gt; restart&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;/etc/init.d/iptables restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;chkconfig&lt;/span&gt;&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;vncserver&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to have &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;vncserver&lt;/span&gt;&lt;/span&gt; automatically start when the server next boots up.&lt;br /&gt;&lt;br /&gt;Then &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_21"&gt;finally&lt;/span&gt; RESTART the server.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;                                     &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td class="alt2" style="border-width: 0px 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(255, 255, 255) rgb(255, 255, 255);"&gt;              &lt;br /&gt;&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/696132948753636518-3160957033125821195?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/3160957033125821195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=3160957033125821195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3160957033125821195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3160957033125821195'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/11/setting-up-vnc-server-on-centos-or.html' title='Setting UP VNC server on a CentOs or Redhat  server'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_O1RbeaI0mtw/TNFNnu74rbI/AAAAAAAAAfQ/7I8Q4YBTz7g/s72-c/vnc.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-3268216797501845215</id><published>2010-10-29T16:56:00.005+02:00</published><updated>2010-11-01T19:35:51.141+02:00</updated><title type='text'>recovering from a read only / mount</title><content type='html'>When the boot process aborts upon failing to find a removed or failed hard disk due to the system not finding the device that your&lt;span style="font-weight: bold;"&gt; /etc/fstab&lt;/span&gt; file references , it asks for a password and gives you the option to drop into maintenance mode , however when in maintenance mode you are unable to edit your&lt;span style="font-weight: bold;"&gt; /etc/fstab&lt;/span&gt; file to fix the problem since your &lt;span style="font-weight: bold;"&gt;/&lt;/span&gt; partition is mounted  Read only!&lt;br /&gt;&lt;br /&gt;to fix the situation simply type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mount -n -o remount /&lt;/span&gt;&lt;br /&gt;will remount the / partition in  rw mode and you can now  edit &lt;span style="font-weight: bold;"&gt;/etc/fstab&lt;/span&gt; and remove the&lt;br /&gt;line with the faulty disk or wrong entry, and then reboot as normal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-3268216797501845215?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/3268216797501845215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=3268216797501845215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3268216797501845215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3268216797501845215'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/10/recovering-from-read-only-mount.html' title='recovering from a read only / mount'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4088212371271913338</id><published>2010-08-22T01:20:00.001+02:00</published><updated>2010-08-22T10:29:31.547+02:00</updated><title type='text'>Encrypt a file whilst in Vim</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_O1RbeaI0mtw/THDfxQbEwYI/AAAAAAAAAew/xUFVREyAMtw/s1600/vim_3dlogo_wallpaper_flat01_black.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 200px; height: 150px;" src="http://4.bp.blogspot.com/_O1RbeaI0mtw/THDfxQbEwYI/AAAAAAAAAew/xUFVREyAMtw/s200/vim_3dlogo_wallpaper_flat01_black.jpg" alt="" id="BLOGGER_PHOTO_ID_5508148381589225858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Encrypt File in Vim&lt;br /&gt;Save and encrypt the current file:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;:X&lt;/span&gt;&lt;br /&gt;Enter encryption key: ********&lt;br /&gt;Enter same key again: ********&lt;br /&gt;Once you’ve encrypted a file using &lt;span style="font-weight: bold;"&gt;:X&lt;/span&gt;, the next time you open that file, Vim&lt;br /&gt;will prompt for the encryption key.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4088212371271913338?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4088212371271913338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4088212371271913338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4088212371271913338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4088212371271913338'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/08/encrypt-file-whilst-in-vim.html' title='Encrypt a file whilst in Vim'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_O1RbeaI0mtw/THDfxQbEwYI/AAAAAAAAAew/xUFVREyAMtw/s72-c/vim_3dlogo_wallpaper_flat01_black.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-3707366875613478347</id><published>2010-05-25T23:33:00.009+02:00</published><updated>2010-05-25T23:51:22.238+02:00</updated><title type='text'>How to Upgrade from Fedora 12 to Fedora 13 (32 bit and 64 bit versions)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_O1RbeaI0mtw/S_xGT-x_EYI/AAAAAAAAAd8/zXBIAkKXNCU/s1600/f13release.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 100px;" src="http://1.bp.blogspot.com/_O1RbeaI0mtw/S_xGT-x_EYI/AAAAAAAAAd8/zXBIAkKXNCU/s200/f13release.png" alt="" id="BLOGGER_PHOTO_ID_5475328556059791746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Do the following as root.&lt;br /&gt;&lt;p&gt;download latest fedora repos&lt;/p&gt;&lt;p&gt;        For 32 bit version type:&lt;br /&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;p style="font-weight: bold;"&gt;wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/i386/os/Packages/fedora-release-13-1.noarch.rpm&lt;/p&gt;&lt;p&gt;or for 64 bit version type:&lt;br /&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/x86_64/os/Packages/fedora-release-13-1.noarch.rpm&lt;/span&gt;&lt;/blockquote&gt; &lt;p&gt;import gpg-key&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;span&gt;&lt;span&gt;rpm --import ftp://download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/i386/os/RPM-GPG-KEY-fedora-i386&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;or for 64 bit version type:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;span&gt;&lt;span&gt;rpm --import ftp://download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/x86_64/os/RPM-GPG-KEY-fedora-i386&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre style="display: none;" name="code" class="html:nocontrols:firstline[1]"&gt;rpm --import ftp://download.fedora.redhat.com/pub/fedora/linux/releases/13/Everything/i386/os/RPM-GPG-KEY-fedora-i386 &lt;/pre&gt; &lt;p&gt;install rpmlibs dependency. Required to install fedora-release-13&lt;/p&gt; &lt;blockquote style="font-weight: bold;"&gt;&lt;p&gt;yum install rpm-libs -y&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;upgrade fedora release&lt;/p&gt; &lt;blockquote style="font-weight: bold;"&gt;&lt;p&gt;rpm -Uvh fedora-release-13-1.noarch.rpm&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;upgrade fedora distro&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;yum upgrade -y&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;Reboot and Enjoy&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-3707366875613478347?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/3707366875613478347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=3707366875613478347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3707366875613478347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3707366875613478347'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/05/how-to-upgrade-from-fedora-12-to-fedora.html' title='How to Upgrade from Fedora 12 to Fedora 13 (32 bit and 64 bit versions)'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_O1RbeaI0mtw/S_xGT-x_EYI/AAAAAAAAAd8/zXBIAkKXNCU/s72-c/f13release.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1133252731324593160</id><published>2010-01-12T23:27:00.010+02:00</published><updated>2010-01-13T23:55:25.989+02:00</updated><title type='text'>Compose Key</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_O1RbeaI0mtw/S0ztEkxwWMI/AAAAAAAAAdo/dNiNanLd92o/s1600-h/Compose_key_on_LK201_keyboard.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 151px;" src="http://1.bp.blogspot.com/_O1RbeaI0mtw/S0ztEkxwWMI/AAAAAAAAAdo/dNiNanLd92o/s200/Compose_key_on_LK201_keyboard.jpg" alt="" id="BLOGGER_PHOTO_ID_5425972313922230466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I often need to type characters that aren’t on the keyboard, like € ½ ÷ © ¥ or ¢.&lt;br /&gt;&lt;br /&gt;compose key to the rescue.&lt;br /&gt;&lt;br /&gt;pick a key on your keyboard you don’t use much, like [Insert], [CapsLock], or [menu], and make it the “compose key”.&lt;br /&gt;&lt;br /&gt;Then to make any character, you just hit the compose key, then type the two obvious keys that, when combined, make up the character.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;br /&gt;  * To get €, just type e then =&lt;br /&gt;&lt;br /&gt;  * To get ©, just type o then c&lt;br /&gt;&lt;br /&gt;* To get ® just type o then r&lt;br /&gt;&lt;br /&gt;  * To get £, just type L then -&lt;br /&gt;&lt;br /&gt;  * To get ¥, just type Y then =&lt;br /&gt;&lt;br /&gt;  * ¢ is c then |&lt;br /&gt;&lt;br /&gt;  * ÷ is - then :&lt;br /&gt;&lt;br /&gt;  * ½ is 1 then 2&lt;br /&gt;&lt;br /&gt;* ¼ is 1 then 4&lt;br /&gt;&lt;br /&gt;  * ñ is n then ~&lt;br /&gt;&lt;br /&gt;By default this function is not assigned to any key. You can tell the X server what key to use for this function with the following command&lt;br /&gt; &lt;span style="font-weight: bold;"&gt; setxkbmap -option compose:&lt;span style="font-style: italic;"&gt;keyname&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for example&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;setxkbmap -option compose:caps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to assign it to the caps-lock key.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;or setxkbmap -option compose:rwin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to assign your right "Windows" key&lt;br /&gt;to make it persisistent after a reboot simply insert the command in your&lt;br /&gt;/etc/rc.local file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1133252731324593160?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1133252731324593160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1133252731324593160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1133252731324593160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1133252731324593160'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2010/01/compose-key.html' title='Compose Key'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_O1RbeaI0mtw/S0ztEkxwWMI/AAAAAAAAAdo/dNiNanLd92o/s72-c/Compose_key_on_LK201_keyboard.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1957483391575307834</id><published>2009-12-30T20:03:00.010+02:00</published><updated>2009-12-31T20:25:47.354+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='best linux games'/><category scheme='http://www.blogger.com/atom/ns#' term='linux games'/><title type='text'>Loads of Linux GAMES</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_O1RbeaI0mtw/SzzpqF7wRHI/AAAAAAAAAdY/X5Xfg_WA80c/s1600-h/games.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 136px;" src="http://3.bp.blogspot.com/_O1RbeaI0mtw/SzzpqF7wRHI/AAAAAAAAAdY/X5Xfg_WA80c/s200/games.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5421464960803816562" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;djl&lt;/span&gt; is an open-source game manager for Linux, written in Python&lt;br /&gt;&lt;br /&gt;download the installer script from &lt;a href="http://en.djl-linux.org/?q=node/19"&gt;http://en.djl-linux.org/?q=node/19&lt;/a&gt; &lt;br /&gt;Once you download the file you will need to extract it.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;tar -xzvf djl-1.2.20.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight:bold;"&gt;djl.sh&lt;/span&gt; contained inside the archive needs to be executable in order to run, so you may have to make it executable by typing the following.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;chmod +x djl.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then to run the script, type &lt;span style="font-weight:bold;"&gt;./djl.sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you run the script the first time, if you do not have the Python framework installed, you'll get an error. Fortunately The script will point out the missing python-qt4 libraries. Fire up your package manager and install it. Alternatively, use the command line to install the package.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;yum install "package name"&lt;/span&gt;  or &lt;span style="font-weight:bold;"&gt;apt-get install "package name"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you have everything in place, run the application. You will be asked to configure djl. This includes configuring the installation directory for your games, the Web browser of your choice, the default tab in the main menu, the font size, updates, dependencies, and more. Very convenient.&lt;br /&gt;&lt;br /&gt;After you download the News items, you're ready to roll.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Go to Repository tab and start enjoying this  powerful game manager. You can search the games by genre, or by additional categories, like license or price. &lt;br /&gt;&lt;br /&gt;Games are just as easy to un-install as they are to install&lt;br /&gt;&lt;br /&gt;Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1957483391575307834?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1957483391575307834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1957483391575307834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1957483391575307834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1957483391575307834'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/12/loads-of-linux-games.html' title='Loads of Linux GAMES'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_O1RbeaI0mtw/SzzpqF7wRHI/AAAAAAAAAdY/X5Xfg_WA80c/s72-c/games.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-8882728949058745592</id><published>2009-11-06T11:50:00.005+02:00</published><updated>2009-11-09T10:15:39.695+02:00</updated><title type='text'>Setting up a  DHCP server</title><content type='html'>assuming the Network you want to add a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DHCP&lt;/span&gt; server to is the&lt;br /&gt;&lt;br /&gt;192.168.1.0/24 network&lt;br /&gt;&lt;br /&gt;your router &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;IP&lt;/span&gt; Address is 192.168.1.1&lt;br /&gt;&lt;br /&gt;Your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ISP's&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;DNS&lt;/span&gt; servers &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;IP&lt;/span&gt; Address is 194.158.2.2&lt;br /&gt;&lt;br /&gt;the leases that you want to give out are 192.168.1.128 to 192.168.1.254&lt;br /&gt;&lt;br /&gt;first install the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;DHCP&lt;/span&gt; server software.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;yum install &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;dhcp&lt;/span&gt;.i386&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;once installed&lt;br /&gt;&lt;br /&gt;edit /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;dhcpd&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;conf&lt;/span&gt; (if it doesn't exist create it)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;vi /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;dhcpd&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add in the following lines&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;ddns&lt;/span&gt;-update-style interim;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ignore client-updates;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;subnet&lt;/span&gt; 192.168.1.0 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;netmask&lt;/span&gt; 255.255.255.0 {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        range 192.168.1.128 192.168.1.254;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        default-lease-time 21600;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        max-lease-time 43200;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        option routers                               192.168.1.1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        option &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;ip&lt;/span&gt;-forwarding off;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        option domain-name-servers       194.158.2.2;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        option broadcast-address        192.168.1.255;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        option &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;subnet&lt;/span&gt;-mask                 255.255.255.0;&lt;/span&gt;&lt;br /&gt;       &lt;br /&gt;save the file &lt;span style="font-weight: bold;"&gt;:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;wq&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;next,  configure the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;dhcpd&lt;/span&gt; service to start at &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;start up&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;chkconfig&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;dhcpd&lt;/span&gt; on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to make sure it is running either reboot or type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/dhcpd start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;that's it , your done. Your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;DHCP&lt;/span&gt; server will give out &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;IP&lt;/span&gt; addresses to any clients that connect to your network.&lt;br /&gt;there are many other options that you can add to your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;DHCP&lt;/span&gt; server, like reserving an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;IP&lt;/span&gt; address for a  specific mac-address  etc&lt;br /&gt;&lt;br /&gt;to see all of these option just check out the man pages of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;dhcpd&lt;/span&gt;&lt;br /&gt;type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;man &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;dhcpd&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/696132948753636518-8882728949058745592?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/8882728949058745592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=8882728949058745592' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8882728949058745592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8882728949058745592'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/11/setting-up-dhcp-server.html' title='Setting up a  DHCP server'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5384127364425021940</id><published>2009-11-05T18:34:00.004+02:00</published><updated>2009-11-05T19:39:53.047+02:00</updated><title type='text'>Source .bashrc when you connect over SSH</title><content type='html'>If your  &lt;span style="font-weight: bold;"&gt;.bashrc&lt;/span&gt; file is not being sourced when you connect to your system over SSH and it only gets sourced when you open up a terminal locally on the system.&lt;br /&gt;&lt;br /&gt;you may need to add the following to your &lt;span style="font-weight: bold;"&gt;etc/profile&lt;/span&gt; file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;if [ -e ~/.bashrc ]; then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;. ~/.bashrc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;fi &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5384127364425021940?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5384127364425021940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5384127364425021940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5384127364425021940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5384127364425021940'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/11/source-bashrc-when-you-connect-over-ssh.html' title='Source .bashrc when you connect over SSH'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-7253377648378854498</id><published>2009-11-03T12:51:00.006+02:00</published><updated>2009-11-04T00:54:25.488+02:00</updated><title type='text'>VMWare boot from CD</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_O1RbeaI0mtw/SvANO_7hTKI/AAAAAAAAAdM/pMt-a0clT6g/s1600-h/VMware-bios.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 190px;" src="http://3.bp.blogspot.com/_O1RbeaI0mtw/SvANO_7hTKI/AAAAAAAAAdM/pMt-a0clT6g/s200/VMware-bios.png" alt="" id="BLOGGER_PHOTO_ID_5399830504547634338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;VMWare&lt;/span&gt; can be very frustrating when you try and boot a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;VM&lt;/span&gt; from a CD  .&lt;br /&gt;&lt;br /&gt;The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;VM&lt;/span&gt;’s BIOS is set to boot from disk first, so you need to change the boot device order. The problem is that the boot process is so fast that you never have enough time to hit the F2 key and enter the bios setup to change the boot order of your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;VM&lt;/span&gt;.&lt;br /&gt;A solution to the problem is to edit the &lt;span style="font-weight: bold;"&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;vmx&lt;/span&gt; &lt;/span&gt;file in your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;VM's&lt;/span&gt; directory and simply add the following line.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bios.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;bootDelay&lt;/span&gt; = “boot delay in milliseconds”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for example if you want to give yourself 20 seconds add the following line&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bios.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;bootDelay&lt;/span&gt; = “20000”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;save the file and then restart your Virtual machine.&lt;br /&gt;You will now have enough time to enter into the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;VM's&lt;/span&gt; console and hit the F2 key so that you can edit the boot order in the Bios.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-7253377648378854498?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/7253377648378854498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=7253377648378854498' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7253377648378854498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7253377648378854498'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/11/vmware-boot-from-cd.html' title='VMWare boot from CD'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_O1RbeaI0mtw/SvANO_7hTKI/AAAAAAAAAdM/pMt-a0clT6g/s72-c/VMware-bios.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-8345575986220999573</id><published>2009-10-28T08:57:00.007+02:00</published><updated>2010-02-10T23:43:07.690+02:00</updated><title type='text'>Right Click Open Terminal in current folder</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_O1RbeaI0mtw/SufwbUZWW7I/AAAAAAAAAdE/TOxEMZP5K-A/s1600-h/rc.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 274px;" src="http://1.bp.blogspot.com/_O1RbeaI0mtw/SufwbUZWW7I/AAAAAAAAAdE/TOxEMZP5K-A/s320/rc.jpg" alt="" id="BLOGGER_PHOTO_ID_5397547030548994994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;nautilus-open-terminal runs on Gnome Windows manager and it allows you to right click  in your file manager&lt;br /&gt;and  open up your terminal in the current folder. Clearly a very useful tool.&lt;br /&gt;&lt;br /&gt;It used to be installed as a default application in many distributions but for some reason  it was left out of Fedora 11&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To add it back in simply type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;sudo yum install nautilus-open-terminal&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If it somehow got left out of your Ubuntu installation, then type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;sudo apt-get install nautilus-open-terminal&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will need to restart your Gnome session to activate it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-8345575986220999573?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/8345575986220999573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=8345575986220999573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8345575986220999573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8345575986220999573'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/10/right-click-open-terminal-in-current.html' title='Right Click Open Terminal in current folder'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_O1RbeaI0mtw/SufwbUZWW7I/AAAAAAAAAdE/TOxEMZP5K-A/s72-c/rc.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4969214334694972437</id><published>2009-10-23T07:49:00.006+02:00</published><updated>2009-10-23T07:57:22.055+02:00</updated><title type='text'>How to Install Google Chrome on Ubuntu</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_O1RbeaI0mtw/SuFEwH99BfI/AAAAAAAAAc0/Vklb4qdKRXg/s1600-h/chrome.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 164px;" src="http://1.bp.blogspot.com/_O1RbeaI0mtw/SuFEwH99BfI/AAAAAAAAAc0/Vklb4qdKRXg/s200/chrome.png" alt="" id="BLOGGER_PHOTO_ID_5395669422129874418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;edit the /etc/apt/sources.list file &lt;blockquote style="font-weight: bold;"&gt;&lt;p&gt;sudo vim /etc/apt/sources.list&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Add one of the following&lt;/p&gt; &lt;p&gt;&lt;strong&gt;For ubuntu 9.10 (armic)  add the following two lines&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main&lt;br /&gt;deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu karmic main&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;For ubuntu 9.04 (Jaunty) &lt;/strong&gt; add the following two lines&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main&lt;br /&gt;deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main&lt;/p&gt;&lt;p&gt;&lt;strong&gt;For ubuntu 8.10 (Intrepid) &lt;/strong&gt; add the following two lines&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main&lt;br /&gt;deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu intrepid main&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Save the file&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Next add the GPG key by typing:&lt;br /&gt;&lt;/p&gt; &lt;blockquote style="font-weight: bold;"&gt;&lt;p&gt;sudo apt-key adv &lt;code&gt;--&lt;/code&gt;recv-keys &lt;code&gt;--&lt;/code&gt;keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Update the source list. by typing&lt;br /&gt;&lt;/p&gt; &lt;blockquote style="font-weight: bold;"&gt;&lt;p&gt;sudo apt-get update&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Install chromium by typing&lt;br /&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;p style="font-weight: bold;"&gt;sudo apt-get install chromium-browser&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;Done&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4969214334694972437?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4969214334694972437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4969214334694972437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4969214334694972437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4969214334694972437'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/10/install-google-chrome-on-ubuntu.html' title='How to Install Google Chrome on Ubuntu'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_O1RbeaI0mtw/SuFEwH99BfI/AAAAAAAAAc0/Vklb4qdKRXg/s72-c/chrome.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6859942417367516431</id><published>2009-10-19T20:38:00.008+02:00</published><updated>2009-11-09T22:47:26.566+02:00</updated><title type='text'>Clone a hard Drive</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_O1RbeaI0mtw/Styzcd1ly2I/AAAAAAAAAcs/-Q_m95WSisY/s1600-h/HDDClone.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 126px;" src="http://1.bp.blogspot.com/_O1RbeaI0mtw/Styzcd1ly2I/AAAAAAAAAcs/-Q_m95WSisY/s200/HDDClone.jpg" alt="" id="BLOGGER_PHOTO_ID_5394383755310123874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Good, easy way to clone a hard drive.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dd&lt;/span&gt; which is used for converting and copying files, can be used as a powerful and simple image cloning application.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;dd if=/dev/hda of=/dev/hdb&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;done&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;if you want to see your progress&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;then type in another terminal&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;kill -SIGUSR1 xxxx&lt;/span&gt;&lt;br /&gt;were xxxx is the process ID of the running dd process&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;and the progress will report on the original terminal that you started your cloning operation on.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&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/696132948753636518-6859942417367516431?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6859942417367516431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6859942417367516431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6859942417367516431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6859942417367516431'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/10/clone-hard-drive.html' title='Clone a hard Drive'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_O1RbeaI0mtw/Styzcd1ly2I/AAAAAAAAAcs/-Q_m95WSisY/s72-c/HDDClone.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1691293919163039589</id><published>2009-10-14T21:13:00.011+02:00</published><updated>2009-10-15T11:58:21.771+02:00</updated><title type='text'>share a single mouse and keyboard accross multiple computers</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_O1RbeaI0mtw/Stbi6aMo5EI/AAAAAAAAAcc/2IHfTuTUG9I/s1600-h/synergy4.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 133px;" src="http://2.bp.blogspot.com/_O1RbeaI0mtw/Stbi6aMo5EI/AAAAAAAAAcc/2IHfTuTUG9I/s200/synergy4.jpg" alt="" id="BLOGGER_PHOTO_ID_5392747096915371074" border="0" /&gt;&lt;/a&gt;Here's the scenario.&lt;p&gt;you have 3 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;PC's&lt;/span&gt; on your Desk. One running Linux , One running MAC OS and the other running Windows &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;XP&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;all 3 with their own Monitor .&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;wouldn't&lt;/span&gt; it be cool, to be able to use the same Mouse and keyboard for all 3 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;PC's&lt;/span&gt;. and to be able to copy and paste, Text, Images and HTML content between the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;PC's&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;No Problem,  (drum roll...)  ... in  steps   Synergy.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Synergy lets you share a single mouse and keyboard between multiple computers with different operating systems, each with its own display.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen.  Synergy also merges the clipboards of all the systems into one, allowing you to cut-and-paste between systems.  it also synchronizes screen savers so they all start and stop together.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Synergy uses &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;TCPIP&lt;/span&gt; to communicate mouse position and keyboard keystrokes between the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;PC's&lt;/span&gt;. So all you need for Synergy to work is to have your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;PC's&lt;/span&gt; connected to the same network. (No additional hard ware is required)&lt;/p&gt;&lt;p&gt;you can download synergy from &lt;a href="http://synergy2.sourceforge.net/"&gt;http://synergy2.sourceforge.net/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;and read the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;user guide&lt;/span&gt; and installation instructions from  &lt;a href="http://synergy2.sourceforge.net/running.html"&gt;http://synergy2.sourceforge.net/running.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1691293919163039589?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1691293919163039589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1691293919163039589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1691293919163039589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1691293919163039589'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/10/share-single-mouse-and-keyboard-accross.html' title='share a single mouse and keyboard accross multiple computers'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_O1RbeaI0mtw/Stbi6aMo5EI/AAAAAAAAAcc/2IHfTuTUG9I/s72-c/synergy4.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-236002981441190508</id><published>2009-10-06T22:51:00.007+02:00</published><updated>2009-10-06T23:02:35.920+02:00</updated><title type='text'>Shutdown a Windows Machine from your  Linux Machine</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_O1RbeaI0mtw/Ssuvn-jJ9DI/AAAAAAAAAbc/yzRy1jtqf8w/s1600-h/shutdown-computer-remotely-sms.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 200px;" src="http://2.bp.blogspot.com/_O1RbeaI0mtw/Ssuvn-jJ9DI/AAAAAAAAAbc/yzRy1jtqf8w/s200/shutdown-computer-remotely-sms.png" alt="" id="BLOGGER_PHOTO_ID_5389594480419140658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Ever need to reboot or shutdown a Windows machine on your network, from your Linux workstation.&lt;br /&gt;No problem.&lt;br /&gt;&lt;/span&gt;&lt;span style="text-decoration: underline;font-size:100%;" &gt;&lt;br /&gt;&lt;/span&gt;                 &lt;div class="description"&gt;&lt;div style="font-weight: bold;" class="line" title="Click to select this command"&gt;                 &lt;div class="command"&gt;&lt;span style="font-size:100%;"&gt;apt-get install samba-common package&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal;font-size:100%;" &gt;or &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;yum install samba-common package&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;net rpc shutdown -I ipAddressOfWindowsPC -U username%password&lt;/span&gt;&lt;/div&gt;             &lt;/div&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;This will issue a shutdown command to the Windows machine. username must be an administrator on the Windows machine.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt; Other commands are:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;net rpc shutdown -r &lt;/span&gt;: reboot the Windows machine&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;net rpc abortshutdown&lt;/span&gt; : abort shutdown of the Windows machine&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Type:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;net rpc&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;to show all  commands&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;                  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-236002981441190508?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/236002981441190508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=236002981441190508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/236002981441190508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/236002981441190508'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/10/shutdown-windows-machine-from-your.html' title='Shutdown a Windows Machine from your  Linux Machine'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_O1RbeaI0mtw/Ssuvn-jJ9DI/AAAAAAAAAbc/yzRy1jtqf8w/s72-c/shutdown-computer-remotely-sms.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2993817166800004337</id><published>2009-09-28T11:23:00.002+02:00</published><updated>2009-09-28T11:29:47.807+02:00</updated><title type='text'>How to get a complete list of packages that are installed on your system</title><content type='html'>&lt;span style="font-weight: bold;"&gt;dpkg --get-selections&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will show you a complete list of packages installed on your Ubuntu system&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rpm -qa&lt;br /&gt; &lt;/span&gt;will give you the complete list on a Fedora / Redhat /CentOS system&lt;br /&gt;&lt;br /&gt;since these lists are long its a good idea to pipe them to less&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dpkg --get-selections | less&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rpm -qa | less&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2993817166800004337?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2993817166800004337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2993817166800004337' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2993817166800004337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2993817166800004337'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/09/how-to-get-complete-list-of-packages.html' title='How to get a complete list of packages that are installed on your system'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2569532049966000666</id><published>2009-09-26T10:19:00.004+02:00</published><updated>2009-09-26T10:22:41.416+02:00</updated><title type='text'>Get Counted (The Linux Counter)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_O1RbeaI0mtw/Sr3Ovw-DA-I/AAAAAAAAAbU/jDVlfmV5C_Q/s1600-h/Logo-small.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 161px; height: 161px;" src="http://2.bp.blogspot.com/_O1RbeaI0mtw/Sr3Ovw-DA-I/AAAAAAAAAbU/jDVlfmV5C_Q/s200/Logo-small.png" alt="" id="BLOGGER_PHOTO_ID_5385688049399301090" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;&lt;a href="http://counter.li.org/"&gt;&lt;span style="font-weight: bold;"&gt;http://counter.li.org/&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2569532049966000666?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2569532049966000666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2569532049966000666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2569532049966000666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2569532049966000666'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/09/get-counted.html' title='Get Counted (The Linux Counter)'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_O1RbeaI0mtw/Sr3Ovw-DA-I/AAAAAAAAAbU/jDVlfmV5C_Q/s72-c/Logo-small.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-916573565891409379</id><published>2009-09-25T10:31:00.003+02:00</published><updated>2009-09-25T11:06:45.815+02:00</updated><title type='text'>Argument list too long</title><content type='html'>Today I was limited by rm&lt;br /&gt;&lt;br /&gt;I needed to clean up a folder by deleting previous years (2008)  log files which amounted to a few thousand  files&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rm logs-2008* &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;returned me the error&lt;br /&gt;/bin/rm:Argument too long&lt;br /&gt;&lt;br /&gt;The reason for this error is a limitation of your running kernel and will limit you to other commands as well. Like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;mv&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;cp&lt;/span&gt;, if the amount of files you want to act on is larger than the set limitation.&lt;br /&gt;&lt;br /&gt;a work around is to pipe the matching files  to rm one at a time.&lt;br /&gt;To do this,  issue the following command&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;find -name 'log2008*' | &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;xargs&lt;/span&gt; rm&lt;/span&gt;    (substitute 'log2008*' for your search string)&lt;br /&gt;&lt;br /&gt;If the files you are trying to remove have spaces in them,  then you need to use the following command&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;find -name 'log2008*' | -print0 | &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;xargs&lt;/span&gt; -0 rm&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-916573565891409379?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/916573565891409379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=916573565891409379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/916573565891409379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/916573565891409379'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/09/argument-list-too-long.html' title='Argument list too long'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5946014589989836563</id><published>2009-09-24T16:04:00.006+02:00</published><updated>2009-10-02T12:13:00.740+02:00</updated><title type='text'>Static Routes</title><content type='html'>To add a static route to say the 10.10.1.0/24 network from your machine through your gateway router who's IP is 192.168.1.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;route add -net 10.10.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will add the route to your kernel and it will be available immediately. However this will not survive a reboot.&lt;br /&gt;To make this persistent after a reboot you need to input the route into a configuration file&lt;br /&gt;&lt;br /&gt;on Ubuntu edit&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/network/interfaces&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and Red hat / Centos / Fedora&lt;br /&gt;&lt;br /&gt;edit &lt;span style="font-weight: bold;"&gt; /etc/sysconfig/network-scripts/route-eth0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;if the &lt;span style="font-weight: bold;"&gt;route-eth0&lt;/span&gt; file file does not exist (it probably won't) then create it&lt;br /&gt;and add the following&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10.10.1.0/24 via 192.168.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;save the file and then restart networking to read in the new route&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/networking restart&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5946014589989836563?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5946014589989836563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5946014589989836563' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5946014589989836563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5946014589989836563'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/09/static-routes.html' title='Static Routes'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4350627716084797880</id><published>2009-07-08T15:13:00.006+02:00</published><updated>2009-10-22T22:40:52.669+02:00</updated><title type='text'>How to install Google Chrome on Fedora</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_O1RbeaI0mtw/SlSdDlpaC9I/AAAAAAAAAbM/BvJKVZvanqM/s1600-h/chrome.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 125px;" src="http://3.bp.blogspot.com/_O1RbeaI0mtw/SlSdDlpaC9I/AAAAAAAAAbM/BvJKVZvanqM/s200/chrome.jpg" alt="" id="BLOGGER_PHOTO_ID_5356078541821316050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;vi /etc/yum.repos.d/chromium.repo&lt;/span&gt;&lt;br /&gt;&lt;pre class="text"  style="font-family:monospace;"&gt;&lt;br /&gt;paste the following into the file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[chromium]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;name=Chromium Test Packages&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;baseurl=http://spot.fedorapeople.org/chromium/F$releasever/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;enabled=1&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;gpgcheck=0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;:wq to save&lt;br /&gt;&lt;br /&gt;then &lt;span style="font-weight: bold;"&gt;yum install chromium&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;voila&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/696132948753636518-4350627716084797880?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4350627716084797880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4350627716084797880' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4350627716084797880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4350627716084797880'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/07/how-to-install-google-chrome-on-fedora.html' title='How to install Google Chrome on Fedora'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_O1RbeaI0mtw/SlSdDlpaC9I/AAAAAAAAAbM/BvJKVZvanqM/s72-c/chrome.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5283871973245960887</id><published>2009-05-15T10:29:00.006+02:00</published><updated>2009-05-20T00:17:33.131+02:00</updated><title type='text'>Dreambox HD</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_O1RbeaI0mtw/Sg0rBg1xdZI/AAAAAAAAAaU/TWwGXZ-zHqc/s1600-h/DM8000.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 204px; height: 172px;" src="http://3.bp.blogspot.com/_O1RbeaI0mtw/Sg0rBg1xdZI/AAAAAAAAAaU/TWwGXZ-zHqc/s400/DM8000.jpg" alt="" id="BLOGGER_PHOTO_ID_5335968438499243410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Every once in a while something comes along that  really impresses me, my Blackberry was one of them, Virtual Machines  another, my WD 1 Terabyte Mybook and now  dream box HD has just been  added to that list.&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;The dream box is a Linux based set-top box with a  MIPS processor, a Satellite card , gigabit Ethernet card, USB slot digital audio  out and DVI / HDMI out .(dependiing on the model you buy)&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;connected to a motorized satellite dish, you  can receive  thousands of  Satellite channels available  under the Sky, as you can imagine , there is no shortage of choice of  channels,&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;The HD channels I must say are awesome to  watch,  and by installing an internal 500GB Sata drive, you can pause live  television, and record 77 hours of  HD television in HD. &lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt; &lt;/div&gt;   &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Were the Dream box comes into its own, is the  pluggins that are available for it, and the fact that it is a Linux O.S  connected to your home network and the Internet, means that it easily serves as a HD media center for all of your Multimedia content. and the possibilities are endless. My  current setup allows me to stream television to every PC or Laptop in my house,  I can change channels from the web interface available to every PC laptop in my  house, my dream box also accesses my WD 1 terabyte Mybook drive were all my HD  home video is stored,  as well as all my digital pictures, which I can now enjoy in the comfort of my lounge in full HD and in 5.1 surround sound.  My MP3 collection is now served up to my HiFi set and my Media tomb UPnP stream is also accessible via the Dreambox. I can access my dreambox from  a blackberry, veiw the program guide and setup a recording from a Blackberry or any 3G phone.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;the dream box has been the missing link that I've  been waiting for that has made complete media convergence for the home in HD now  easy to achieve.&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;the dreambox 8000 HD can take up to 4 tuners ,  which means you can record 3 different channels at the same time whilst watching  a 4th, provided they are all on the same Satellite.&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;Now to find the time to do anything  Else.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;/span&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &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/696132948753636518-5283871973245960887?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5283871973245960887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5283871973245960887' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5283871973245960887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5283871973245960887'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/05/dreambox-hd.html' title='Dreambox HD'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_O1RbeaI0mtw/Sg0rBg1xdZI/AAAAAAAAAaU/TWwGXZ-zHqc/s72-c/DM8000.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4715069834094002159</id><published>2009-04-01T10:29:00.008+02:00</published><updated>2009-04-01T11:07:28.880+02:00</updated><title type='text'>using NMAP to Scan your entire network for Conficker</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_O1RbeaI0mtw/SdMqXB26dzI/AAAAAAAAAaM/vuQ2BXJgmLg/s1600-h/worm.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 93px; height: 106px;" src="http://4.bp.blogspot.com/_O1RbeaI0mtw/SdMqXB26dzI/AAAAAAAAAaM/vuQ2BXJgmLg/s400/worm.jpg" alt="" id="BLOGGER_PHOTO_ID_5319642159978805042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Since a signature has been discovered that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;conficker&lt;/span&gt; worm leaves&lt;br /&gt;on infected machines, you can now scan a machine and ask it ,if it is infected with the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;conficker&lt;/span&gt; worm,&lt;br /&gt;beta5 version of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;NMAP&lt;/span&gt; provides this ability.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;follow&lt;/span&gt; these quick steps to scan entire networks and give them a clean&lt;br /&gt;bill of health from the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;conficker&lt;/span&gt; worm.&lt;br /&gt;to download and install Nmap beta 5 do the following:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;wget&lt;/span&gt; http://download.insecure.org/nmap-dist/nmap-4.85BETA5.tar.bz2&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;bzip&lt;/span&gt;2 -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;cd&lt;/span&gt; nmap-4.85BETA5.tar.bz2 | tar &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;xvf&lt;/span&gt; -&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;cd&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;nmap&lt;/span&gt;-4.85BETA5&lt;/span&gt; &lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;./configure&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;make&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;su&lt;/span&gt; root&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;make install&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;to Scan for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;conficker&lt;/span&gt; type the following&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;nmap&lt;/span&gt; -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;PN&lt;/span&gt; T4 -p139,445 -n -v --script=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;smb&lt;/span&gt;-check-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;vulns&lt;/span&gt; --script-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;args&lt;/span&gt; safe=1 [target network]&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;eg&lt;/span&gt;:&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;nmap&lt;/span&gt; -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;PN&lt;/span&gt; T4 -p139,445 -n -v --script=&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;smb&lt;/span&gt;-check-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;vulns&lt;/span&gt; --script-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;args&lt;/span&gt; safe=1 192.168.1.0/24&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;the scan will take a while depending on the size of your network.&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/696132948753636518-4715069834094002159?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4715069834094002159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4715069834094002159' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4715069834094002159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4715069834094002159'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/04/using-nmap-to-scan-your-entire-network.html' title='using NMAP to Scan your entire network for Conficker'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_O1RbeaI0mtw/SdMqXB26dzI/AAAAAAAAAaM/vuQ2BXJgmLg/s72-c/worm.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-7726401232286702705</id><published>2009-03-31T23:15:00.002+02:00</published><updated>2009-03-31T23:36:26.629+02:00</updated><title type='text'>saving a file in VI as root</title><content type='html'>It often happens  that  you open up a file for editing using vi or vim and only when you come to save the file,  you realise you did not open the file with root privileges and are unable to save the file.&lt;br /&gt;&lt;br /&gt;when you type &lt;span style="font-weight: bold;"&gt;:wq!&lt;/span&gt;&lt;br /&gt;you get E212: Can't open file for writing.&lt;br /&gt;&lt;br /&gt;If that happens to you , simply type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;:w !sudo tee %&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you will be asked for your sudo password&lt;br /&gt;enter your password and&lt;br /&gt;press enter when asked&lt;br /&gt;&lt;br /&gt;(&lt;code&gt;&lt;/code&gt;&lt;span style="font-weight: bold;"&gt;vi/vim&lt;/span&gt; will detect that the file has been changed and ask whether you want&lt;br /&gt;it to be reloaded.)&lt;br /&gt;&lt;p&gt;As a shortcut, you can define your own command.&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;span style="font-weight: normal;"&gt;Put the following in your&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;/etc/vimrc&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;command W w !sudo tee % &gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;dev&lt;/span&gt;/null&lt;/span&gt;&lt;/p&gt;&lt;p&gt;and then in future simply type&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;:W&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-7726401232286702705?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/7726401232286702705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=7726401232286702705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7726401232286702705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7726401232286702705'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/saving-file-in-vi-as-root.html' title='saving a file in VI as root'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4727138696115780996</id><published>2009-03-27T09:14:00.002+02:00</published><updated>2009-03-27T09:29:34.640+02:00</updated><title type='text'>How to Stop yum from updating your Kernel</title><content type='html'>On a Server and also on your own machine, kernel Upgrades can break already installed 3rd party Applications, since the application would have been compiled for use on a specific kernel, I find this to be particularly a problem with vmware and Virtual box, every time my system upgrades its kernel there are a few packages that i need to recompile to get to work, this is a real pain, and on your server can lead to serious problems. To stop yum from updating your Kernel&lt;br /&gt;You can tell yum to skip kernel updates by adding &lt;span style="font-weight: bold;"&gt;kernel-*&lt;/span&gt; to the '&lt;span style="font-weight: bold;"&gt;exclude=&lt;/span&gt;' option in &lt;span style="font-weight: bold;"&gt;/etc/yum.conf&lt;/span&gt;. if the exclude option does not exist simply add it, add in a line that says &lt;span style="font-weight: bold;"&gt;exclude=kernel-*&lt;/span&gt;&lt;br /&gt;you can do the same for any package that you do not want to update, for example, I run a patched version of postfix on one of my servers, since ive included a quota patch when I compiled it , I do not want postfix to upgrade to an unpatched version. So to stop that particular server from upgrading postfix I simply added &lt;span style="font-weight: bold;"&gt;postfix&lt;/span&gt; to the '&lt;span style="font-weight: bold;"&gt;exclude=&lt;/span&gt;' option in &lt;span style="font-weight: bold;"&gt;/etc/yum.conf&lt;/span&gt;&lt;br /&gt;you can add multiple exclude options by simply adding &lt;span style="font-weight: bold;"&gt;exclude=app_name_to_exclude&lt;/span&gt; under one another.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4727138696115780996?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4727138696115780996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4727138696115780996' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4727138696115780996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4727138696115780996'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/how-to-stop-yum-from-updating-your.html' title='How to Stop yum from updating your Kernel'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-8115297515184808513</id><published>2009-03-24T23:43:00.003+02:00</published><updated>2009-12-21T11:38:01.298+02:00</updated><title type='text'>White Background</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_O1RbeaI0mtw/SclUP913GRI/AAAAAAAAAaE/TJ2c17XFnYM/s1600-h/girl.jpg"&gt;&lt;img style="cursor: pointer; width: 267px; height: 400px;" src="http://2.bp.blogspot.com/_O1RbeaI0mtw/SclUP913GRI/AAAAAAAAAaE/TJ2c17XFnYM/s400/girl.jpg" alt="" id="BLOGGER_PHOTO_ID_5316873468362823954" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-8115297515184808513?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/8115297515184808513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=8115297515184808513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8115297515184808513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8115297515184808513'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/white-background.html' title='White Background'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_O1RbeaI0mtw/SclUP913GRI/AAAAAAAAAaE/TJ2c17XFnYM/s72-c/girl.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1935897825496244393</id><published>2009-03-24T17:18:00.006+02:00</published><updated>2009-04-01T11:06:11.898+02:00</updated><title type='text'>Test smtp server with required authentication</title><content type='html'>To test your smtp server, to see if it is an open relay or to&lt;br /&gt;test if your authentication works on it. Use telnet to connect&lt;br /&gt;to the server, this allows you to very quickly test different connection&lt;br /&gt;scenarios to the server. this method is very useful if you&lt;br /&gt;want to test how your smtp server behaves from different remote locations,&lt;br /&gt;and all you have is an ssh account into the locations you want to test from.&lt;br /&gt;You can simply ssh into the remote location you want to test from and then&lt;br /&gt;follow these steps&lt;br /&gt;In this example I wanted to test if basic outgoing smtp authentication was working on my server (everything in &lt;span style="font-weight: bold;"&gt;Bold&lt;/span&gt; is what you type everything not in bold is the servers response)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;telnet smtp.mailserver.com 25&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Trying 195.158.102.65...&lt;br /&gt;Connected to mail.clivesblog.com.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;220 smtp.mailserver.com.com ESMTP ready&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ehlo&lt;/span&gt;&lt;br /&gt;250-smtp.mailserver.com ESMTP hello&lt;br /&gt;250-PIPELINING&lt;br /&gt;250-AUTH PLAIN LOGIN CRAM-MD5 DIGEST-MD5 GSSAPI&lt;br /&gt;250-AUTH=PLAIN LOGIN CRAM-MD5 DIGEST-MD5 GSSAPI&lt;br /&gt;250-8BITMIME&lt;br /&gt;250-BINARYMIME&lt;br /&gt;250-CHUNKING&lt;br /&gt;250-SIZE 10485760&lt;br /&gt;250-STARTTLS&lt;br /&gt;250-HELP&lt;br /&gt;250 OK&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;auth login&lt;/span&gt;&lt;br /&gt;334 VXNlcm5hbWU6&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Y2xpdmUuZ2VyYWRhQHJzMi5jb20=&lt;/span&gt;&lt;br /&gt;334 UGFzc3dvcmQ6&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cnMy&lt;/span&gt;&lt;br /&gt;235 Authentication successful&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mail from:clive.gerada@clivesblog.com &lt;/span&gt;&lt;br /&gt;250 Sender accepted&lt;br /&gt;rcpt to:&lt;span style="font-weight: bold;"&gt;anybody@anyaddress.com  &lt;/span&gt;&lt;br /&gt;250 Recipient accepted&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;data&lt;/span&gt;&lt;br /&gt;354 Ready to receive data; remember &lt;crlf&gt;.&lt;crlf&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;subject: any subject&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;double space&lt;/span&gt; (ie hit the space bar twice)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;then enter any text for the body of the email&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;250 Mail queued for delivery&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;quit&lt;/span&gt;&lt;br /&gt;221-smtp.mailserver.com ESMTP is closing connection&lt;br /&gt;221 Good bye&lt;br /&gt;&lt;br /&gt;the&lt;span style="font-weight: bold;"&gt; Y2xpdmUuZ2VyYWRhQHJzMi5jb20=&lt;/span&gt;&lt;br /&gt;and   &lt;span style="font-weight: bold;"&gt;cnMy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;is my username and password encoded in Basd64 cypher&lt;br /&gt;&lt;br /&gt;you have to encode it in base64 for the server to understand it.&lt;br /&gt;you can use  the following online tool to encode and decode to and from base64&lt;br /&gt;&lt;a href="http://ostermiller.org/calc/encode.html"&gt;http://ostermiller.org/calc/encode.html&lt;/a&gt;&lt;/crlf&gt;&lt;/crlf&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1935897825496244393?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1935897825496244393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1935897825496244393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1935897825496244393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1935897825496244393'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/test-smtp-server-with-required.html' title='Test smtp server with required authentication'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-448576827095849109</id><published>2009-03-24T08:34:00.004+02:00</published><updated>2009-03-24T09:24:56.087+02:00</updated><title type='text'>How to Encrypt/decrypt files</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_O1RbeaI0mtw/SciKQiJQfAI/AAAAAAAAAZ8/kdkqVzeZubs/s1600-h/Encryption.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 300px; height: 244px;" src="http://1.bp.blogspot.com/_O1RbeaI0mtw/SciKQiJQfAI/AAAAAAAAAZ8/kdkqVzeZubs/s400/Encryption.jpg" alt="" id="BLOGGER_PHOTO_ID_5316651376759045122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If you want to protect files so that they can transverse across cyberspace safely, or you just want to protect them from&lt;br /&gt;prying eyes with a password.&lt;br /&gt;&lt;br /&gt;use the gpg command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;gpg -c filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will be asked for a pass phrase.&lt;br /&gt;&lt;br /&gt;enter your pass phrase.&lt;br /&gt;&lt;br /&gt;You will be asked to repeat your pass phrase&lt;br /&gt;a file will be created with the .gpg extention&lt;br /&gt;&lt;br /&gt;Caution: if you forget your pass phrase you will not be able to recover your file. the encryption used is that good.&lt;br /&gt;&lt;br /&gt;to decrypt the file simply type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;gpg filename.gpg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;enter your pass phrase when asked.&lt;br /&gt;&lt;br /&gt;To do multiple files I usually zip them into one zip file and then encrypt the zip file.&lt;br /&gt;you can do this in one shot by typing the following&lt;br /&gt;&lt;span style="font-size:130%;"&gt; &lt;/span&gt;&lt;pre&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:verdana;"&gt;zip - file1 file2 file3 file4 file5 | gpg -eat &gt; outfile.zip.asc&lt;/span&gt;&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/696132948753636518-448576827095849109?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/448576827095849109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=448576827095849109' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/448576827095849109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/448576827095849109'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/how-to-encryptdecrypt-files.html' title='How to Encrypt/decrypt files'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_O1RbeaI0mtw/SciKQiJQfAI/AAAAAAAAAZ8/kdkqVzeZubs/s72-c/Encryption.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2773860950559179078</id><published>2009-03-21T16:00:00.000+02:00</published><updated>2009-03-21T16:01:19.941+02:00</updated><title type='text'></title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_O1RbeaI0mtw/ScTzJMTLwVI/AAAAAAAAAZ0/XvZa0z3EwuU/s1600-h/penguin-army.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 320px;" src="http://2.bp.blogspot.com/_O1RbeaI0mtw/ScTzJMTLwVI/AAAAAAAAAZ0/XvZa0z3EwuU/s400/penguin-army.png" alt="" id="BLOGGER_PHOTO_ID_5315640799450087762" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2773860950559179078?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2773860950559179078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2773860950559179078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2773860950559179078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2773860950559179078'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/blog-post.html' title=''/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_O1RbeaI0mtw/ScTzJMTLwVI/AAAAAAAAAZ0/XvZa0z3EwuU/s72-c/penguin-army.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6198971605662118810</id><published>2009-03-20T18:29:00.005+02:00</published><updated>2009-10-06T22:41:09.721+02:00</updated><title type='text'>Alternating between directories in your Terminal</title><content type='html'>&lt;span style="font-family:verdana;"&gt;often,  I am working in a directory which has a long path &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;eg&lt;/span&gt;&lt;/span&gt; /home/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;cgerada&lt;/span&gt;&lt;/span&gt;/long/complicated/directory/structure/folder/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;and then want to temporally change to another directory to do something and change back to the directory I was in  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;instead of using &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;cd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; to change to the other directory  rather use&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;pushd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;eg&lt;/span&gt;&lt;/span&gt;  &lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;pushd&lt;/span&gt;&lt;/span&gt; /directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;that way when you are done in /directory and you want to return to /home/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;cgerada&lt;/span&gt;&lt;/span&gt;/long/complicated/directory/structure/folder/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;simply type &lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;popd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;and you will be returned to /home/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;cgerada&lt;/span&gt;&lt;/span&gt;/long/complicated/directory/structure/folder/&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;cd&lt;/span&gt; -&lt;/span&gt;  is also very useful and will take you to your last working directory&lt;br /&gt;&lt;br /&gt;and is great for switching between 2 directories .. just type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;cd&lt;/span&gt; - &lt;/span&gt;and then&lt;span style="font-weight: bold;"&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;cd&lt;/span&gt;- &lt;/span&gt;again to alternate between 2 working directories&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/696132948753636518-6198971605662118810?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6198971605662118810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6198971605662118810' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6198971605662118810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6198971605662118810'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/alternating-between-directories-in-your.html' title='Alternating between directories in your Terminal'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-3340582980015885602</id><published>2009-03-19T22:00:00.002+02:00</published><updated>2009-03-19T22:03:46.813+02:00</updated><title type='text'>Quick way to Rip a DVD</title><content type='html'>&lt;span style="font-family: verdana;font-size:130%;" &gt;Insert your DVD into your DVD Drive of your PC/Laptop&lt;br /&gt;&lt;br /&gt;and type the following in your terminal&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;dd if=/dev/cdrom of=/cdrom_image.iso&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family: verdana;"&gt;your DVD will be saved as an iso image in your current directory.&lt;/span&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/696132948753636518-3340582980015885602?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/3340582980015885602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=3340582980015885602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3340582980015885602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/3340582980015885602'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/quick-way-to-rip-dvd.html' title='Quick way to Rip a DVD'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-997261530600436766</id><published>2009-03-14T18:30:00.005+02:00</published><updated>2011-12-06T17:08:39.773+02:00</updated><title type='text'>.ssh/config</title><content type='html'>&lt;pre&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;ssh reads configuration information from a &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; file&lt;br /&gt;(if you have one) before connecting to a machine.&lt;br /&gt;&lt;br /&gt;This way you can tell ssh how you want to connect to&lt;/span&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1" style="font-family: verdana; font-size: 130%;"&gt;particular&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; &lt;/span&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2" style="font-family: verdana; font-size: 130%;"&gt;machines&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;. If you have a lot of different&lt;br /&gt;machines that you connect to,  especially if you&lt;/span&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-family: verdana;"&gt;connect&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; to them on different ports and with different&lt;br /&gt;user names then&lt;br /&gt;it is a great idea to create the following file&lt;br /&gt;.ssh/&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;br /&gt;type vi .ssh/&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;br /&gt;and &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6" style="font-family: verdana; font-size: 130%;"&gt;popultate&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; the &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; file with the information&lt;br /&gt;of the machines that you connect to.&lt;br /&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8" style="font-family: verdana; font-size: 130%;"&gt;eg&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;Host *&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9" style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;netaxiz&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;.com&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;Port 2222&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;User &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10" style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;clive&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;    &lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;Host &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11" style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;ipcop&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;1&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;Port 222&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;User root&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;Host home&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12" style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;Hostname&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt; 192.168.0.10&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;User &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13" style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;clive&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;Port 768&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;&lt;br /&gt;with the above information in the &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; file if you type&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;ssh machine.netaxiz.com&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;will be the equivalent of typing&lt;br /&gt;ssh -p 2222 clive@machine.netaxiz.com&lt;br /&gt;&lt;br /&gt;and typing &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15" style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;scp&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt; file1 &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16" style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;ipcop&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;1:file1&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;will be the &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17" style="font-family: verdana; font-size: 130%;"&gt;equavelent&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; of typing &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18" style="font-family: verdana; font-size: 130%;"&gt;&lt;br /&gt;scp&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; -P222 file1 root@ipcop1&lt;br /&gt;&lt;br /&gt;as you can see the &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; file can save you a lot of time.&lt;br /&gt;&lt;br /&gt;The port and the &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20" style="font-family: verdana; font-size: 130%;"&gt;username&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; from the &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; file will&lt;br /&gt;automatically be used every time you connect to the&lt;br /&gt;machines listed in the &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22" style="font-family: verdana; font-size: 130%;"&gt;config&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; file.&lt;br /&gt;Were this is especially &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23" style="font-family: verdana; font-size: 130%;"&gt;usefull&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%;"&gt; is when you want to&lt;br /&gt;copy ssh keys to a remote machine using the&lt;br /&gt;ssh-copy id command when the remote machine uses&lt;br /&gt;a different port to 22.&lt;br /&gt;&lt;br /&gt;Lets say you want to copy your public keys to your&lt;br /&gt;machine called home but machine home only allows&lt;br /&gt; ssh connection on port 768. By adding in the information&lt;br /&gt;above for machine home. I can now simply type&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: verdana; font-size: 130%; font-weight: bold;"&gt;ssh-copy-id -i ~/.ssh/id_rsa.pub home&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: 130%;"&gt;&lt;br /&gt;to transfer the keys.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: 130%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: 130%;"&gt;if you get the following error when using ssh&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 21px;"&gt;&lt;b&gt;Bad owner or permissions on .ssh/config&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 130%;"&gt;then you must change the permissions of the config file.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: 130%;"&gt;&lt;b&gt;cd .ssh&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style="font-family: verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: 130%;"&gt;&lt;b&gt;chmod 600 config&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-997261530600436766?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/997261530600436766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=997261530600436766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/997261530600436766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/997261530600436766'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/sshconfig.html' title='.ssh/config'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1130178953054473249</id><published>2009-03-08T12:35:00.002+02:00</published><updated>2009-03-08T12:46:54.493+02:00</updated><title type='text'>libdvdcss</title><content type='html'>To Play a commercial DVD in your media player&lt;br /&gt;you need to install libdvdcss&lt;br /&gt;&lt;br /&gt;you will also need libdvdcss to be able to backup your commercial DVD's ;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;yum install libdvdcss&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or &lt;span style="font-weight: bold;"&gt;apt-get install libdvdcss&lt;/span&gt; depending on your distro&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1130178953054473249?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1130178953054473249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1130178953054473249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1130178953054473249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1130178953054473249'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/03/libdvdcss.html' title='libdvdcss'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6377140179009261367</id><published>2009-02-23T20:01:00.009+02:00</published><updated>2009-02-23T20:54:22.518+02:00</updated><title type='text'>RPM Fusion Repository</title><content type='html'>&lt;pre&gt;&lt;br /&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;RPM Fusion Repository provides software that the &lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;a class="http" href="http://fedoraproject.org/"&gt;Fedora Project&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;br /&gt;or &lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;a class="http" href="http://www.redhat.com/"&gt;Red Hat &lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;doesn't want to ship.&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;You will find software like VLC media player, Mencoder FFmpeg&lt;br /&gt;and other&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; &lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;software that is not available in the stock Fedora or&lt;br /&gt;Red hat repositories&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;to install the RPM Fusion repository on your system simply type&lt;br /&gt;the following&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;font-size:130%;"  &gt;rpm -ivh http://download1.rpmfusion.org/free/fedora/&lt;br /&gt;rpmfusion-free-release-stable.noarch.rpm&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;then you can install software directly ie&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:130%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:verdana;font-size:130%;"  &gt;yum install vlc&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/696132948753636518-6377140179009261367?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6377140179009261367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6377140179009261367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6377140179009261367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6377140179009261367'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/02/rpm-fusion-repository.html' title='RPM Fusion Repository'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2760373212643702889</id><published>2009-02-23T11:59:00.003+02:00</published><updated>2009-02-23T12:13:02.560+02:00</updated><title type='text'>How to find out what Distro you are running</title><content type='html'>&lt;span style="font-weight: bold;"&gt;uname -a&lt;/span&gt; will give you information about your running Kernel. To find out what Distribution is installed on a Particular system try one the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cat /etc/issue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cat /proc/version&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cat /etc/*release&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&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/696132948753636518-2760373212643702889?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2760373212643702889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2760373212643702889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2760373212643702889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2760373212643702889'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2009/02/how-to-find-out-what-distro-you-are.html' title='How to find out what Distro you are running'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2418674393409309858</id><published>2008-10-30T11:51:00.003+02:00</published><updated>2008-10-30T12:00:07.442+02:00</updated><title type='text'>How to change the Time Zone on your Redhat / Centos system</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;cp&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;usr&lt;/span&gt;/share/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;zoneinfo&lt;/span&gt;/Africa/Johannesburg           /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;localtime&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will set your time zone to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;SAST&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you can simply use Tab auto completion to find the exact time zone you want by choosing the continent and city of your choice for example to change your timezone to London's time&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;cp&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;usr&lt;/span&gt;/share/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;zoneinfo&lt;/span&gt;/Europe/London            /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;localtime&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to change to universal time type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;cp&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;usr&lt;/span&gt;/share/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;zoneinfo&lt;/span&gt;/Universal                /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;localtime&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to change to GMT time type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;cp&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;usr&lt;/span&gt;/share/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;zoneinfo&lt;/span&gt;/GMT                /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;localtime&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;if asked if y&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;ou&lt;/span&gt; want to overwrite the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;localtime&lt;/span&gt; file answer yes.&lt;br /&gt;&lt;br /&gt;Tab auto completion is very &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_19"&gt;useful&lt;/span&gt; in finding the exact time zone you want.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2418674393409309858?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2418674393409309858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2418674393409309858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2418674393409309858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2418674393409309858'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/10/how-to-change-time-zone-on-your-redhat.html' title='How to change the Time Zone on your Redhat / Centos system'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6219322278415229441</id><published>2008-10-14T15:38:00.007+02:00</published><updated>2008-10-14T15:48:19.072+02:00</updated><title type='text'>How to backup and restore a Mysql database</title><content type='html'>To backup your mysql database type the following.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mysqldump -u username -ppassword database_name &gt; dump.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;sql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;make sure not to leave a space between the -p and the password, otherwise &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;mysql&lt;/span&gt; will prompt you for a password and will &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;assume&lt;/span&gt; that your password is the database name.&lt;br /&gt;&lt;br /&gt;the entire database will be backed up into the dump.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;sql&lt;/span&gt; file&lt;br /&gt;&lt;br /&gt;then to restore the database type the following&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;'mysql -u username -ppassword database_name &lt; dump.sql'&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/696132948753636518-6219322278415229441?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6219322278415229441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6219322278415229441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6219322278415229441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6219322278415229441'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/10/how-to-backup-and-restore-mysql.html' title='How to backup and restore a Mysql database'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5000649277757821013</id><published>2008-09-25T16:28:00.002+02:00</published><updated>2008-09-25T16:33:06.604+02:00</updated><title type='text'>How to reset a Forgotton Password in MYSQL</title><content type='html'>ever forgotton your root password for your mysql database, or any other users password for that matter,  no problem here&lt;br /&gt;simply stop mysql by typing&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/mysqld stop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then restart Mysql with the following command&lt;br /&gt;&lt;p style="font-weight: bold;" class="command"&gt;mysqld_safe --skip-grant-tables &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;You should see mysqld start up successfully.  Now you should be able to connect to mysql without a password. &lt;/p&gt;  &lt;p style="font-weight: bold;" class="command"&gt;mysql --user=root mysql&lt;/p&gt; &lt;p style="font-weight: bold;" class="command"&gt;update user set Password=PASSWORD('new-password');&lt;br /&gt;flush privileges;&lt;br /&gt;exit;&lt;/p&gt;&lt;p class="command"&gt;once done restart mysql normally&lt;/p&gt;&lt;p style="font-weight: bold;" class="command"&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/mysqld restart&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="command"&gt;&lt;span style="font-weight: normal;"&gt;Shaaawiiing&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5000649277757821013?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5000649277757821013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5000649277757821013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5000649277757821013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5000649277757821013'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/09/how-to-reset-forgotton-password-in.html' title='How to reset a Forgotton Password in MYSQL'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5847512884603292784</id><published>2008-09-17T09:44:00.005+02:00</published><updated>2008-09-17T11:16:55.830+02:00</updated><title type='text'>How to add multiple users and passwords to your system</title><content type='html'>&lt;b&gt;for names in user1 user2 user3 user4 user5&lt;/b&gt;&lt;br /&gt;&lt;b&gt;do&lt;/b&gt;&lt;br /&gt;&lt;b&gt;useradd $names&lt;/b&gt;&lt;br /&gt;&lt;b&gt;echo $name"anypassword" | passwd --stdin $names&lt;/b&gt;&lt;br /&gt;&lt;b&gt;done&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;the above will add user1 , user2 ,user3, user4 and user5 to your system.&lt;br /&gt;All users will have the password "their user name followed by anypassword"&lt;br /&gt;You could have your list of users in a text file and enter the commands like so, presuming your text file is called users.txt and in your text file you just insert the user names underneath one another  eg&lt;br /&gt;&lt;br /&gt;user1&lt;br /&gt;user2&lt;br /&gt;user3&lt;br /&gt;&lt;br /&gt;etc&lt;br /&gt;&lt;br /&gt;&lt;b&gt;for names in `cat users.txt`&lt;/b&gt;&lt;br /&gt;&lt;b&gt;do&lt;/b&gt;&lt;br /&gt;&lt;b&gt;echo $names&lt;/b&gt;&lt;br /&gt;&lt;b&gt;useradd $names&lt;/b&gt;&lt;br /&gt;&lt;b&gt;done&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you want to add usernames and passwords from a list, then make a text file like so&lt;br /&gt;&lt;br /&gt;user1:password1&lt;br /&gt;user2:password2&lt;br /&gt;user3:password3&lt;br /&gt;&lt;br /&gt;etc&lt;br /&gt;save the file , in this example we'll save it as userlist.txt&lt;br /&gt;then&lt;br /&gt;&lt;br /&gt;&lt;b&gt;for names in `cat userlist.txt`&lt;/b&gt;&lt;br /&gt;&lt;b&gt;do&lt;/b&gt;&lt;br /&gt;&lt;b&gt;user=`echo $names | cut -f1 -d:`&lt;/b&gt;&lt;br /&gt;&lt;b&gt;pwd=`echo $names | cut -f2 -d:`&lt;/b&gt;&lt;br /&gt;&lt;b&gt;useradd $user&lt;/b&gt;&lt;br /&gt;&lt;b&gt;echo $pwd | passwd --stdin $user&lt;/b&gt;&lt;br /&gt;&lt;b&gt;done&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5847512884603292784?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5847512884603292784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5847512884603292784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5847512884603292784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5847512884603292784'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/09/how-to-add-multiple-users-and-passwords.html' title='How to add multiple users and passwords to your system'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-7278749579180876696</id><published>2008-09-01T21:54:00.005+02:00</published><updated>2008-09-01T22:06:45.445+02:00</updated><title type='text'>How to remove @#$ Annoying Console beeps</title><content type='html'>&lt;b&gt;&lt;/b&gt; &lt;blockquote&gt; &lt;p&gt;To Remove all console beeps whilst running X   type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;xset&lt;/span&gt; b off&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;this will disable the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;annoying&lt;/span&gt; console beeps for all programs.&lt;/p&gt;&lt;p&gt;To remove the console beep when running in &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;run level&lt;/span&gt; 1 2 or 3 without X,  or on one of the virtual consoles ( cntrl-Alt 1 to 6)  type&lt;br /&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;setterm&lt;/span&gt; -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;blength&lt;/span&gt; 0&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-7278749579180876696?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/7278749579180876696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=7278749579180876696' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7278749579180876696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7278749579180876696'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/09/how-to-remove-anoying-console-beeps.html' title='How to remove @#$ Annoying Console beeps'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1354671978181633264</id><published>2008-08-28T10:46:00.004+02:00</published><updated>2009-03-17T00:10:56.693+02:00</updated><title type='text'>Nog a sweet IP Tables rule</title><content type='html'>This one will force your users through your Squid proxy server, even if your users are configured to access the net directly&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;iptables&lt;/span&gt; -t &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;nat&lt;/span&gt; - A &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;PREROUTING&lt;/span&gt; -i &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;eth&lt;/span&gt;0 -p &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;tcp&lt;/span&gt; --&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;dport&lt;/span&gt; 80 -j REDIRECT --to-ports 3128&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;assuming that your squid proxy is configured to use port 3128 the above rule on your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;iptables&lt;/span&gt; firewall.&lt;br /&gt;&lt;br /&gt;or if your squid proxy server is on a different server say 192.168.1.10 then&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;iptables&lt;/span&gt; -t &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;nat&lt;/span&gt; - A &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;PREROUTING&lt;/span&gt; -i &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;eth&lt;/span&gt;0 -p &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;tcp&lt;/span&gt; --&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;dport&lt;/span&gt; 80 -j REDIRECT -d 192.168.1.10  --to-ports 3128&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;if you need to insert the rule at line number 5 of an existing chain then&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;iptables&lt;/span&gt; -t &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;nat&lt;/span&gt; - I &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;PREROUTING&lt;/span&gt;  5 -i &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;eth&lt;/span&gt;0 -p &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;tcp&lt;/span&gt; --&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;dport&lt;/span&gt; 80 -j REDIRECT --to-ports 3128&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;will forward all standard port 80 http traffic to your Squid Proxy server on port 3128   .......sweet&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1354671978181633264?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1354671978181633264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1354671978181633264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1354671978181633264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1354671978181633264'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/nog-sweet-ip-tables-rule.html' title='Nog a sweet IP Tables rule'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2226987874721725742</id><published>2008-08-26T09:19:00.005+02:00</published><updated>2008-08-26T09:36:49.216+02:00</updated><title type='text'>Making files  undeletable,  updatable only and unbackupable</title><content type='html'>Attributes on a file can help you control what people can do with different files you can make files&lt;br /&gt;1: &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Undeletable&lt;/span&gt;  (Even by root)&lt;br /&gt;2: &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Updatable&lt;/span&gt; only (Even by root)&lt;br /&gt;3: &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Unbackupable&lt;/span&gt; :)   (Even by root)&lt;br /&gt;&lt;br /&gt;1:  to make a file &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;undeletable&lt;/span&gt; type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;chattr&lt;/span&gt; +i &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;filename&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;even if root &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;trys&lt;/span&gt; to delete the file they  will not be allowed to, To make the file deletable again you will need to type&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;chattr&lt;/span&gt; -i &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;2:  to make a file &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;updateable&lt;/span&gt; only, which means that you will be able to append content to the file but you will not be allowed to delete it or remove content from it&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;type &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;chattr&lt;/span&gt; +a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;filename&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;3: to prevent a file from being backed up by admins using the dump command&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;type&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;chattr&lt;/span&gt; +d &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;filename&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;to list the set attributes of a file type&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;lsattr filename&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/696132948753636518-2226987874721725742?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2226987874721725742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2226987874721725742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2226987874721725742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2226987874721725742'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/making-files-undeletable-updatable-only.html' title='Making files  undeletable,  updatable only and unbackupable'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2575161272610477712</id><published>2008-08-19T20:30:00.004+02:00</published><updated>2008-08-19T20:51:44.372+02:00</updated><title type='text'>tip to extract configured settings only in a config file</title><content type='html'>some &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;config&lt;/span&gt; files are huge, and have more comments "#" and blank space than they do actual configured settings.&lt;br /&gt;sometimes you need to just have a look at the settings that are configured  and not all the comments.&lt;br /&gt;to do this try the following.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cat &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;filename&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;conf&lt;/span&gt; |grep -v "^#" | grep -v "^$" | less&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will list the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;config&lt;/span&gt; file without all the lines with comments and will also leave out all the blank space&lt;br /&gt;giving you information on your configured settings only.&lt;br /&gt;&lt;br /&gt;the -v switch in grep tells grep to list files that do not contain the following string&lt;br /&gt;the ^ (caret) means the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;beginning&lt;/span&gt; of a line and the $ means the end of a line and then passing the output&lt;br /&gt;to less, allows you to page through the file using your arrow keys&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2575161272610477712?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2575161272610477712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2575161272610477712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2575161272610477712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2575161272610477712'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/tip-to-extract-configured-settings-only.html' title='tip to extract configured settings only in a config file'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2549886243237273064</id><published>2008-08-14T22:25:00.003+02:00</published><updated>2008-08-14T22:53:13.346+02:00</updated><title type='text'>Centralised Logging host</title><content type='html'>The last thing a cracker does after they have compromised your system is they try and remove all traces of what they have done on your system, they do this  by altering or deleting your log files.&lt;br /&gt;&lt;br /&gt;Log files are essential in monitoring your system and recovering it back to a working state after a failure or after being compromised. It is a very good idea to have your Log files stored on a central server, both for convenience and security reasons. In a large network it is also more convenient to have all your log files accessible in one central place.&lt;br /&gt;&lt;br /&gt;decide on the server that will accept log messages from the other servers. On that server edit your&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/sysconfig/syslog  &lt;/span&gt;file&lt;br /&gt;&lt;br /&gt;and edit the stanza    &lt;span style="font-weight: bold;"&gt;SYSLOGD_OPTIONS="-m  0"&lt;br /&gt;&lt;/span&gt;add a&lt;span style="font-weight: bold;"&gt; -r   &lt;/span&gt;like so&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SYSLOGD_OPTIONS="-r -m  0"&lt;br /&gt;&lt;/span&gt;-r =(receive log files)&lt;br /&gt;&lt;br /&gt;restart syslogd by typing &lt;span style="font-weight: bold;"&gt; /etc/init.d/syslog restart&lt;br /&gt;&lt;/span&gt;now your server is ready to accept logging messages from your other servers/machines&lt;br /&gt;&lt;br /&gt;on the machine that you want to send the log files from. Edit your /&lt;span style="font-weight: bold;"&gt;etc/syslog.conf &lt;/span&gt;file&lt;br /&gt;and add the following line&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;user.*        @192.168.1.60&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;were 192.168.1.60 is the ip address of the server that you setup to receive the log files, you can substitute the ip address with the hostname of the server if you want.&lt;br /&gt;&lt;br /&gt;restart syslogd by typing &lt;span style="font-weight: bold;"&gt;/etc/init.d/syslog restart&lt;/span&gt;&lt;br /&gt;your server @ 192.168.1.60 will now receive and store all the log files from your machine that you have setup to send from.&lt;br /&gt;&lt;br /&gt;you can test this new setup by using the logger command to create a log message&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;logger -i -t Clive "Testing centralised logging"&lt;br /&gt;&lt;/span&gt;The message should appear in your centralised logging servers /&lt;span style="font-weight: bold;"&gt;var/log/messages &lt;/span&gt;file&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&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/696132948753636518-2549886243237273064?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2549886243237273064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2549886243237273064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2549886243237273064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2549886243237273064'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/centralised-logging-host.html' title='Centralised Logging host'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-7652485295486796486</id><published>2008-08-12T09:08:00.007+02:00</published><updated>2008-08-12T16:30:46.693+02:00</updated><title type='text'>Automounting Home Directories from a Centralized NFS server</title><content type='html'>In previous  posts  we  configured NFS , client and server. Discussed  auto mounting  NFS shares and centralized  user management . whats left to do is to centralize our users home directories. This makes backups easier to carry out as all users data is kept in one place. It also means that our users can login from any machine on the network and they will have immediate access to all of their files.  which is pretty cool.&lt;br /&gt;&lt;br /&gt;Right, so NFS server is setup and running on your Server, you must export the &lt;span style="font-weight: bold;"&gt;/home&lt;/span&gt; folder on your NFS server by adding it to your &lt;span style="font-weight: bold;"&gt;/etc/exports&lt;/span&gt; file and then type &lt;span style="font-weight: bold;"&gt;exportfs -a&lt;/span&gt;&lt;br /&gt;NIS should also be configured and running on the same server as described in my previous post.&lt;br /&gt;&lt;br /&gt;On the clients computer you need to edit your &lt;span style="font-weight: bold;"&gt;/etc/auto.master&lt;/span&gt; file and add the following entry&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/home      /etc/auto.home&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then create a file called &lt;span style="font-weight: bold;"&gt;/etc/auto.home&lt;/span&gt; and put the following line in your new /etc/auto.home file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;* -rw,nosuid,soft      servername:/home/&amp;amp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;were servername is the name or ip address of your nfs/nis server&lt;br /&gt;&lt;br /&gt;This entry in your /etc/auto.home file will insure  that any directory a user tries to access under    their own local &lt;tt class="FILENAME"&gt;/home&lt;/tt&gt; directory (due to the"*"    character)  will cause an  NFS mount on the server within its  exported &lt;tt class="FILENAME"&gt;/home&lt;/tt&gt; filesystem.&lt;br /&gt;you could also add the following mount options to further improve matters&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rsize=8192,wsize=8192 &lt;/span&gt; which would speed up NFS communication for reads (&lt;tt class="OPTION"&gt;rsize&lt;/tt&gt;) and        writes (&lt;tt class="OPTION"&gt;wsize&lt;/tt&gt;) by setting a larger data block        size,  to be transferred at one time. do not set this option on older Linux kernels with older network cards as some network cards do not work well with the larger block sizes .&lt;br /&gt;to add this option the file would look like so.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;*  -rw,nosuid,soft,rsize=8192,wsize=8192      servername:/home/&amp;amp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The ampersand (&amp;amp;)  takes the value of the user name in each line.&lt;br /&gt;&lt;br /&gt;Done, your users home directories are now all centralized on your /nfs/nis server&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-7652485295486796486?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/7652485295486796486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=7652485295486796486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7652485295486796486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7652485295486796486'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/automounting-home-directories.html' title='Automounting Home Directories from a Centralized NFS server'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-8348995132403208194</id><published>2008-08-11T21:51:00.013+02:00</published><updated>2008-08-12T21:07:25.903+02:00</updated><title type='text'>Centralized user authentication with NIS</title><content type='html'>&lt;span style=";font-family:verdana;font-size:100%;"  &gt;O&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;n a network with lots of users you will need to centralize your &lt;span style="font-weight: bold;"&gt;/etc/passwd&lt;/span&gt; file and your user database so that you can manage all your users in one place.&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;  you can  centralize user management using NIS so that all users are added and deleted on one machine only. Users can log in from any other client machine, without the need to have a local user account on their own machines. (Together with Autofs described in my previous post and my &lt;a href="http://cgerada.blogspot.com/2008/08/automounting-home-directories.html"&gt;next&lt;/a&gt; post on automounting /home directory over nfs . User databases can be managed in one place)&lt;br /&gt;You can have multiple NIS servers on the same domain acting as Master and Slaves all managing one central user database.&lt;br /&gt;The server acts as the central repository for all user names, passwords, and groups. The data is replicated from the &lt;b face="verdana"&gt;/etc/passwd&lt;/b&gt; file to NIS databases.&lt;/span&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;On the server, you need to install a package called &lt;b&gt;ypserv&lt;/b&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;type &lt;span style="font-weight: bold;"&gt;apt-get install ypserv&lt;/span&gt; if you are using a debian based distribution or type&lt;/span&gt;&lt;/p&gt;  &lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;yum install ypserv&lt;/span&gt; if you are using a Red Hat derivative one.&lt;br /&gt;After installing ypserv you need to setup a domain name that is used by server and client.&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;to setup your domain name type&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;domainname example&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;to make it persistent edit&lt;span style="font-weight: bold;"&gt; /etc/sysconfig/network &lt;/span&gt;file and add the following line&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;NISDOMAIN = example&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;were example is the name of your domain,&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt; Next you need to  convert the existing passwd, group and shadow files that contain user information and passwords to the NIS database format. You can do this using the following command:&lt;/span&gt; &lt;pre  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;/usr/lib/yp/ypinit -m&lt;/span&gt;&lt;/pre&gt; &lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;From now on, every time you add a user, delete a user, you have to update the NIS database. You can do this using the command:&lt;/span&gt;&lt;/p&gt; &lt;pre  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;make -C /var/yp&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;you should setup a cron job to run every hour or so to  update the database for you automatically, do this by typing in &lt;span style="font-weight: bold;"&gt;crontab -e&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;and then adding the following line to your crontab file&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;0    *    *    *    *   make -C /var/yp &amp;amp;&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;dev&lt;/span&gt;/null&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: normal;"&gt;this will build your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;nis&lt;/span&gt; database at the top of every hour&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;save the file&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;start the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;NIS&lt;/span&gt; server by typing&lt;/span&gt; &lt;pre  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/ypserv start&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;The server is now ready to handle authentication requests from the clients.&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt; On the client, you need to install the &lt;b  style="font-family:verdana;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;yp&lt;/span&gt;-tools&lt;/b&gt; package, &lt;span style="font-weight: bold;"&gt;apt-get install &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;yp&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-tools&lt;/span&gt;&lt;br /&gt;for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;debian&lt;/span&gt; based &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;distro's&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;yum install &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;yp&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-tools &lt;/span&gt;for red hat derivative ones&lt;br /&gt;then type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;system-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;config&lt;/span&gt;-authentication&lt;br /&gt;&lt;/span&gt;which will open your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;gui&lt;/span&gt; configuration program&lt;br /&gt;click on &lt;span style="font-weight: bold;"&gt;enable &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;NIS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;and then click on &lt;span style="font-weight: bold;"&gt;configure &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;NIS&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;enter the domain name &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ie&lt;/span&gt; example&lt;br /&gt;and the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;ip&lt;/span&gt; address of your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;NIS&lt;/span&gt; server.  if you don't have a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;gui&lt;/span&gt; then you can alternatively edit your &lt;b&gt;/etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;yp&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;conf&lt;/span&gt;&lt;/b&gt; file, and point it to the appropriate server and domain name by adding the following line&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;domain example server servers_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;ip&lt;/span&gt;_address&lt;/span&gt;&lt;/span&gt; &lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;The &lt;b&gt;/etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;nsswitch&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;conf&lt;/span&gt;&lt;/b&gt; file lists the order for how &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;lookups&lt;/span&gt; for various things are done, such as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;DNS&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;lookup&lt;/span&gt;, user authentication, etc .  to make &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;NIS&lt;/span&gt;  authentication faster, change the following in your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;nsswitch&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;conf&lt;/span&gt;  file from:&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;passwd&lt;/span&gt;:        files  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;nisplus&lt;/span&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;nis&lt;/span&gt;&lt;br /&gt;shadow:      files  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;nisplus&lt;/span&gt;  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;nis&lt;/span&gt;&lt;br /&gt;group:            files    &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;nisplus&lt;/span&gt;    &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;nis&lt;/span&gt;&lt;/span&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;To the following:&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;passwd&lt;/span&gt;:             &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;nis&lt;/span&gt;   files    &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;nisplus&lt;/span&gt;&lt;br /&gt;shadow :           &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;nis&lt;/span&gt;     files   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;nisplus&lt;/span&gt;&lt;br /&gt;group:                &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;nis&lt;/span&gt;  files      &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;nisplus&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;start the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;NIS&lt;/span&gt; client service by typing&lt;/span&gt;&lt;pre  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/ypbind start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you will now be able to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;login&lt;/span&gt; to your client machine using the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;&lt;br /&gt;usernames&lt;/span&gt; that are stored on your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;NIS&lt;/span&gt; Server. you will get&lt;br /&gt;an error about not being able to mount your home directory, but my&lt;br /&gt;next post on &lt;a href="http://cgerada.blogspot.com/2008/08/automounting-home-directories.html"&gt;automounting home directories centrally&lt;/a&gt; addresses that problem&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-8348995132403208194?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/8348995132403208194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=8348995132403208194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8348995132403208194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8348995132403208194'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/centralized-user-authentiaction-with.html' title='Centralized user authentication with NIS'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2412249496209365830</id><published>2008-08-10T12:09:00.011+02:00</published><updated>2008-08-11T09:05:11.993+02:00</updated><title type='text'>Auto mount for Red Hat Derivative Distributions</title><content type='html'>In my previous 2 posts we setup &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;NFS&lt;/span&gt;&lt;/span&gt; client and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;NFS&lt;/span&gt;&lt;/span&gt; server. There is another way of setting up the client so that the mount is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;temporary&lt;/span&gt; and only made if and when the share is required, this way speeds up your boot process as the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;NFS&lt;/span&gt;&lt;/span&gt; share will only mount if and when you need it and not during boot time. A mounted file system or share will always stay mounted until you &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;umount&lt;/span&gt;&lt;/span&gt; it, this can cause problems with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;NFS&lt;/span&gt;&lt;/span&gt; especially if your connection to your server is lost as your machine would not have  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;umounted&lt;/span&gt;&lt;/span&gt; the share.&lt;br /&gt;Auto mounter to the rescue.&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;automounter&lt;/span&gt;&lt;/span&gt; will mount your shares on a temporary basis, as and when you need them. it will also &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;umount&lt;/span&gt;&lt;/span&gt; your shares automatically after an interval of inactivity (60 seconds by default).&lt;br /&gt;to setup &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;automounter&lt;/span&gt;&lt;/span&gt; edit your &lt;span style="font-weight: bold;"&gt;/etc/auto.misc&lt;/span&gt; file and add the following&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;name_of_share                    -&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;fstype&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;=&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;nfs&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;                                192.168.0.160:/share&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;were 192.168.1.60:/share is your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;nfs&lt;/span&gt; share on the server&lt;br /&gt;name_of_share can be any name you choose, this will just specify the directory name you need to change to to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;automount&lt;/span&gt; the share.&lt;br /&gt;&lt;br /&gt;save your /etc/auto.misc&lt;br /&gt;&lt;br /&gt;now your /etc/auto.misc file is informed by the information in your /etc/auto.master file (you &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;shouldent&lt;/span&gt; have to change anything in there but to understand how &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;automount&lt;/span&gt; works it is a good idea to look inside the file.&lt;br /&gt;if you look inside your /etc/auto.master file you will see 2 entries that look like so&lt;br /&gt;/misc   /etc/auto.misc&lt;br /&gt;/net    -hosts&lt;br /&gt;&lt;br /&gt;this informs your auto.misc file to temporally mount your share under &lt;span style="font-weight: bold;"&gt;/misc&lt;br /&gt;&lt;/span&gt;&lt;span&gt;and your share will also be browsable &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;unde&lt;/span&gt;&lt;/span&gt;&lt;span&gt;r&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; /net&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;you will need to ls /net/192.168.0.160   to see the shares on your server&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;or  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;cd&lt;/span&gt;&lt;/span&gt; into /misc/name_of_share to access the share  (even though you don't see the server or the share under /misc and /net they will appear only when you &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;cd&lt;/span&gt; into them&lt;br /&gt;&lt;br /&gt;the mount will stay mounted &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;whilst&lt;/span&gt; the directory is in use and then for 60 seconds longer after inactivity The mount will &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;disappear&lt;/span&gt; you will need to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;cd&lt;/span&gt;&lt;/span&gt; or ls the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;sharename&lt;/span&gt;&lt;/span&gt; to access it again.&lt;br /&gt;&lt;br /&gt;if you type &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;cd&lt;/span&gt; ..  so that you are in the /misc folder and then type ls again you will now see your share, but it will only be there for 60 seconds and then it will automatically &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;umount&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;dissapear&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;if you wanted to change the place that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;automounts&lt;/span&gt; take place from /misc to some other directory of your choice then you will need to edit your /etc/auto.master file and change /misc to whatever you like. Once saved restart the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;automounter&lt;/span&gt; service.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/autofs restart&lt;br /&gt;&lt;/span&gt;for your changes to take effect.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Debian based distributions uses different tools to accomplish the same, I will cover the debian tools in a future post.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&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/696132948753636518-2412249496209365830?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2412249496209365830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2412249496209365830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2412249496209365830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2412249496209365830'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/auto-mount.html' title='Auto mount for Red Hat Derivative Distributions'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4363486855210910910</id><published>2008-08-10T11:40:00.007+02:00</published><updated>2008-08-11T10:47:23.847+02:00</updated><title type='text'>NFS Server</title><content type='html'>To share a directory on your computer and make it available to other computers on your network.&lt;br /&gt;first make sure that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;nfs&lt;/span&gt; is installed and running as a service&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;init&lt;/span&gt;.d/ &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;nfs&lt;/span&gt; status&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;if it is not running type &lt;span style="font-weight: bold;"&gt;/etc/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;init&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;.d/ &lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;nfs&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and to make it start automatically at boot time type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;chkconfig&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;nfs&lt;/span&gt; on&lt;br /&gt;&lt;/span&gt;(if your distribution &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;doesn't&lt;/span&gt; come with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;chkconfig&lt;/span&gt; read this previous post on how to install it &lt;a href="http://cgerada.blogspot.com/2008/06/chkconfig-on-ubuntu.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;CHKCONFIG&lt;/span&gt; on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Ubuntu&lt;/span&gt;&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;nfs&lt;/span&gt; is also reliant on some other processes to be running for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;nfs&lt;/span&gt; to work these processes are &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;portmap&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;rpc&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;mountd&lt;/span&gt;,&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;nfsd&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;rpc&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;rquotd&lt;/span&gt;  except for portmap the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;nfs&lt;/span&gt; script will start the others up, however if you have problems with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;nfs&lt;/span&gt; you can check if these services are running by typing&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;rpcinfo&lt;/span&gt; -p&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;NFS&lt;/span&gt; is very straightforward to setup there is only one file you have to edit and that is /etc/exports&lt;br /&gt;edit it and add the following&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;/directory_name_to_be_shared        192.168.0.0/24(&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" class="blsp-spelling-error" id="SPELLING_ERROR_23" &gt;ro&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:85%;"&gt;,sync,insecure)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;make sure there are no spaces between the allowed network and the first (&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;were 192.168.0.0/24 is the network that you want to make the share available to, this could be a single &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;ip&lt;/span&gt; address, a few &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;ip&lt;/span&gt; addresses &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;separarted&lt;/span&gt; by commas a domain name etc&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;ro&lt;/span&gt; = read &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;only&lt;/span&gt; (you can change this to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;rw&lt;/span&gt; for read / write access)&lt;br /&gt;insecure = will allow access on ports above 1024&lt;br /&gt;&lt;br /&gt;save your file then type&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;exportfs&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; -a &lt;/span&gt;  to activate your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;nfs&lt;/span&gt; shares&lt;br /&gt;&lt;br /&gt;If you add more shares to your /etc/exports file just add them underneath one another and then  type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;exportfs&lt;/span&gt; -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;ua&lt;/span&gt; &lt;/span&gt; and then&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;exportfs&lt;/span&gt; -a&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;this will re-read any modifications that you may have made.&lt;span style="font-weight: bold;"&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/696132948753636518-4363486855210910910?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4363486855210910910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4363486855210910910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4363486855210910910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4363486855210910910'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/nfs-server.html' title='NFS Server'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2715592558552296151</id><published>2008-08-10T11:13:00.003+02:00</published><updated>2008-08-10T19:38:10.873+02:00</updated><title type='text'>NFS Client</title><content type='html'>you are able to connect to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;NFS&lt;/span&gt; shares that servers on your network have exported and made &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;available&lt;/span&gt; to connect to. to see what &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;NFS&lt;/span&gt; shares a server is making &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;available&lt;/span&gt; simply type&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;showmount&lt;/span&gt; -e  [server &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;ip&lt;/span&gt; address or server name]&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;eg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;showmount&lt;/span&gt; - e 192.168.1.60&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;This will show you what shares are &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;available&lt;/span&gt;.&lt;br /&gt;to temporally connect to the share you can mount it, and connect to it &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;eg&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;mkdir&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;mnt&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;sharename&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mount -t &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;nfs&lt;/span&gt; 192.168.0.60: /share /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;mnt&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;sharename&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;to make the following &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;persistant&lt;/span&gt; after reboots add the following to your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;fstab&lt;/span&gt; file&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;192.168.0.60: /share         /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;mnt&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;sharename&lt;/span&gt;/        &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;nfs&lt;/span&gt;            soft, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;intr&lt;/span&gt;,timeout=100     0     0 &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;-soft = will error out if share is not available&lt;br /&gt;-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;intr&lt;/span&gt; = will allow &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;nfs&lt;/span&gt; to be killed if server is unreachable&lt;br /&gt;-timeout =100 very important as without a timeout if the share hangs you will not be able to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;login&lt;/span&gt; to your system.&lt;br /&gt;&lt;br /&gt;save your /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;etc&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;fstab&lt;/span&gt; file and you are done.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2715592558552296151?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2715592558552296151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2715592558552296151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2715592558552296151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2715592558552296151'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/nfs-client.html' title='NFS Client'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2539138936295715938</id><published>2008-08-10T10:04:00.009+02:00</published><updated>2008-08-26T10:40:27.309+02:00</updated><title type='text'>Swap Space</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:verdana;"&gt;During the life of your PC you most probably will be adding more physical RAM to it,  in which case you may want to also increase  the amount of swap space,  swap space is disk space that is reserved for memory usage,  the same as a paging file in Windows.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;If your kernel needs more memory than what your physical RAM can produce it will write data to your swap space and use it as RAM,  people will argue on how much swap space you should make available, some seem to think that if you add enough ram you don't even need swap space however this is not a good idea since swap space is always used no matter how much RAM your system has, Linux will always move infrequently used programs and data to swap space even if you have Gigabytes of Ram. Since Hard disk costs are so low I always stick to the rule of thumb with regards to how much swap space is enough, no matter how much physical Ram I add to my system I always increase my swap space accordingly up to a maximum of 4&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Gb&lt;/span&gt; (I never make swap space bigger than 4GB no matter how much RAM I have). The rule  of thumb is that you should have double the amount of swap space available as the physical RAM on your computer. If you have 1GB of physical RAM then you should allocate 2GB of your hard drive to swap space.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Swap space is configured during installation but you can easily add more at anytime.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;There are 2 methods of adding swap space to your system  the one method is to create a partition of the swap space type and allocate that partition to swap space. The other way is to create a file of the required size (like a paging file) and then allocate that file to swap space.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;To use the partition method you will need to create the partition using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;fdisk&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;create the partition to the size that you want to allocate as swap space and then set the partition id to type 82&lt;br /&gt;once the partition is created issue the following command&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;mkswap&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; -L SWAP-&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;hda&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;7 /&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;dev&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;hda&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;were &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;hda&lt;/span&gt;&lt;/span&gt;7 is the the partition that you created&lt;br /&gt;&lt;br /&gt;edit your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;fstab&lt;/span&gt;&lt;/span&gt; file and add the following entry&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LABEL=SWAP-&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;hda&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;7                    swap                        swap                            defaults                        0            0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Save your /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;et&lt;/span&gt;&lt;/span&gt;c/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;fstab&lt;/span&gt;&lt;/span&gt; file and then issue the following command to read it into memory and turn it on&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;swapon&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; -a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Done&lt;br /&gt;&lt;br /&gt;Option 2,:  To use a file instead of a partition,  lets say you want to add a 2GB &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;swapfile&lt;/span&gt;&lt;/span&gt; to your system&lt;br /&gt;type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dd if=/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;dev&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;/zero of=/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;swapfile&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;bs&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;=1024M count=2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this will create a 2GB sized file called /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;swapfile&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;then type&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;mkswap&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; -L &lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;SWAPFILE&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; /&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;swapfile&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;then edit your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;fstab&lt;/span&gt;&lt;/span&gt; file and add the following entry&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LABEL=&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;SWAPFILE&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;                 swap                    swap                    defaults            0        0&lt;/span&gt;&lt;br /&gt;save your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;fstab&lt;/span&gt;&lt;/span&gt; file&lt;br /&gt;and then type&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;swapon&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; -a &lt;/span&gt;to read the file into memory and turn on all swap entries&lt;br /&gt;&lt;br /&gt;you can check your swap status by typing&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;swapon&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; -s&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&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/696132948753636518-2539138936295715938?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2539138936295715938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2539138936295715938' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2539138936295715938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2539138936295715938'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/swap-space.html' title='Swap Space'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-8704942133518065837</id><published>2008-08-08T18:53:00.005+02:00</published><updated>2008-08-09T08:04:53.034+02:00</updated><title type='text'>Fuser</title><content type='html'>Ever needed to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;umount&lt;/span&gt; a device or &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;file system&lt;/span&gt;  or needed to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;umount&lt;/span&gt; your  portable &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;USB&lt;/span&gt; drive&lt;br /&gt;but you can't as you keep getting a "Device is busy" error.&lt;br /&gt;&lt;br /&gt;You cannot &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;umount&lt;/span&gt; a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;file system&lt;/span&gt; that has open files, file handles,  or if the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;file system&lt;/span&gt; is currently in use.  not knowing what is using the device or what is keeping it busy can be &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;extremely&lt;/span&gt; frustrating.&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;fuser&lt;/span&gt; to the rescue.&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;fuser&lt;/span&gt; will tell you what processes are using a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;file system&lt;/span&gt; and keeping it busy, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;fuser&lt;/span&gt; will also allow you to kill the processes that are preventing you from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;umounting&lt;/span&gt; the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;filesystem&lt;/span&gt; or device.&lt;br /&gt;Lets say it is your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;usb&lt;/span&gt; memory stick  on /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;sda&lt;/span&gt;1 that you cannot &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;umount&lt;/span&gt;.&lt;br /&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;Type&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;fuser&lt;/span&gt; -v /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;sda&lt;/span&gt;1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will show you what and who is locking your device.&lt;br /&gt;Then type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;fuser&lt;/span&gt; -km /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;sda&lt;/span&gt;1&lt;/span&gt;&lt;br /&gt;to kill all the processes that are locking up and keeping your device busy.&lt;br /&gt;then you will be able to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;umount&lt;/span&gt; your device without any errors.&lt;br /&gt;&lt;br /&gt;fuser will also tell you what process or user is accesing a specific file.&lt;br /&gt;Type fuser -v /filename eg&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;fuser -v /home/cgerada/filename.txt&lt;/span&gt;&lt;br /&gt;and if you wanted to kill the process that is locking up the file, simply type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;fuser -km /home/cgerada/filename.txt&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-8704942133518065837?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/8704942133518065837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=8704942133518065837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8704942133518065837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8704942133518065837'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/fuser.html' title='Fuser'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1746896791662188601</id><published>2008-08-06T15:56:00.006+02:00</published><updated>2008-09-23T20:10:41.898+02:00</updated><title type='text'>Working with Groups and Shared Directories.</title><content type='html'>There are three special sets of permissions that can be set to files and folders.&lt;br /&gt;namely the Sticky Bit, 1770 (+t) the Set Group ID (sgid) 2770  (g+s) and the Set User ID (suid) 4770(u+s)&lt;br /&gt;&lt;br /&gt;The Sticky bit and the sgid permissions are useful to set onto folders that are shared and accessed by a group of users.&lt;br /&gt;&lt;br /&gt;the suid permission i will explain in another post since it is not relative to this topic.&lt;br /&gt;&lt;br /&gt;Sticky Bit:&lt;br /&gt;&lt;br /&gt;The sticky Bit sets permissions to a Directory that allows for only the owner of a file to be able to delete the file.&lt;br /&gt;when the sticky bit is set users are only allowed to delete files that they created.&lt;br /&gt;to set the sticky bit onto a folder simply type&lt;br /&gt;&lt;b&gt;chmod 1770 /folder_name&lt;/b&gt;&lt;br /&gt;or&lt;br /&gt;chmod +t /folder_name&lt;br /&gt;&lt;br /&gt;eg &lt;b&gt;chmod 1770 /marketing&lt;/b&gt;&lt;br /&gt;or chmod +t /marketing&lt;br /&gt;&lt;br /&gt;this would mean that every file created in the /marketing folder can only get deleted by the user who created that file.&lt;br /&gt;&lt;br /&gt;Set Group ID (Sgid):&lt;br /&gt;&lt;br /&gt;The sgid permission set onto a directory will insure that every file that is created inside that directory will inherit its permissions from the directory group and not from the person who created the file. This is essential in shared directories as it allows all users who are part of the group to have access to the files in the directory. an FTP shared directory for example would have the sgid permission set so that all files uploaded into the ftp folder would inherit the groups permission and not the permissions of the person who uploaded the file.&lt;br /&gt;&lt;br /&gt;to set the sgid onto a directory simply type&lt;br /&gt;&lt;br /&gt;&lt;b&gt;chmod 2770 /folder_name&lt;/b&gt;&lt;br /&gt;or&lt;br /&gt;chmod g+s /folder_name&lt;br /&gt;&lt;br /&gt;eg &lt;b&gt;chmod 2770 /marketing&lt;/b&gt;&lt;br /&gt;or chmod g+s /marketing&lt;br /&gt;&lt;br /&gt;it makes sense to set both the sticky bit and the sgid onto a group directory. To set both  permissions onto the same directory type&lt;br /&gt;&lt;b&gt;chmod 3770 /folder_name&lt;/b&gt;&lt;br /&gt;&lt;i&gt;eg&lt;/i&gt;&lt;b&gt; chmod 3770 /marketing&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;lets demonstrate this in a real life scenario.  We need to setup a group and a shared folder  called Marketing and we want clive, jenny, ian and anthony to all have access to the Marketing folder&lt;br /&gt;we need them all to be able to save files into the folder and we need them to be able to edit their own files but we do not want them to be able to delete each others files.&lt;br /&gt;&lt;br /&gt;First we need to create the marketing folder&lt;br /&gt;&lt;br /&gt;&lt;b&gt;mkdir /marketing&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;next we need to create the marketing group that clive, jenny, ian and anthony are all part of. a quick way to do this is to type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;groupadd marketing &lt;/span&gt;&lt;br /&gt;and then  edit your &lt;b&gt;/etc/group&lt;/b&gt; file and add the users seperated by commas that you want to have access to the group  were you find&lt;span style="font-weight: bold;"&gt; marketing:x501: &lt;/span&gt; (the users must exist on the system)&lt;br /&gt;like so&lt;br /&gt;&lt;b&gt;marketing:x:501:clive,jenny,ian,anthony&lt;/b&gt;&lt;br /&gt;next assign no specific user and the marketing group to have ownership to the group.  type&lt;br /&gt;&lt;b&gt;chown nobody.marketing /marketing&lt;/b&gt;&lt;br /&gt;next we want to assign the sticky bit as well as the sgid to the /marketing folder, so that all files created in the /marketing folder are accessible by everybody who is part of the marketing group&lt;br /&gt;but only users who created the files are able to delete them.&lt;br /&gt;type&lt;b&gt; chmod 3770 /marketing &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1746896791662188601?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1746896791662188601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1746896791662188601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1746896791662188601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1746896791662188601'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/working-with-groups-and-shared_06.html' title='Working with Groups and Shared Directories.'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5693276207080740918</id><published>2008-08-06T12:08:00.005+02:00</published><updated>2011-10-29T14:42:09.873+02:00</updated><title type='text'>Find</title><content type='html'>The fundamentals behind the Unix Philosophy are :  &lt;br /&gt;&lt;ul&gt;&lt;li&gt;All  Programs do only one thing  but they do it really well.      &lt;/li&gt;&lt;li&gt;All programs must work together i.e.  The output of one program must be able to be  passed to the input of another.      &lt;/li&gt;&lt;li&gt;Programs must handle text streams because that is the universal interface. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;This philosophy is what makes every command in Linux so Feature rich, and the Find command is no exception.  Find does one thing,  and that is to find files on your system and it does it really really well.&lt;br /&gt;&lt;br /&gt;the basics of the find command are&lt;br /&gt;&lt;b&gt;find -name "file1.txt"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;this will search all directories from the directory that you are in and will look for the file named file1.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find -iname "file1.txt"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will search all directories from the directory that you are in and will perform a case insensitive search for the file named file1.txt  ie it will find in its search if it exists File1.txt  FiLe1.TxT, FILE1.TXT  and file1.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "file1.txt"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will search your entire file system for file1.txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*.txt"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will search your entire file system for all files ending in .txt&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*able*"&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will search your entire file system for all files that have able in their name.&lt;br /&gt;&lt;br /&gt;right, now that we've got the basics out of the way.&lt;br /&gt;&lt;br /&gt;multiple search criteria can be passed to find eg&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*.txt" -user cgerada&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will search for and find all .txt files that are owned by user cgerada only.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*.txt" -not -user cgerada&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will search for and find all .txt files that are NOT owned by user cgerada (so all other users .txt files will be listed)&lt;br /&gt;&lt;br /&gt;Right ... Moving on ................&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -size +10M &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will search your file system finding all files that are greater than 10Mb in Size.&lt;br /&gt;this is extremely useful for cleaning up your hard drive of large zip archives that are taking space and are no longer needed but you do not remember were they are.&lt;br /&gt;&lt;br /&gt;you can substitute the M for a G for gigabyte ie&lt;br /&gt;&lt;b&gt;find / -size +1G&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will find all files on your file system that are larger than 1 GB&lt;br /&gt;&lt;br /&gt;moving on...................&lt;br /&gt;&lt;br /&gt;lets say you need to find a document on your system that you were working on in the last hour, you cannot remember the name of the document the only unique criteria you know is that you worked on it less than an hour ago.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -amin -60&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will list all files that were accessed less than 60 Minutes ago&lt;br /&gt;&lt;br /&gt;&lt;b&gt;-amin&lt;/b&gt; = when file was last read (accessed)&lt;br /&gt;&lt;b&gt;-mmin&lt;/b&gt; = when file was last changed (modified)&lt;br /&gt;&lt;b&gt;-cmin&lt;/b&gt; = when file data or meta data last changed&lt;br /&gt;&lt;br /&gt;if you want to look for files that were accessed more than 1 day ago use -atime instead of -amin eg&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -atime -5 &lt;/b&gt;&lt;br /&gt;will list all files that were accessed less than 5 days ago&lt;br /&gt;&lt;br /&gt;you can narrow down you search to find all .txt files that were accessed less than 5 days ago and are less than 1mb in size&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*.txt" -size -1M -atime -5 &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;moving on ..................&lt;br /&gt;&lt;br /&gt;find is able to find files that are newer or older than a known file.&lt;br /&gt;lets say you want to find a file that you know was created after the time that you created file1.txt but you cannot remember the name of the file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -newer file1.txt&lt;/b&gt;&lt;br /&gt;will list all files that are newer than file1.txt.You can combine search criteria to narrow down your search eg&lt;br /&gt;&lt;b&gt;find / -name "*.txt" -newer file1.txt &lt;/b&gt; will search for all .txt files that were created after file1.txt  and of course you can negate your search criteria so that you can search for all files that are older than file1.txt eg&lt;br /&gt;&lt;b&gt;find / -name "*.txt" -not -newer file1.txt&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;will find all .txt files that were created before file1.txt&lt;br /&gt;&lt;br /&gt;moving on.......................&lt;br /&gt;&lt;br /&gt;Find is able to execute other commands on files that it has found.&lt;br /&gt;to execute other commands on the results of your search we use the&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-ok&lt;/span&gt;  or the  &lt;span style="font-weight: bold;"&gt;-exec&lt;/span&gt; switches&lt;br /&gt;lets say for example your hard disk has become full and you want to move all files that end in .zip that are bigger than 100Mb into a directory called /largefiles&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*.zip" -size +100M -ok mv {} /largefiles/ \;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;the &lt;span style="font-weight: bold;"&gt;-ok&lt;/span&gt; switch lets you confirm each file before it is moved&lt;br /&gt;if you substitute -ok for &lt;span style="font-weight: bold;"&gt;-exec &lt;/span&gt;then you will not be asked and the move will just take place.&lt;br /&gt;&lt;br /&gt;I advise you to first run the command with out the -ok or -exec option which will just list the files, then if you are happy that the correct files have been listed re-run the command and add in the -exec option&lt;br /&gt;the {} are place holders that will put every file it finds in the place holder and run the command on that file name .&lt;br /&gt;The reason that the command ends in a &lt;span style="font-weight: bold;"&gt; \;&lt;/span&gt;   is because find uses ; as the delimiting character and so does the bash shell so to prevent bash from interpreting the ; we need to put a &lt;span style="font-weight: bold;"&gt;\&lt;/span&gt;  in front of it. that way the interpreting of the ; delimiter is passed on to find.&lt;br /&gt;&lt;br /&gt;other examples: Lets say you want to rename all .zip files on your system to .old files&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*.zip" -exec mv {}.old \;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;or lets say you want to find all files on your system that end in .sh and make them all executable&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find / -name "*/sh" -exec chmod 755 {} \;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;remember  whenever you use the -ok or -exec option your statement must end in a \;&lt;br /&gt;&lt;br /&gt;one last  example:&lt;br /&gt;&lt;br /&gt;lets say you want to be prompted before removing all of cgerada's tmp files that are over 5 days old&lt;br /&gt;&lt;br /&gt;&lt;b&gt;find /tmp -ctime +5 -user cgerada -ok rm {} \;&lt;/b&gt;to do the same but not be prompted you would use the &lt;span style="font-weight: bold;"&gt;-exec &lt;/span&gt;option like so&lt;b&gt;&lt;br /&gt;find /tmp -ctime +5 -user cgerada -exec rm {} \;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Bonus:&lt;b&gt; &lt;/b&gt;this will remove all empty directories/folders&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;find -depth -type d -empty -exec rmdir {} \;&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5693276207080740918?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5693276207080740918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5693276207080740918' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5693276207080740918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5693276207080740918'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/find_7728.html' title='Find'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4424599678426957436</id><published>2008-08-02T11:04:00.013+02:00</published><updated>2008-08-02T14:47:10.388+02:00</updated><title type='text'>IP tables rule to secure against Brute force Attacks</title><content type='html'>&lt;span style="font-size:100%;"&gt;make sure you read my previous post &lt;a href="http://cgerada.blogspot.com/2008/06/how-to-further-secure-your-server-for.html"&gt;"How to further secure your sever for SSH"&lt;/a&gt; and applying&lt;br /&gt;those tips first and then applying  these rules.&lt;br /&gt;&lt;br /&gt;The following 2 iptables commands will limit the amount of ssh logins to your server to only 4  allowed per minute from the same ip address&lt;br /&gt;as compared to the default unlimited setting. you can change the numbers to any limits that you wish.&lt;br /&gt;&lt;br /&gt;The reason why you would want to do this is to protect against scripts that are written to gain access to your system via brute force attacks to your server.&lt;br /&gt;look at your /var/log/secure  log file to see just how often a dictionary of user-names and passwords has been tried to login to your server.&lt;br /&gt;by instating the following 2 iptables rules you secure yourself against these type of brute force login attacks.&lt;br /&gt;&lt;br /&gt;change eth0 to whatever Ethernet port your server is connected to the outside world through.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;b&gt;iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent \--set&lt;/b&gt;&lt;/span&gt;  &lt;pre  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m&lt;br /&gt;recent \--update --seconds 60 --hitcount 4 -j DROP&lt;/b&gt; &lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;you must then save your rules&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/etc/init.d/ iptables save&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;The --state switch receives a comma separated list of connection states as an argument, by using "--state NEW" this makes sure that only new connections are managed.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;The --set parameter in the first rule  also insures that the IP address of the host which initiated the connection will be added to the "recent list", where it is then checked if used again in our second rule.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;The --update switch in the second rule  checks whether the IP address is in the list of recent connections, to port 22,  port 22 will be in the list because we used the --set switch to add it in the first  rule.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;Once it has confirmed that the ip address of the host has indeed connected before,  then the --seconds switch is used to insure that the IP address is only going to be flagged  if the last connection was within the time frame specified. The --hitcount switch will measure  if the count of connection attempts is greater than &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;i style="font-family: verdana;"&gt;or&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt; equal to the number given.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;this rule  will drop any connections if The IP address which initiated the connection has previously been added to the list &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;b style="font-family: verdana;"&gt;and &lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;The IP address has sent a packet in the past 60 seconds &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;b style="font-family: verdana;"&gt;and &lt;/b&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;The IP address has sent more than 4 packets in total.&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4424599678426957436?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4424599678426957436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4424599678426957436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4424599678426957436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4424599678426957436'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/ip-tables-rule-to-secure-against-brute.html' title='IP tables rule to secure against Brute force Attacks'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4481658688489856838</id><published>2008-08-02T08:18:00.002+02:00</published><updated>2008-08-02T08:20:51.275+02:00</updated><title type='text'>1000th Visit</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_O1RbeaI0mtw/SJP8rMR5kII/AAAAAAAAASY/XT5ymCpd6AI/s1600-h/1000.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_O1RbeaI0mtw/SJP8rMR5kII/AAAAAAAAASY/XT5ymCpd6AI/s400/1000.jpg" alt="" id="BLOGGER_PHOTO_ID_5229801411268153474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Today 02 August 2008 @ 06:20.00 GMT&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4481658688489856838?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4481658688489856838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4481658688489856838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4481658688489856838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4481658688489856838'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/08/1000th-visit.html' title='1000th Visit'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_O1RbeaI0mtw/SJP8rMR5kII/AAAAAAAAASY/XT5ymCpd6AI/s72-c/1000.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-538980795126044178</id><published>2008-07-31T22:18:00.008+02:00</published><updated>2009-03-17T00:13:17.488+02:00</updated><title type='text'>Securtiy with IPTABLES</title><content type='html'>Another way to secure your server is by using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;iptables&lt;/span&gt;, you can use &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;iptables&lt;/span&gt; together with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;tcp&lt;/span&gt;_wrappers or on their own, the choice is yours, the advantage with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;iptables&lt;/span&gt; is that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;iptables&lt;/span&gt; can be used to ACCEPT, DROP or REJECT packets of Data, it can also be used to FORWARD specific Data onto different Destinations and it can be used to configure NAT (Network Address Translation) also known as Masquerading.&lt;br /&gt;&lt;br /&gt;the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;usage&lt;/span&gt; of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;IPTABLES&lt;/span&gt; is as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;iptables&lt;/span&gt; -t type (action) (direction) (type of packet) -j (what to do)&lt;what&gt;&lt;/what&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;their are  two types that you can choose (the -t switch)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;filter&lt;/span&gt; = sets a rule for filtering packets&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;nat&lt;/span&gt;&lt;/span&gt;= configures Network Address Translation, also known as Masquerading&lt;br /&gt;the default type is &lt;span style="font-weight: bold;"&gt;filter&lt;/span&gt; , if you don't specify a &lt;span style="font-weight: bold;"&gt;-t&lt;/span&gt; type the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;iptables&lt;/span&gt; command will assume that you are trying to setup a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;filtering&lt;/span&gt; rule. so you can leave out the -t switch if you are setting up a firewall rule.&lt;br /&gt;next is the (action)&lt;br /&gt;you can either&lt;br /&gt;-&lt;span style="font-weight: bold;"&gt;A&lt;/span&gt; append a rule&lt;br /&gt;                     -&lt;span style="font-weight: bold;"&gt;D&lt;/span&gt; delete a rule&lt;br /&gt;                                                -&lt;span style="font-weight: bold;"&gt;L&lt;/span&gt; list the currently configured Rules&lt;br /&gt;                                                 -&lt;span style="font-weight: bold;"&gt;F&lt;/span&gt; flush the rules&lt;br /&gt;&lt;br /&gt;next you need to specify which packets are the rules applied to (direction of packet)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;INPUT&lt;/span&gt; = all &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_11"&gt;incoming&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;packets&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OUTPUT&lt;/span&gt; = all outgoing packets&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;FORWARD&lt;/span&gt; = all packets that are being forwarded to another computer.&lt;br /&gt;&lt;br /&gt;next you need to specify the source or destination address of the packet&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-s &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;ipaddress&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-d&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;ipaddress&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;next you need to specify the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_15"&gt;protocol&lt;/span&gt; of the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;packet&lt;/span&gt; using the &lt;span style="font-weight: bold;"&gt;-p&lt;/span&gt; switch&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;eg&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-p &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;tcp&lt;/span&gt;&lt;/span&gt; and then the port using the &lt;span style="font-weight: bold;"&gt;--&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;dport&lt;/span&gt; &lt;/span&gt;switch &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;eg&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-p &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;tcp&lt;/span&gt; --&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;dport&lt;/span&gt; 80 &lt;/span&gt;&lt;br /&gt;and then &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_23"&gt;finally&lt;/span&gt; what needs to be done with the packet which is the &lt;span style="font-weight: bold;"&gt;-j &lt;/span&gt;switch&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DROP&lt;/span&gt; = the packet is dropped (no message is sent to the requesting host)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REJECT&lt;/span&gt; = the packet is rejected and an error message is sent to the requesting host&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ACCEPT&lt;/span&gt; = the packet is Accepted&lt;br /&gt;an ACCEPTED Packet can be forwarded by using the &lt;span style="font-weight: bold;"&gt;- A &lt;/span&gt;switch and then &lt;span style="font-weight: bold;"&gt;FORWARD&lt;/span&gt;&lt;br /&gt;lets set up an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;iptable&lt;/span&gt; chain.&lt;br /&gt;The first step is always to see what &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;iptables&lt;/span&gt; are already configured . type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;iptables&lt;/span&gt; -L&lt;/span&gt;&lt;br /&gt;this reads the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;iptables&lt;/span&gt; from your &lt;span style="font-weight: bold;"&gt;/etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;sysconfig&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;iptables&lt;/span&gt; &lt;/span&gt;file (we do not edit this file directly it is best to use the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;iptables&lt;/span&gt; command with the relevant switches to configure your chains.)&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;iptables&lt;/span&gt; -L will return your rules in three different categories INPUT,FORWARD and OUTPUT&lt;br /&gt;the following command will set a rule that denies all &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_32"&gt;traffic&lt;/span&gt; from 192.168.0.0 network&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;iptables&lt;/span&gt; -A INPUT -s 192.168.0.0/24 -j REJECT&lt;br /&gt;&lt;/span&gt;the following rule will make your server &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;un-ping-able&lt;/span&gt; as it will drop all &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;ICMP&lt;/span&gt; (ping) packets. Assume that your network is 192.168.0.0  the (!) inverts the meaning in this case the command applies to all &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;IP&lt;/span&gt; addresses except those on the 192.168.0.0 network&lt;br /&gt;&lt;br /&gt;if you need to insert the rule at line number 3 of the chain then type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;iptables&lt;/span&gt; -I INPUT 3 -s 192.168.0.0/24 -j REJECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;iptables&lt;/span&gt; -A INPUT -s !192.168.0.0/24 -p &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;icmp&lt;/span&gt; -j DROP&lt;br /&gt;&lt;/span&gt;to delete any of the above commands simply retype them and change the -A to a -D &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;eg&lt;/span&gt;:&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;iptables&lt;/span&gt; -D INPUT -s !192.168.0.0/24 -p &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;icmp&lt;/span&gt; -j DROP  &lt;/span&gt;will remove the previous chain&lt;br /&gt;you can check your progress by typing &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;iptables&lt;/span&gt; -L&lt;/span&gt;  at anytime.&lt;br /&gt;Once you have added the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;iptable&lt;/span&gt; rules that you want , you need to save your configuration. This is done with the following command&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/iptables save&lt;br /&gt;&lt;/span&gt;this will save your configuration into the &lt;span style="font-weight: bold;"&gt;/etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;sysconfig&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;iptables&lt;/span&gt;&lt;/span&gt; file&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;you also need to insure that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;iptables&lt;/span&gt; starts up on &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_47"&gt;run levels&lt;/span&gt; 2,3,4 and 5 so that it is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_48"&gt;persistent&lt;/span&gt; after a reboot&lt;br /&gt;to do this type the following&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"&gt;chkconfig&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;iptables&lt;/span&gt; on&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-538980795126044178?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/538980795126044178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=538980795126044178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/538980795126044178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/538980795126044178'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/securtiy-with-iptables.html' title='Securtiy with IPTABLES'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4598896531920938120</id><published>2008-07-31T19:30:00.010+02:00</published><updated>2008-08-01T08:54:36.776+02:00</updated><title type='text'>Security with TCP wrappers</title><content type='html'>&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;TCP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;_wrappers is on by default and you do not need to start any service for it to work.&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TCP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;_wrappers is configured by editing 2 files  &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;etc/hosts.deny&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When your system receives a network request for a service. The request is passed on to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;tcp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;_wrappers&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;tcp&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;_wrappers is very straight forward and easy to set-up.&lt;br /&gt;Users and clients that are listed in &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt; are allowed access to the listed services&lt;br /&gt;and users and clients that are listed in the &lt;span style="font-weight: bold;"&gt;/etc/hosts.deny &lt;/span&gt;file are denied access to the listed services.&lt;br /&gt;It's important to know the order of things that your system takes to make its &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;decisions&lt;/span&gt;. When a request is made of your system, your system will first read your &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt; file and if it finds a rule in there for the requested service the rule is obeyed and no additional searches take place. If there are no rules in &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt; for the requested service then your system will look in &lt;span style="font-weight: bold;"&gt;/etc/hosts.deny&lt;/span&gt; and if it sees a rule in their for the service the service is denied. If your system sees no rules in neither &lt;span style="font-weight: bold;"&gt;/etc/host.allow&lt;/span&gt; nor in &lt;span style="font-weight: bold;"&gt;/etc/hosts.deny&lt;/span&gt; then the service is automatically granted access.&lt;br /&gt;the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;syntax&lt;/span&gt;&lt;/span&gt; of your access rules are as follows&lt;br /&gt;&lt;br /&gt;(SERVICES  to allow or block &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;separated&lt;/span&gt;&lt;/span&gt; by commas)  &lt;span style="font-weight: bold;"&gt;:  &lt;/span&gt;Clients or source destinations&lt;br /&gt;so lets set up some rules, edit &lt;span style="font-weight: bold;"&gt;/etc/host.deny &lt;/span&gt;using your favourite text editor and add the following line&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ALL :  ALL &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this will make your server air tight as every service  from every host is Denied.&lt;br /&gt;however we can allow the clients and services that we want by adding them to the &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt; file, remember your system &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;Will&lt;/span&gt; first check your &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt; file and if it finds any rules in there then those rules are obeyed and no further checking for those rules will take place , so by adding the following line to &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ALL :  192.168.0.0/24&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;substitute 192.168.0.0/24 with the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;ip&lt;/span&gt;&lt;/span&gt; address of the network that you want to allow access to your server from&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;this will allow access to all services from the  192.168.0.0 network to have access on your server but all other networks will be denied since the rule in your &lt;span style="font-weight: bold;"&gt;/etc/hosts.deny &lt;/span&gt;file will block them.&lt;br /&gt;&lt;br /&gt;Your access rules can be very flexible , for example you could add a rule like so into your &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow &lt;/span&gt;file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ALL : 192.168.0.0/24 EXCEPT 192.168.0.10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this would allow all hosts from the 192.168.0.0 network access to all services on your server except for host 192.168.0.10 who will be denied.&lt;br /&gt;&lt;br /&gt;you can also allow access to specific services only &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;eg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;sshd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;ftpd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;telnetd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, http : 192.168.0.20 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;would allow host 192.168.0.20 to ssh, ftp telnet and access your server over http .&lt;br /&gt;&lt;br /&gt;likewise you could also deny access to specific services and specific users by adding the rules into your &lt;span style="font-weight: bold;"&gt;/etc/hosts.deny&lt;/span&gt; file&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;eg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; :&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ALL EXCEPT &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;sshd&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; : 192.168.0.0/24 &lt;/span&gt;&lt;br /&gt;added to your&lt;span style="font-weight: bold;"&gt; /etc/hosts.deny &lt;/span&gt;file would deny all services except ssh from all hosts on the 192.168.0/24 network.&lt;br /&gt;&lt;br /&gt;as you can see &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;TCP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;_WRAPPERS is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;extremely&lt;/span&gt; flexible and  &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_13"&gt;straight forward&lt;/span&gt; to use.&lt;br /&gt;&lt;br /&gt;Other &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_13"&gt;recognised &lt;/span&gt; commands that &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_14"&gt;you&lt;/span&gt; can put into your&lt;span style="font-weight: bold;"&gt; /etc/hosts.allow&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;/etc/hosts.deny &lt;/span&gt;files are&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;hostname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;.com &lt;/span&gt;   (will block or allow clients from the specified &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;hostname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;eg&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; :&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ALL :  &lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;hostname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;.com &lt;/span&gt;    in your &lt;span style="font-weight: bold;"&gt;/etc/hosts.allow&lt;/span&gt; file will allow all clients from the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;hostname&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.com domain access to all services on your server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;user@machine_name.hostname.com &lt;/span&gt;  will apply to the specific user from a given computer&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;192.168.        &lt;/span&gt;since the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;IP&lt;/span&gt; address&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; ends with a . it specifies all hosts whose &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;IP&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;address starts with 192.168.&lt;br /&gt;&lt;br /&gt;to see the exact names of all the services that you can allow or deny take a look at your &lt;span style="font-weight: bold;"&gt;/etc/services &lt;/span&gt;file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-4598896531920938120?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4598896531920938120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4598896531920938120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4598896531920938120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4598896531920938120'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/security-with-tcp-wrappers.html' title='Security with TCP wrappers'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6415647272208504569</id><published>2008-07-31T11:38:00.014+02:00</published><updated>2008-08-02T07:33:12.606+02:00</updated><title type='text'>Running Commands Conditionally</title><content type='html'>in Linux every  command you run  produces and records an exit status on whether the command was &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;successful&lt;/span&gt; or not. If a command is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;successful&lt;/span&gt; the exit status will  be recorded as "&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;"  and if the command is not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;successful&lt;/span&gt; then the exit status is recorded as any number between "&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;255&lt;/span&gt;". The exit status of the last command that you ran is recorded inside the &lt;span style="font-weight: bold;"&gt;$?&lt;/span&gt; variable.&lt;br /&gt;To see what the exit status was of your previous command simply type&lt;span style="font-weight: bold;"&gt; echo $?&lt;/span&gt;&lt;br /&gt;were this is useful is it allows you to run commands conditionally, based on the commands exit status. When you type two commands and you &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;separate&lt;/span&gt; them with a&lt;span style="font-weight: bold;"&gt; &amp;amp;&amp;amp;&lt;/span&gt; the second command will only run if the first command produced an exit status of "&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;" &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;ie&lt;/span&gt; was &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;successful&lt;/span&gt;.&lt;br /&gt;If you &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;separate&lt;/span&gt; the commands with a &lt;span style="font-weight: bold;"&gt;||&lt;/span&gt; then the second command will only run if the first command produced an exit status of "&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;255&lt;/span&gt;" &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;ie&lt;/span&gt; was not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;successful&lt;/span&gt;.&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;eg&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;ping 192.168.0.1 -c1 -w2  &amp;amp;&amp;amp; echo "host is up"&lt;/span&gt;&lt;br /&gt;- c1  = send 1 ping packet&lt;br /&gt;-w2 = wait 2 seconds for a response&lt;br /&gt;&lt;br /&gt;will display "host is up" if the ping command was &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;successful&lt;/span&gt; at reaching the host at 192.168.0.1 and  &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;ping 192.168.0.1 -c1 -w2  || echo "host is down" &lt;/span&gt;&lt;br /&gt;will display "host is down"  if the ping command was &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_11"&gt;unsuccessful&lt;/span&gt; in reaching the host at 192.168.0.1&lt;br /&gt;&lt;br /&gt;to get the desired result you should combine the commands like so&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ping 192.168.0.1 -c1 -w2  &amp;amp;&amp;amp; echo "host is up"  || echo  "host is down" &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;since you don't care about the actual output of the ping command (you are only interested if it was succesful or not  ) You can redirect stdout and stderror to /dev/null  so your final command would be something like:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ping 192.168.0.1 -c1 -w2  &amp;amp;&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;dev&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;/null &amp;amp;&amp;amp; echo "Host is up" || echo "Host is Down" &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-6415647272208504569?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6415647272208504569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6415647272208504569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6415647272208504569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6415647272208504569'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/running-commands-conditionally.html' title='Running Commands Conditionally'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-7647439625566997168</id><published>2008-07-28T12:27:00.002+02:00</published><updated>2008-07-28T12:30:32.334+02:00</updated><title type='text'>Air Asia Advert</title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://bp2.blogger.com/_O1RbeaI0mtw/SI2fGpzJoTI/AAAAAAAAASQ/b-ukDWfAoUM/s1600-h/Destination+Billboard-758496.JPG"&gt;&lt;img src="http://bp2.blogger.com/_O1RbeaI0mtw/SI2fGpzJoTI/AAAAAAAAASQ/b-ukDWfAoUM/s320/Destination+Billboard-758496.JPG" alt="" id="BLOGGER_PHOTO_ID_5228009679095439666" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-7647439625566997168?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/7647439625566997168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=7647439625566997168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7647439625566997168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/7647439625566997168'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/air-asia-advert.html' title='Air Asia Advert'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_O1RbeaI0mtw/SI2fGpzJoTI/AAAAAAAAASQ/b-ukDWfAoUM/s72-c/Destination+Billboard-758496.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-752706102321753231</id><published>2008-07-27T08:23:00.009+02:00</published><updated>2008-07-28T09:26:42.213+02:00</updated><title type='text'>Save, Convert and join  Youtube movies for playback on your Blackberry</title><content type='html'>&lt;span style="font-family:verdana;"&gt;lets say you see 4 movie clips on you tube that you  want to join together to form 1 movie and save it to and play it on your Blackberry.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;to start first download the mencoder tool. It should be available in your distributions repository&lt;/span&gt;.&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;type &lt;span style="font-weight: bold;"&gt;apt-get install mencoder&lt;/span&gt; if you have a debian derivative distro or&lt;br /&gt;type &lt;span style="font-weight: bold;"&gt;yum install mencoder&lt;/span&gt; if you have a red hat one.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;When you watch a movie clip on you tube  the .flv  file is automatically saved into your &lt;span style="font-style: italic;"&gt;/tmp&lt;/span&gt; folder so once you have watched a clip that you want, you can  simply copy it from your /tmp folder and save it somewhere safe, youtube saves its files  with a name that starts with Flash followed by some arbitrary characters like &lt;span style="font-weight: bold;"&gt;FlashFgna&lt;/span&gt;. Copy these files to another folder so that they do not get deleted as your system will delete all files in your /tmp folder when you log out. so for my example watch the four movies you want on you tube, each one in a different tab of your browser once you have watched all 4 movies,  open up a terminal window&lt;br /&gt;type &lt;span style="font-weight: bold;"&gt;cd ~&lt;/span&gt; then type &lt;span style="font-weight: bold;"&gt;mkdir videos&lt;/span&gt; which will create the directory were we  are going to be working in.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-weight: bold;"&gt;cd videos&lt;/span&gt; to cd into the folder&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;type &lt;span style="font-weight: bold;"&gt;copy /tmp/Flash* .&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;will copy the four .flv files to your &lt;span style="font-style: italic;"&gt;/home/username/videos/&lt;/span&gt; folder don't worry if you don't see the .flv extension they are .flv files Linux doesn't care for extensions&lt;/span&gt;.&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;br /&gt;Sometimes you can skip the following step and you can try and join and convert your Flash files from .flv to .mp4. using the mencoder tool.  but I have been much more successfull first encoding the files to the .avi format and then if i want to put the file on my Blackberry i will encode from .avi to .mp4 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;to encode from Flash to .avi we need to create the tool that will convert flv to avi files, here  is a script that can do this.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Copy the following lines into your clipboard by highlighting them directly from this post and hitting &lt;span style="font-weight: bold;"&gt;cntl- "c"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;#!/bin/sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;if [ -z "$1" ]; then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt; echo "Usage: $0 {-divx|-xvid} list_of_flv_files"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt; exit 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;# video encoding bit rate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;V_BITRATE=1000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;while [ "$1" ]; do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt; case "$1" in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;   -divx)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     MENC_OPTS="-ovc lavc -lavcopts \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;       vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     ;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;   -xvid)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     ;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;   *)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     if file "$1" | grep -q "Macromedia Flash Video"; then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;       mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;         -lameopts fast:preset=standard -o \&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;         "`basename $1 .flv`.avi"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;       echo "$1 is not Flash Video. Skipping"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     fi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;     ;;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt; esac&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt; shift&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;type &lt;span style="font-weight: bold;"&gt;vi /usr/local/bin/flv2avi.sh&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(/usr/local/bin is a good place to save scripts as it is part of your path environment which means you will be able to execute your script from anywhere on your system)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;this will open up your vi editor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;once open type &lt;span style="font-weight: bold;"&gt;"i"&lt;/span&gt; to go into insert mode&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;then click on edit paste to paste the code into your script&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;type &lt;span style="font-weight: bold;"&gt;:wq&lt;/span&gt; to save your script and exit out of vi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;type &lt;span style="font-weight: bold;"&gt;chmod 755 /usr/local/bin/flv2avi.sh&lt;/span&gt; to make your script executable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;to convert all the .flv files to avi we can do them all in one command. Type &lt;span style="font-weight: bold;"&gt;flv2avi.sh -divx Flashfile1 Flashfile2 Flashfile3 Flashfile4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;were &lt;span style="font-style: italic;"&gt;file1 file2 file3&lt;/span&gt; &lt;span style="font-style: italic;"&gt;file4&lt;/span&gt; are the &lt;span style="font-style: italic;"&gt;.flv&lt;/span&gt; files you want to convert. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;once done you will have 4 additional files in your &lt;span style="font-style: italic;"&gt;/home/username/videos &lt;/span&gt;folder all with .avi extensions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;now to join these files together and convert them to one  &lt;span style="font-style: italic;"&gt;.mp4&lt;/span&gt; file which is the format that works best on your blackberry we also do it all in one command&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:verdana;" &gt;mencoder file1.avi file2.avi file3.avi file4.avi -o newfilename.mp4 -ovc lavc -oac lavc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;this will join all 4 files into one file and convert it to a &lt;span style="font-style: italic;"&gt;.mp4&lt;/span&gt; file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;next just copy the file onto your blackberry and you will be able to play it using your blackberry's media player&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-752706102321753231?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/752706102321753231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=752706102321753231' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/752706102321753231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/752706102321753231'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/save-convert-and-join-youtube-movies.html' title='Save, Convert and join  Youtube movies for playback on your Blackberry'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1075720599637430503</id><published>2008-07-26T08:10:00.004+02:00</published><updated>2012-01-17T13:08:41.486+02:00</updated><title type='text'>Multiple Terminals in one Terminal Window with Terminator.</title><content type='html'>&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;After a very short while of working on my desktop I often find myself with a mass of open terminal windows, and it sometimes becomes difficult to work as I struggle to find the Terminal Window that I want. I don't particularly like to use tabbed terminals to open multiple terminals, as I often need to  see all of my open terminals side by side at the same time.    Terminator to the Rescue!  &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Terminator is a virtual terminal program that allows you to split multiple terminal Windows in the same window. Terminator should be available in your Linux distributions Repository. &lt;span style="font-weight: bold;"&gt;apt-get install terminator&lt;/span&gt; if you use a Debian Flavoured Distribution or &lt;span style="font-weight: bold;"&gt;yum install terminator&lt;/span&gt; if you use a Red Hat one.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Once Installed you will find the terminator icon to start the program under Applications, accessories. or you can start terminator at the command line by typing &lt;span style="font-weight: bold;"&gt;terminator &amp;amp;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;When it starts,  a Terminal Window will open which will allow you to open new Terminals within your terminal in a split screened environment. What I like about this is when you minimize your terminal and you want to get back to it just by  maximizing one Terminal you have all the terminals you were working on immediately accessible.  &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Once open try the following &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt;Ctrl+Shift+O &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Split terminals Horizontally. &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt;Ctrl+Shift+E &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Split terminals Vertically. &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt;Ctrl+Shift+N &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Move to next terminal. &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div face="verdana" style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt;Ctrl+Shift+P &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div face="verdana" style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Move to previous terminal. &lt;/span&gt;&lt;/div&gt;&lt;div face="verdana" style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div face="verdana" style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt;Ctrl+Shift+W &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div face="verdana" style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;Close the current terminal. &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt;Ctrl+Shift+Q &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;b&gt; F11 &lt;/b&gt;toggle Full Screen&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: inherit;"&gt;you can also use your mouse to switch between terminals and to resize them by dragging their borders to the required size.&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/696132948753636518-1075720599637430503?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1075720599637430503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1075720599637430503' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1075720599637430503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1075720599637430503'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/multiple-terminals-in-one-terminal.html' title='Multiple Terminals in one Terminal Window with Terminator.'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2464038010163313418</id><published>2008-07-25T19:26:00.008+02:00</published><updated>2010-08-29T16:45:23.975+02:00</updated><title type='text'>Session Managment with Screen</title><content type='html'>You log into your remote server via SSH and are busy downloading and installing a new program. In the middle of the download  you loose your connection to your server. "Connection Closed" You have just lost your session!  Screen to the rescue.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;Screen is a window manager for your ssh terminal sessions.  Screen is an absolute life saver when working over ssh as it allows you to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;reconnect&lt;/span&gt; to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;your sessions&lt;/span&gt;  and continue working exactly were you left off. Screen allows  you to re-attach to your &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;session&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;Screen is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;available&lt;/span&gt; in your &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;Linux&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;distributions&lt;/span&gt; repository. To install screen type&lt;/p&gt;     &lt;p&gt;&lt;span style="font-weight: bold;"&gt;apt-get install screen&lt;/span&gt; if you are using a Debian based &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;distro&lt;/span&gt;. Or &lt;span style="font-weight: bold;"&gt;yum install screen&lt;/span&gt; if you are using a red hat &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;derivative&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;distribution&lt;/span&gt;. You will want to run and install screen onto the machine that you are connecting to. Once installed start screen by typing&lt;span style="font-weight: bold;"&gt; screen.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;If you are presented with a text message just hit enter. If nothing happens don't worry it just means that you are now inside a window within screen and it is running and working.&lt;br /&gt;&lt;/p&gt;Screen uses the command "&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Ctrl&lt;/span&gt;-A&lt;/span&gt;"  to send commands to screen instead of the shell. To get help, just type "&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Ctrl&lt;/span&gt;-A&lt;/span&gt;" then "&lt;span style="font-weight: bold;"&gt;?&lt;/span&gt;"&lt;p&gt;Screen  supports multiple windows. This is useful for doing simultaneous tasks on the same machine over ssh without opening new sessions. Sometimes I need to run multiple tasks on the same remote machine or whilst one task is busy running I need to start up another task. Without screen I would need to make a new connection to the same machine or even more multiple connections and if any of the connections drop then i am screwed .  With screen you connect to your remote machine only once and can run multiple tasks on the same connection and if your connection breaks, no problem you simply reconnect and re-attach your session.&lt;/p&gt; &lt;p&gt;To open a new window, you just use "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt;" "&lt;span style="font-weight: bold;"&gt;c&lt;/span&gt;"&lt;/p&gt;&lt;p&gt;run your task,  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;eg&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;mtr&lt;/span&gt; www.google.com&lt;/span&gt;&lt;br /&gt;&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;Now open a new window with "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt;" "&lt;span style="font-weight: bold;"&gt;c&lt;/span&gt;" again and start another task this time lets start top  type &lt;span style="font-weight: bold;"&gt;top&lt;/span&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dd&gt;&lt;br /&gt;&lt;/dd&gt;&lt;dt&gt;To get back to your previous screen (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;mtr&lt;/span&gt; www.google.com task), use "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt; "&lt;span style="font-weight: bold;"&gt;n&lt;/span&gt;"&lt;/dt&gt;&lt;/dl&gt; &lt;p&gt;You can create multiple  windows and toggle through them with "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt;" "&lt;span style="font-weight: bold;"&gt;n&lt;/span&gt;" for the next screen or "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt;" "&lt;span style="font-weight: bold;"&gt;p&lt;/span&gt;" for the previous one .&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you want to close your &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_20"&gt;session&lt;/span&gt; but want to return to it later then you must  detach from &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_21"&gt;your&lt;/span&gt; session instead of closing it. This will leave your  process running and will allow you to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_22"&gt;re-attach&lt;/span&gt; to the same process later.  "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt;" "&lt;span style="font-weight: bold;"&gt;d&lt;/span&gt;". This will drop you into your shell. All screen windows are still there and you can re-attach to them later.&lt;/p&gt;  &lt;p&gt;So you are using screen now and busy downloading a new program and suddenly your connection drops. Don't worry screen will keep the download  going. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;Login&lt;/span&gt; to your system and type&lt;/p&gt;&lt;p&gt; &lt;span style="font-weight: bold;"&gt;screen - R&lt;/span&gt; to re-attach to your session and then use &lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; - A&lt;/span&gt; "&lt;span style="font-weight: bold;"&gt;n&lt;/span&gt;" and "&lt;span style="font-weight: bold;"&gt;p&lt;/span&gt;" to toggle &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_26"&gt;between&lt;/span&gt; all the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_27"&gt;sessions&lt;/span&gt; you were running on the remote system before your connection was lost.&lt;/p&gt;&lt;p&gt;another useful feature of screen is its ability to  monitor a window for activity or for &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_28"&gt;silence.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;lets say you are downloading a file and you want to know when the download is finished,  you will need to monitor for silence on that screen. To do that type  "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt;" "&lt;span style="font-weight: bold;"&gt;_&lt;/span&gt;" . When your download is complete you will get an alert at the bottom with the window number. To quickly go to that window, use "&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A" "&lt;/span&gt; . After you do this, just type in the number of the window and enter. To stop monitoring, go to that window and undo the monitor with the same command. To monitor for activity type &lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;Ctrl&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;-A&lt;/span&gt; "&lt;span style="font-weight: bold;"&gt;M&lt;/span&gt;"   this will alert you when something new appears on the session that you wanted to monitor.&lt;/p&gt;&lt;p&gt;Screen can also be used to share a terminal session with another user. This is very useful if you need to show someone how to do something.&lt;/p&gt; The host starts screen in a local xterm, using the command &lt;b&gt;screen -S  SessionName&lt;/b&gt;. The &lt;b&gt;-S&lt;/b&gt; switch gives the session a name, which  makes multiple screen sessions easier to manage.&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Type:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; text-align: left; overflow: auto; font-weight: bold;"&gt;screen -S screendemo&lt;/pre&gt; &lt;/div&gt;The remote user (bwayne) uses SSH to connect to the host  computer (cgerada).&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Type:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; text-align: left; overflow: auto; font-weight: bold;"&gt;ssh bwayne@cgerada.computer.ip.address&lt;/pre&gt; &lt;/div&gt;The host (cgerada) then has to allow multiuser access in the  screen session via the command &lt;b&gt;CTRL-A :multiuser on&lt;/b&gt; .&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Type:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 50px; text-align: left; overflow: auto; font-weight: bold;"&gt;CTRL-A&lt;br /&gt;:multiuser on&lt;/pre&gt; &lt;/div&gt;Next, the host (cgerada) must grant permission to the remote  user (bwayne) to access the screen session using the command &lt;b&gt;CTRL-A  :acladd user_name&lt;/b&gt; where &lt;i&gt;user_name&lt;/i&gt; is the remote user's login  ID.&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Type:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 50px; text-align: left; overflow: auto; font-weight: bold;"&gt;CTRL-A&lt;br /&gt;:acladd bwayne&lt;/pre&gt; &lt;/div&gt;The remote user can now connect to the hosts 'screen' session.  The syntax to connect to another user's screen session is &lt;b&gt;screen -x  host_username/sessionname&lt;/b&gt;.&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Type:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; text-align: left; overflow: auto; font-weight: bold;"&gt;screen -x cgerada/screendemo&lt;/pre&gt; &lt;/div&gt;&lt;p&gt;Voila both users will now share the same terminal session.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2464038010163313418?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2464038010163313418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2464038010163313418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2464038010163313418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2464038010163313418'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/session-managment-with-screen.html' title='Session Managment with Screen'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-8011024552593239957</id><published>2008-07-25T18:39:00.011+02:00</published><updated>2008-07-31T22:10:11.870+02:00</updated><title type='text'>How to convert Multiple Images for emailing</title><content type='html'>&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Imagemagick&lt;/span&gt; is normally included with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;most linux&lt;/span&gt;  &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;distributions&lt;/span&gt;, but if it &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;isn't&lt;/span&gt; then you can install it by typing the following&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;apt-get install &lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;imagemagick&lt;/span&gt;  for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;debian&lt;/span&gt; based &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;distributions&lt;/span&gt;&lt;br /&gt;or &lt;span style="font-weight: bold;"&gt;yum install &lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;imagemagick&lt;/span&gt; for red hat &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;derivative&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;distributions&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;imagemagick is an awesome and  &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;extremely&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_11"&gt;powerful&lt;/span&gt; image manipulation tool.  For more detailed and other &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;uses of this great tool&lt;/span&gt; read the man pages ie. &lt;span style="font-weight: bold;"&gt; man convert&lt;/span&gt; or visit their website &lt;a href="http://www.imagemagick.org/"&gt;http://www.imagemagick.org.&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;I use &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;imagemagic&lt;/span&gt; to quickly &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;resize&lt;/span&gt; a large batch of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;jpg&lt;/span&gt; files so that they are a suitable size for emailing&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;cd&lt;/span&gt; into the directory that you have your images saved, the ones you want to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;resize&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then type the following&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;for k in $(ls *.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;jpg&lt;/span&gt;); do convert $k -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;resize&lt;/span&gt; 800x600 re_$k; done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;replace 800x600 with whatever size you want to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;resize&lt;/span&gt; your images to.  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;eg&lt;/span&gt; 640x480 or 320x200 etc  this command will go through your current directory and will convert all your .jpg files by creating new files, saving the new converted files to a new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;filename&lt;/span&gt; with re_ &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;infront&lt;/span&gt; of the existing file name.  The original files are left intact.&lt;br /&gt;&lt;br /&gt;you can also convert your pictures to different formats ie&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;convert image.jpg image.bmp&lt;/span&gt;&lt;br /&gt;or&lt;span style="font-weight: bold;"&gt; convert image.gif  image.tiff&lt;/span&gt;&lt;br /&gt;or &lt;span style="font-weight: bold;"&gt;convert image.png image.jpg&lt;/span&gt;&lt;br /&gt;will convert between the different formats&lt;br /&gt;&lt;br /&gt;you can also use it to convert to a pdf file or to convert a pdf file to a jpg&lt;br /&gt;eg &lt;span style="font-weight: bold;"&gt;convert file.jpg  file.pdf &lt;/span&gt;  or &lt;span style="font-weight: bold;"&gt;convert file.pdf  file.jpg&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-8011024552593239957?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/8011024552593239957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=8011024552593239957' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8011024552593239957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/8011024552593239957'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/how-to-convert-multiple-images-for.html' title='How to convert Multiple Images for emailing'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1343433837131211767</id><published>2008-07-23T09:06:00.006+02:00</published><updated>2008-08-07T22:22:16.796+02:00</updated><title type='text'>How to Mount an ISO or an MDF image</title><content type='html'>&lt;span style=";font-family:verdana;font-size:100%;"  &gt;The mount command can be used to mount any thing from a samba / &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;nfs&lt;/span&gt;  share to an ISO image.&lt;/span&gt; &lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;in windows you need such tools as Daemon tools , Alcohol 120 etc to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;accomplish&lt;/span&gt; the same. In Linux it's a lot simpler. ISO images can be mounted without any &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;additional&lt;/span&gt; tools.  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;MDF&lt;/span&gt; images can also be mounted but they first need to be converted to an ISO &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;file. To convert an MDF image to an ISO image use the &lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;mdf&lt;/span&gt;2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;iso&lt;/span&gt; tool which you can download from your distributions repository. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;eg&lt;/span&gt;  &lt;span style="font-weight: bold;"&gt;yum install &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;mdf&lt;/span&gt;2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;iso&lt;/span&gt;&lt;/span&gt; if you use a Red Hat &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;derivative&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;distro. O&lt;/span&gt;r &lt;span style="font-weight: bold;"&gt;apt-get install &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;mdf&lt;/span&gt;2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;iso&lt;/span&gt;&lt;/span&gt; if you use a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;debian&lt;/span&gt; one. Once you convert the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;MDF&lt;/span&gt; file to an ISO  you simply use the  mount command to mount the image.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-weight: bold;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;&lt;code class="cli"&gt;&lt;span style="font-family:verdana;"&gt;mount -t &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"  style="font-family:verdana;"&gt;iso&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;9660 -o loop&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;the loop option mounts the iso as a loopback device. This is neccassery when you are mounting a file of another file system in this case an iso file&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;code class="cli"&gt;&lt;span style="font-family:verdana;"&gt; &lt;/span&gt;&lt;image_file&gt; &lt;mount_directory&gt;&lt;/mount_directory&gt;&lt;/image_file&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="font-weight: bold;font-family:verdana;font-size:100%;"  &gt;&lt;span&gt;Example:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;code class="cli"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;mkdir&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;mnt&lt;/span&gt;/image&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;code class="cli"&gt;mount -t &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;iso&lt;/span&gt;9660 -o loop /home/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;cgerada&lt;/span&gt;/films/the_dark_Knight.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;iso&lt;/span&gt;  /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;mnt&lt;/span&gt;/image&lt;/code&gt;&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;The ‘-t’ option specifies the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_23"&gt;file type&lt;/span&gt; - this is optional, Linux is intelligent enough to see that the image you are mounting is of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;iso&lt;/span&gt;9660 file type so you could just as well type.&lt;/span&gt;&lt;/p&gt; &lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;mount -o loop /home/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;cgerada&lt;/span&gt;/films/the_dark_knight.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;iso&lt;/span&gt;   /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;mnt&lt;/span&gt;/image&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-weight: bold;font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: normal;"&gt;then &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;cd&lt;/span&gt; into the /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;mnt&lt;/span&gt;/image directory to use the files &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;ie&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;cd&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;mnt&lt;/span&gt;/image.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;To convert an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;MDF&lt;/span&gt; (alcohol 120) file to an ISO&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;mdf&lt;/span&gt;2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;iso&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;filename&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;mdf&lt;/span&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;newfilename&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;iso&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;and then mount the ISO  file.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-1343433837131211767?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1343433837131211767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1343433837131211767' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1343433837131211767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1343433837131211767'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/how-to-mount-iso-or-mdf-image.html' title='How to Mount an ISO or an MDF image'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-4049808962418353247</id><published>2008-07-19T20:58:00.004+02:00</published><updated>2008-07-19T21:12:59.607+02:00</updated><title type='text'>How to Upgrade your full distribution of  Ubuntu to the latest version</title><content type='html'>For your server that &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;doesn't&lt;/span&gt; have a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;gui&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;sudo&lt;/span&gt;&lt;/span&gt; -i&lt;/span&gt;&lt;br /&gt;enter your root password&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;apt-get install update-manager-core&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;do-release-upgrade&lt;br /&gt;&lt;/span&gt;this will do a complete update to the latest version of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Ubuntu&lt;/span&gt;&lt;/span&gt;, including updating of your sources list&lt;br /&gt;&lt;br /&gt;on a desktop installation were you have Gnome or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;KDE&lt;/span&gt;&lt;/span&gt; installed  press &lt;span style="font-weight: bold;"&gt;ALT -F2&lt;/span&gt; then type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;update-manager --&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;devel&lt;/span&gt;&lt;/span&gt;-release &lt;/span&gt; and then click on &lt;span style="font-weight: bold;"&gt;run&lt;br /&gt;&lt;/span&gt;this will also do a complete upgrade.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&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/696132948753636518-4049808962418353247?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/4049808962418353247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=4049808962418353247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4049808962418353247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/4049808962418353247'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/how-to-upgrade-your-full-distribution.html' title='How to Upgrade your full distribution of  Ubuntu to the latest version'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5194512971623259242</id><published>2008-07-18T08:46:00.006+02:00</published><updated>2008-07-18T09:22:03.821+02:00</updated><title type='text'>Look from 15 ft away</title><content type='html'>&lt;div  align="center" style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;When you look at this picture up close you see its Albert Einstein.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;  &lt;div  align="center" style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;But if you stand 15 feet away,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt; &lt;div align="center"&gt;&lt;span style="font-size:100%;"&gt;It will become &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;Marilyn Monroe.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_O1RbeaI0mtw/SIBD84nOFMI/AAAAAAAAAQM/_UBgBPFCis4/s1600-h/image001.jpg"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_O1RbeaI0mtw/SIBD84nOFMI/AAAAAAAAAQM/_UBgBPFCis4/s400/image001.jpg" alt="" id="BLOGGER_PHOTO_ID_5224250281017873602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;span style="font-size:100%;"&gt;Give it a try &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5194512971623259242?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5194512971623259242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5194512971623259242' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5194512971623259242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5194512971623259242'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/fwd-wow.html' title='Look from 15 ft away'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_O1RbeaI0mtw/SIBD84nOFMI/AAAAAAAAAQM/_UBgBPFCis4/s72-c/image001.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5794684194209637942</id><published>2008-07-09T18:29:00.007+02:00</published><updated>2008-07-10T16:07:46.402+02:00</updated><title type='text'>How to deny users access to certain sites at specific times</title><content type='html'>right,  now &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;you've&lt;/span&gt; got Squid up and running and its saving your company oodles of bandwidth as it serves cached websites to your users.  other great &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;features&lt;/span&gt; of squid is its use of Access lists (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ACL's&lt;/span&gt;). Here is a way that you can restrict your users access to specific sites during specific times, lets say for this example that you do not want your users to access &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;youtube&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;facebook&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;myspace&lt;/span&gt; between 8:30 am and 5:00pm but you &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;didn't&lt;/span&gt; mind if they &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;accessed&lt;/span&gt; those sites before 8:30am and after 5:00pm one way of accomplishing this is the following.&lt;br /&gt;create a file in your &lt;span style="font-weight: bold;"&gt;/etc/squid/&lt;/span&gt; directory called &lt;span style="font-weight: bold;"&gt;band_sites&lt;/span&gt;&lt;br /&gt;you can do this by typing&lt;span style="font-weight: bold;"&gt; vi&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;  /etc/squid/band_sites&lt;/span&gt;&lt;br /&gt;then in the empty file put a list of sites you want to ban your users from visiting&lt;br /&gt;like so&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;myspace&lt;/span&gt;.com&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;facebook&lt;/span&gt;.com&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;youtube&lt;/span&gt;.com&lt;br /&gt;&lt;br /&gt;save the file by typing &lt;span style="font-weight: bold;"&gt;:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;wq&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;change the ownership of the file so that the squid group can access the file&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;chown root.squid /etc/band_sites&lt;/span&gt;&lt;br /&gt;and then change the permissions to the file&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;chmod 640 /etc/band_sites&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;edit your squid configuration file and then add the following &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ACL's&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;vi  /etc/squid/squid.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;acl&lt;/span&gt; work_time time 8:30-17:30&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;acl&lt;/span&gt; band_sites &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;dstdom&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;regex&lt;/span&gt; -i "/etc/squid/band_sites"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;http_access  deny  band_sites&lt;/span&gt;   &lt;span style="font-weight: bold;"&gt;work_time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;save your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;config&lt;/span&gt; file&lt;br /&gt;and then reload squid by &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_19"&gt;typing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/squid reload&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5794684194209637942?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5794684194209637942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5794684194209637942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5794684194209637942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5794684194209637942'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/how-to-deny-users-access-to-certain.html' title='How to deny users access to certain sites at specific times'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-2055443420370137884</id><published>2008-07-09T11:52:00.007+02:00</published><updated>2008-07-25T21:17:39.241+02:00</updated><title type='text'>Squid Proxy quick and easy</title><content type='html'>the Squid &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;config&lt;/span&gt; file can be quite daunting as it has over 4000 lines.&lt;br /&gt;&lt;br /&gt;here's  how to get squid up and running quickly.&lt;br /&gt;&lt;br /&gt;Before activating squid you need to add three lines to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;config&lt;/span&gt; file.&lt;br /&gt;You need to add the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;hostname&lt;/span&gt; of your squid server. To do this add the following line to your&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/etc/squid/squid.&lt;/span&gt;&lt;span style="font-style: italic;" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;conf&lt;/span&gt; file , add it near the associated comment in the file.&lt;br /&gt;were hostname.domainname.com is the host name of your squid proxy server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;visible_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;hostname&lt;/span&gt; hostname.domainname.com&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next you need to add the following basic  access lists, so that your machines will be able to connect to squid.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;acl&lt;/span&gt; our_networks &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;src&lt;/span&gt; 192.168.0.0/24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;http_access allow our_networks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;were 192.168.0.0/24 is the address's of the machines that will be accessing your proxy server. You can add as many address ranges as you want. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;eg&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;acl&lt;/span&gt; our_networks 192.168.0.0/24  172.16.0.0/24    10.0.0.0/24&lt;/span&gt;&lt;br /&gt;etc etc.  save your changes and exit.&lt;br /&gt;Make sure that you allow port 3128 on your firewall, as that is the default port that squid uses. You can change this port to anything you want like 8080 by editing the default port stanza in &lt;span&gt;your&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; /etc/squid/squid.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;conf&lt;/span&gt; file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;type &lt;span style="font-weight: bold;"&gt;squid -z&lt;/span&gt;&lt;br /&gt;this will create the squid swap directories.&lt;br /&gt;&lt;br /&gt;Make sure that squid starts up on  start up by typing&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;chkconfig&lt;/span&gt; squid on&lt;/span&gt;  this will insure it starts on run levels 3 and 5&lt;br /&gt;&lt;br /&gt;and then start squid by typing&lt;span style="font-weight: bold;"&gt; /etc/init.d/squid start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Done, squid should be up and running and caching webpages for your users.&lt;br /&gt;&lt;br /&gt;Squid is a high &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_11"&gt;performance&lt;/span&gt; very flexible and powerful caching proxy server&lt;br /&gt;with many configurable options , for example,  you can set up&lt;br /&gt;password protected web browsing authentication for your users,&lt;br /&gt;so that you can monitor web &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;usage&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_13"&gt;associated&lt;/span&gt; to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;login&lt;/span&gt; name,  not only &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;IP&lt;/span&gt; address. This is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;useful&lt;/span&gt; in an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;environment&lt;/span&gt; were more than one user uses the same machine. You can also restrict access to websites at certain times of the day for certain users.A  comprehensive  user guide on squid  is available at &lt;a href="http://euler.aero.iitb.ac.in/docs/web/squid/html/book1.html"&gt;&lt;span style="font-weight: bold;"&gt;http://euler.aero.iitb.ac.in/docs/web/squid/html/book1.html&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-2055443420370137884?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/2055443420370137884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=2055443420370137884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2055443420370137884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/2055443420370137884'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/squid-proxy-quick-and-easy.html' title='Squid Proxy quick and easy'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-6777997402400913730</id><published>2008-07-08T19:39:00.014+02:00</published><updated>2008-07-23T14:50:30.025+02:00</updated><title type='text'>Apache , how to password protect your site</title><content type='html'>You can limit access to your websites to authorised users with passwords, these credentials can be different and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;independent&lt;/span&gt; of the regular users of your &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;web server&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;edit your &lt;span style="font-weight: bold;"&gt;/etc/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;httpd&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;conf&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;httpd&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;conf&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;file and add the following stanza&lt;br /&gt;were the first line is the path of the directory you want to protect&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;&gt;&lt;br /&gt;&lt;br /&gt;/var/www/html/website&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;AuthType&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; Basic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;AuthName&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; "any Text in here you want to be displayed"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;AuthUserFile&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; /etc/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;httpd&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;webpass&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Require valid-user&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt; /Directory &gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;once you have edited the file you will need to restart or reload the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;httpd&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;daemon&lt;/span&gt; do this by typing&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/etc/init.d/httpd reload&lt;/span&gt;&lt;br /&gt;next type the following&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;htpasswd&lt;/span&gt; -c /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;httpd&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;webpass&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;username&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;were &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;username&lt;/span&gt; is the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;username&lt;/span&gt; you want to allow access to the site&lt;br /&gt;you will be prompted for a password for the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;username&lt;/span&gt; you entered and the information will be saved into the /&lt;span style="font-weight: bold;"&gt;etc/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;httpd&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;/&lt;/span&gt;&lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;webpass&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;file in an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_22"&gt;encrypted&lt;/span&gt; format, so even if someone reads that file they will not be able to make out what the password is.&lt;br /&gt;If you want to add more authorised users to the file simply use the same command but without the &lt;span style="font-weight: bold;"&gt;-c &lt;/span&gt;option&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-c &lt;/span&gt;was to create the original file , since it has now been created you just want to add users so you &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_23"&gt;don't&lt;/span&gt; use the &lt;span style="font-weight: bold;"&gt;-c&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;eg&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;htpasswd&lt;/span&gt; /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;httpd&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;webpass&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;username&lt;/span&gt;2&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;when you access the site you will be prompted for a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_29"&gt;user name&lt;/span&gt; and password.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&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/696132948753636518-6777997402400913730?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/6777997402400913730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=6777997402400913730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6777997402400913730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/6777997402400913730'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/apache-how-to-password-protect-your.html' title='Apache , how to password protect your site'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-1431577150932526272</id><published>2008-07-07T11:38:00.013+02:00</published><updated>2008-08-02T14:39:24.849+02:00</updated><title type='text'>Logical Volumes LVM</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:verdana;"&gt;Logical Volumes are the greatest thing since sliced bread&lt;br /&gt;if your data is stored on a logical volume and you run out of disk space, you can simply add more hard drives to your system and then grow your logical volume onto the new physical hard drives giving your data the extra space it needs, logical volumes can also work on top of Raid &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;since&lt;/span&gt; logical volumes by them selves gives you no redundancy at all it is a good idea to have them setup &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;on top&lt;/span&gt; of a Raid array.&lt;br /&gt;&lt;br /&gt;To set up a logical volume  partitions must first be converted into physical volumes  using the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;pvcreate&lt;/span&gt;&lt;/span&gt; command. once you have added your new hard drives to the system, use &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;fdisk&lt;/span&gt;&lt;/span&gt; to tag the drives as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;LVM's&lt;/span&gt;&lt;/span&gt; the tag hex code for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;LVM&lt;/span&gt;&lt;/span&gt; is 8e once tagged you  can convert the drives to physical volumes  to convert /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;hda&lt;/span&gt;&lt;/span&gt; and /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;hdb&lt;/span&gt;&lt;/span&gt; into physical volumes type:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;pvcreate&lt;/span&gt;&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;hda&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;pvcreate&lt;/span&gt;&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;hdb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;NOTE : to setup a LVM on top of a linux software Raid array you simply convert your software raid device to a physical volume eg:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;pvcreate /dev/md0 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you have one or more physical volumes created, you can create a volume group from these &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;PVs&lt;/span&gt;&lt;/span&gt; using the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;vgcreate&lt;/span&gt;&lt;/span&gt; command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;vgcreate&lt;/span&gt;&lt;/span&gt;  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;vg&lt;/span&gt;&lt;/span&gt;1 /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;hda&lt;/span&gt;&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;hdb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this creates a  VG called &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;vg&lt;/span&gt;&lt;/span&gt;1  from the two disks, /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;hda&lt;/span&gt;&lt;/span&gt; and /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;hdb&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;more  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;PVs&lt;/span&gt;&lt;/span&gt; can be added to this volume group using the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;vgextend&lt;/span&gt;&lt;/span&gt; command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;pvcreate&lt;/span&gt;&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;hdc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;vgextend&lt;/span&gt;&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;vg&lt;/span&gt;&lt;/span&gt;1 /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;hdc&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this will add /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;hdc&lt;/span&gt;&lt;/span&gt; to the volume group "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;vg&lt;/span&gt;&lt;/span&gt;1"&lt;br /&gt;to remove the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;PV&lt;/span&gt;&lt;/span&gt;  from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;vg&lt;/span&gt;&lt;/span&gt;1 use the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;vgreduce&lt;/span&gt;&lt;/span&gt; command&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;vgreduce&lt;/span&gt;&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;vg&lt;/span&gt;&lt;/span&gt;1 /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;hdc&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;you can add as many disks to the volume as you like, think as the volume&lt;br /&gt;as your cache of storage.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Use &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_48"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;lvcreate&lt;/span&gt;&lt;/span&gt; command to create a  logical volume which will use the free capacity in the volume group pool. (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;ie&lt;/span&gt;&lt;/span&gt; your storage cache)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_48"&gt;lvcreate&lt;/span&gt;&lt;/span&gt; -n &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"&gt;lv&lt;/span&gt;&lt;/span&gt;1   -L 100G &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_52"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;vg&lt;/span&gt;&lt;/span&gt;1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or you can specify the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_51"&gt;capacity&lt;/span&gt;&lt;/span&gt; in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_52"&gt;PE's&lt;/span&gt;&lt;/span&gt; "physical extents" to find out how many &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53"&gt;PE's&lt;/span&gt;&lt;/span&gt; are available&lt;br /&gt;in your volume group type.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54"&gt;vgdisplay&lt;/span&gt;&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_57"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55"&gt;vg&lt;/span&gt;&lt;/span&gt;1 | grep "Total PE"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;which returns&lt;br /&gt;&lt;br /&gt;Total PE   34456&lt;br /&gt;&lt;br /&gt;Then use  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56"&gt;lvcreate&lt;/span&gt;&lt;/span&gt; to create a logical volume with 34456  extents&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_59"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_57"&gt;lvcreate&lt;/span&gt;&lt;/span&gt; -n lg1  -L 34456 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_60"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58"&gt;vg&lt;/span&gt;&lt;/span&gt;1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you can also allocate a logical volume from a specific physical &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_61"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_59"&gt;partition&lt;/span&gt;&lt;/span&gt; in the volume group by specifying the partition  at the end of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_62"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_60"&gt;lvcreate&lt;/span&gt;&lt;/span&gt; command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_63"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_61"&gt;lvcreate&lt;/span&gt;&lt;/span&gt;  -L100G -n lg1 /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_64"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_62"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_65"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_63"&gt;hda&lt;/span&gt;&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_66"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_64"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_67"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_65"&gt;hdb&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A logical volume can be removed from a Volume group using  &lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_68"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_66"&gt;lvremove&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;you must first &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_69"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_67"&gt;umount&lt;/span&gt;&lt;/span&gt; the logical volume.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_70"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_68"&gt;umount&lt;/span&gt;&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_71"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_69"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_72"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_70"&gt;vg&lt;/span&gt;&lt;/span&gt;1/lg1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_73"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_71"&gt;lvremove&lt;/span&gt;&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_74"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_72"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_75"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_73"&gt;vg&lt;/span&gt;&lt;/span&gt;1/lg1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;when you add more hard drives to your system and add them to the Volume group you can then extend the logical volume to make use of the added storage  by using the &lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_76"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_74"&gt;lvextend&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;command. You can specify either an absolute size for the extended &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_77"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_75"&gt;LV&lt;/span&gt;&lt;/span&gt; or how much additional storage you want to add to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_78"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_76"&gt;LV&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_79"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_77"&gt;lvextend&lt;/span&gt;&lt;/span&gt; -L120G /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_80"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_78"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_81"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_79"&gt;vg&lt;/span&gt;&lt;/span&gt;1/lg1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will extend the logical volume  to 120 GB, while&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_82"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_80"&gt;lvextend&lt;/span&gt;&lt;/span&gt; -L+20G /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_83"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_81"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_84"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_82"&gt;vg&lt;/span&gt;&lt;/span&gt;1/lg1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will extend the logical volume  by an additional 20 GB. Once a logical volume has been extended, the  file system must be expanded to use the added storage.&lt;br /&gt;to do this use the resize2fs command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_85"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_83"&gt;resize&lt;/span&gt;&lt;/span&gt;2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_84"&gt;fs&lt;/span&gt;  /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_86"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_85"&gt;dev&lt;/span&gt;&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_87"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_86"&gt;vg&lt;/span&gt;&lt;/span&gt;1/lg1&lt;br /&gt;&lt;/span&gt;&lt;span&gt;your done...&lt;br /&gt;&lt;br /&gt;other &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_87"&gt;usefull&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_88"&gt;commands&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_89"&gt;pvs&lt;/span&gt; &lt;/span&gt;will list all your &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_90"&gt;partitions&lt;/span&gt; that you have &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_91"&gt;assigned&lt;/span&gt; to a volume group&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_92"&gt;lvs&lt;/span&gt; &lt;/span&gt;will list all of your configured  logical Volumes&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;vgs&lt;/span&gt; will show you how much available or free space you have available in your volume group&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_93"&gt;lvscan&lt;/span&gt; &lt;/span&gt;will scan for active logical volumes&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_94"&gt;vgdisplay&lt;/span&gt;&lt;/span&gt; will display the information of your volume group&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_95"&gt;lvdisplay&lt;/span&gt;&lt;/span&gt; will display currently configured logical volumes&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&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/696132948753636518-1431577150932526272?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/1431577150932526272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=1431577150932526272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1431577150932526272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/1431577150932526272'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/logical-volumes-lvm.html' title='Logical Volumes LVM'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-621614801242212498</id><published>2008-07-05T20:44:00.006+02:00</published><updated>2011-11-25T15:59:42.404+02:00</updated><title type='text'>Software raid on Linux</title><content type='html'>to create a software raid in Linux we use the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;mdadm&lt;/span&gt; command&lt;br /&gt;first you will need the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;partitions&lt;/span&gt; available to you for the raid, using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;fdisk&lt;/span&gt; you must tag the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;partitions&lt;/span&gt; with the "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;linux&lt;/span&gt; raid &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;autodetect&lt;/span&gt; " tag  using the hex code id of  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;fd&lt;/span&gt;  to do this just type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;fdisk&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;hda&lt;/span&gt; &lt;/span&gt; (you use the name of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;partion&lt;/span&gt; you want to tag then type &lt;span style="font-weight: bold;"&gt;t &lt;/span&gt;and then type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;fd&lt;/span&gt; &lt;/span&gt; type &lt;span style="font-weight: bold;"&gt;w&lt;/span&gt; to save and then type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;partprobe&lt;/span&gt;&lt;/span&gt; to probe the changes into your kernel&lt;br /&gt;&lt;br /&gt;next you need to create your raid &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;partition&lt;/span&gt; , lets create a raid 1 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;partition&lt;/span&gt; which is a mirrored set and it uses 2 disks, but we are going to add a 3rd disk and use it as a spare, so if one of the 2 disks in the mirror break the spare will automatically replace it in the raid configuration and rebuild itself.&lt;br /&gt;&lt;br /&gt;so we have 3 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;partitions&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;taged&lt;/span&gt; with the "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;linux&lt;/span&gt; raid &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;autodetect&lt;/span&gt;" tag  id &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;fd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to create a raid 1 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;partition&lt;/span&gt; we type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;mdadm&lt;/span&gt; -C /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;md&lt;/span&gt;0 -l 1 -n 2 -x 3 -a yes /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;hd&lt;/span&gt;{3..5}&lt;/span&gt;&lt;br /&gt;-C = create&lt;br /&gt;-l 1 = raid level 1&lt;br /&gt;-n 2 = how many disks we will be using&lt;br /&gt;-x 1= x stands for spare (how many spare disks we will be using&lt;br /&gt;-a yes = instructs &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;udev&lt;/span&gt; to create the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;md&lt;/span&gt; device file if it does not already exist&lt;br /&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;hd&lt;/span&gt;{3..5}  are the disks you want to use in the raid you could type them &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_30"&gt;separately&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;ie&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;hd&lt;/span&gt;3 /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;hd&lt;/span&gt;4 /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;hd&lt;/span&gt;5  if you want but /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;hd&lt;/span&gt;{3..5} is shorter to type and is the exact same thing.&lt;br /&gt;&lt;br /&gt;once done you need to format your raid &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;partition&lt;/span&gt;.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;mkfs&lt;/span&gt;.ext3 /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;md&lt;/span&gt;0&lt;/span&gt;&lt;br /&gt;next create a directory were you want to mount your raid &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;partition&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;mkdir&lt;/span&gt; /media/raid1&lt;/span&gt;&lt;br /&gt;lets give the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;partition&lt;/span&gt; a label we will use the label name in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;fstab&lt;/span&gt; file this is not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_48"&gt;necessary&lt;/span&gt; however it is good practice to label your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"&gt;partitions&lt;/span&gt; so that if they ever change their /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;dev&lt;/span&gt; position the label will remain the same and they will still mount.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;e2label  /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_52"&gt;md&lt;/span&gt;0 raid1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then we can mount it in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53"&gt;fstab&lt;/span&gt; using its label name  ... in your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54"&gt;fstab&lt;/span&gt; file add the following line&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LABEL=raid1            /media/raid5            ext3    defaults        1 2&lt;/span&gt;&lt;br /&gt;save your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55"&gt;fstab&lt;/span&gt; file and type &lt;span style="font-weight: bold;"&gt;mount-a &lt;/span&gt; to have your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56"&gt;fstab&lt;/span&gt; file read and loaded by the system&lt;br /&gt;to monitor our raid &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_57"&gt;partition&lt;/span&gt; we can type &lt;span style="font-weight: bold;"&gt;cat /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58"&gt;proc&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_59"&gt;mdstat&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;or &lt;span style="font-weight: bold;"&gt;watch -n1 cat /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_60"&gt;proc&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_61"&gt;mdstat&lt;/span&gt; &lt;/span&gt;  this will update the monitoring process every second&lt;br /&gt;&lt;br /&gt;you can even simulate a drive failure to test if your raid works,&lt;br /&gt;type &lt;span style="font-weight: bold;"&gt;watch -n1 cat /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_62"&gt;proc&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_63"&gt;mdstat&lt;/span&gt;&lt;/span&gt; in a terminal window and set that window to always be on top , then open another window to fail your drive in and you can watch your raid rebuild itself in the monitoring window.&lt;br /&gt;in the other window type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_64"&gt;mdadm&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_65"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_66"&gt;md&lt;/span&gt;0 -f /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_67"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_68"&gt;hd&lt;/span&gt;3 &lt;/span&gt;   (this will fail drive /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_69"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_70"&gt;hd&lt;/span&gt;3  in your raid)&lt;br /&gt;(watch what happens in your monitoring window)  you can then remove the failed drive from the raid set by typing &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_71"&gt;mdadm&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_72"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_73"&gt;md&lt;/span&gt;0  -r /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_74"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_75"&gt;hd&lt;/span&gt;3&lt;/span&gt;&lt;br /&gt;and to put a new drive back into you raid set type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_76"&gt;mdadm&lt;/span&gt; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_77"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_78"&gt;md&lt;/span&gt;0 -a /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_79"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_80"&gt;hd&lt;/span&gt;3&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-621614801242212498?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/621614801242212498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=621614801242212498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/621614801242212498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/621614801242212498'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/07/software-raid-on-linux.html' title='Software raid on Linux'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-18246158242847823</id><published>2008-06-27T16:25:00.006+02:00</published><updated>2008-08-11T18:04:27.190+02:00</updated><title type='text'>Setting up and Managing Disk Quota's</title><content type='html'>Disk quota's are very important as they prevent your users from filling up your hard drive, to set-up disk quota's on your /home directory, insure that your /home directory is configured as a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;separate&lt;/span&gt; partition, if it is not then you will need to set up your quota's on your root &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;partition&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ie&lt;/span&gt; /&lt;br /&gt;edit your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;fstab&lt;/span&gt; file and edit the line for your /home or your / partition and add the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;usrquota&lt;/span&gt; option like so&lt;br /&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;hda&lt;/span&gt;/            /home                   ext3    defaults,&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;usrquota&lt;/span&gt; &lt;/span&gt;      1 2&lt;br /&gt;&lt;br /&gt;save your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;fstab&lt;/span&gt; file and then type&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mount -a &lt;/span&gt;&lt;br /&gt;so that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;fstab&lt;/span&gt; files changes are read by the kernel&lt;br /&gt;&lt;br /&gt;next&lt;br /&gt;&lt;br /&gt;type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;quotacheck&lt;/span&gt; -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;cugm&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;this will scan the quota &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;file system&lt;/span&gt; and is &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;necessary&lt;/span&gt; to run first before you can add quota's&lt;br /&gt;c = create files&lt;br /&gt;u = scan user quota's&lt;br /&gt;g= scan group quota's&lt;br /&gt;m= no remount&lt;br /&gt;then to add a quota type the following substitute "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;username&lt;/span&gt;" for the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;username&lt;/span&gt; you want to add the quota for&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;edquota&lt;/span&gt; -u &lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;username&lt;/span&gt;&lt;/span&gt; /home&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;vi will then open the quota file for that user that looks &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;like&lt;/span&gt; this&lt;br /&gt;&lt;br /&gt;Disk quotas for user &lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;username&lt;/span&gt;&lt;/span&gt; (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;uid&lt;/span&gt; 500):&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;Filesystem&lt;/span&gt;   blocks           soft             hard            &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;inodes&lt;/span&gt;           soft            hard&lt;br /&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;hda&lt;/span&gt;          707896               0                0               13              0               0&lt;br /&gt;&lt;br /&gt;simply edit the file to the settings you want. A soft limit is your warning limit and a hard limit is your never exceed limit. blocks are storage size 1000 blocks is equal to roughly 1MB and you can restrict the user to number of  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;inodes&lt;/span&gt; each file uses 1 inode. large amounts of small or empty Files can also fill up a file system , since an empty file still requires an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;inode&lt;/span&gt; so if you set a hard limit on the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;inodes&lt;/span&gt; of say 1000 that means the user will only be able to save a maximum of 1000 files in their home folder even if the files are of 0kb in size.&lt;br /&gt;to limit a user to say 1GB of storage set the hard limit of the blocks  to 1000 000  as 1000 blocks is equal to roughly 1MB , so  to limit &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_28"&gt;them&lt;/span&gt; to 100MB set the hard limit to 100 000 blocks&lt;br /&gt;save the file by typing &lt;span style="font-weight: bold;"&gt;:wq&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to see what quota's have been set and to see the usage by users on all &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_29"&gt;file systems&lt;/span&gt;,  type &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;repquota&lt;/span&gt; -a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;a&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: verdana;"&gt; user can also see their own quota &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: verdana;font-size:100%;" class="blsp-spelling-corrected" id="SPELLING_ERROR_31" &gt;statistics&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: verdana;"&gt; by typing &lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:100%;" &gt;quota&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;or root can type &lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:100%;" &gt;quota -u &lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;username&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;You can also use the &lt;span style="font-weight: bold;"&gt;setquota&lt;/span&gt; command, to set a users quota (instead of edquota)which has the advantage of not using an editor making it ideal for implementing in a script.  For example, to  set the soft block limit to 100, a hard block limit of 200, a soft inode to 10 and a hard inode to 15 , execute the following command.&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;setquota -u &lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;username&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;100 200 10 15 -a /home&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: verdana;"&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-18246158242847823?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/18246158242847823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=18246158242847823' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/18246158242847823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/18246158242847823'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/06/setting-up-and-managing-disk-quotas.html' title='Setting up and Managing Disk Quota&apos;s'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5227871192698642797</id><published>2008-06-16T19:58:00.008+02:00</published><updated>2008-07-23T15:44:33.273+02:00</updated><title type='text'>How to  further Secure your Server for SSH</title><content type='html'>&lt;span style="font-weight: bold;"&gt;server1.hq.org&lt;/span&gt;&lt;br /&gt;is the name of your server that is available on the Public &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;Internet&lt;/span&gt; to you from your local machine using SSH&lt;br /&gt;although SSH &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;in itself&lt;/span&gt; is a secure protocol to use as it &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;encrypts&lt;/span&gt; the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;user names&lt;/span&gt; and passwords, to further protect your server from brute force attacks as well as to insure that even if a hacker decrypts the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;user name&lt;/span&gt; and password of your connection he will still not be able to take over your machine with admin &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;privileges&lt;/span&gt; follow these steps.&lt;br /&gt;&lt;br /&gt;since port scanning is so easy to do, i do not &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;recommend&lt;/span&gt; bothering changing your default ssh port to another port, it will take a hacker all of 1 millisecond to find out what port you have changed to.&lt;br /&gt;&lt;br /&gt;create a Private / Public Key pair  on the computer that you use that you want to connect from&lt;br /&gt;to do this type &lt;span style="font-weight: bold;"&gt;ssh-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;keygen&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;you will get the following response&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Generating public/private &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;rsa&lt;/span&gt; key pair.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Enter file in which to save the key (/root/.ssh/id_rsa):&lt;/span&gt;&lt;br /&gt;hit enter to have your &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;keys saved&lt;/span&gt; in &lt;span style="font-style: italic;"&gt;/root/.ssh/&lt;/span&gt; directory (this directory will be off the home &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;directory&lt;/span&gt; of the user that you were when you ran the ssh-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;keygen&lt;/span&gt; command in my case i was the root user&lt;br /&gt;next you will be asked if you want to create a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;pass phrase&lt;/span&gt; for the key&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Enter &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;passphrase&lt;/span&gt; (empty for no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;passphrase&lt;/span&gt;):&lt;/span&gt;&lt;br /&gt;here you can enter a password , &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_15"&gt;remember&lt;/span&gt; this password is for the key (should your local computer be compromised and someone steals your private key, they will still need to know what the password is)&lt;br /&gt;or you can leave the password out, it is useful to leave the password out if you are using this technique to automate an ssh connection for the purpose of file transfer using a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;cron&lt;/span&gt; job ill explain how to do that in another posting)&lt;br /&gt;once the key is created you need to transfer the public key to your &lt;span style="font-weight: bold;"&gt;server1.hq.org  &lt;/span&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;which&lt;/span&gt; after all is the server you want to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;secure. To&lt;/span&gt; do that enter the following&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ssh-copy-id -i root/.ssh/id_rsa.pub username@server1.hq.org&lt;/span&gt;&lt;br /&gt;were root/.ssh/ is the folder were your keys were saved to.&lt;br /&gt;the ssh-copy-id command will transfer the public key to your server and save it into the correct folder,&lt;br /&gt;you could manually use &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;scp&lt;/span&gt; to copy the key &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_20"&gt;accross&lt;/span&gt; but ssh-copy-id does it all for you and puts the key were it should be.&lt;br /&gt;&lt;br /&gt;now you will be able to connect to your server without logging in,  once connected to your server you need to edit your &lt;span style="font-weight: bold;"&gt;/etc/ssh/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;sshd&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;config&lt;/span&gt; &lt;/span&gt;file use your favourite editor to edit this file and add the stanza  &lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;PermitRootLogin&lt;/span&gt; no&lt;br /&gt;&lt;/span&gt;save your file, and then reload the sshd service by typing &lt;span style="font-weight: bold;"&gt;/etc/init.d/sshd reload&lt;/span&gt; this will load in the new settings from now on you have to connect to your server over ssh using a standard user account, once you are on the server you can &lt;span style="font-weight: bold;" class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;sudo&lt;/span&gt; to the root user to perform admin tasks, the reason why we do this is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_25"&gt;in case&lt;/span&gt; a hacker decrypts the secure ssh password he will still only have access to a non &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_26"&gt;privileged&lt;/span&gt; user account which is better than if they &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;wer&lt;/span&gt;e to compromise your server with your admin password.&lt;span style="font-weight: bold;"&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/696132948753636518-5227871192698642797?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5227871192698642797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5227871192698642797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5227871192698642797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5227871192698642797'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/06/how-to-further-secure-your-server-for.html' title='How to  further Secure your Server for SSH'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5972349526449670915</id><published>2008-06-16T18:47:00.006+02:00</published><updated>2008-07-25T19:19:54.018+02:00</updated><title type='text'>Forwarding Ports over SSH</title><content type='html'>lets say that the only access you have to a remote network is through SSH but you have an application that needs to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;securely&lt;/span&gt; access port 5901 on the remote network, (however this port is blocked to the outside world)  SSH to the rescue.  You can create a tunnel over SSH and then run your application and it will connect to the desired port by first being tunneled over your ssh connection&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ssh -L 5901:remote-server:5901 user@ssh-remote-server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;once the connection has been made over ssh and you have authenticated with your ssh password,&lt;br /&gt;simply &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;fire up&lt;/span&gt; your application that requires the remote port and point it to your localhost port 5901 and it will be tunneled over the ssh connection. in this example we tunneled vnc over ssh to make the connection&lt;br /&gt;simply type &lt;span style="font-style: italic; font-weight: bold;"&gt;vncviewer localhost:1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;the remote server will think that the connection has been initiated  from the local server on its network (the ssh server)&lt;br /&gt;&lt;br /&gt;another example lets say you want to browse a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;web server&lt;/span&gt; on a remote machine through your local port 8080&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ssh -L 8080:remote-server:80 user@ssh-remote-server&lt;/span&gt;&lt;br /&gt;once  you have authenticated on ssh,  open up your browser and type &lt;span style="font-weight: bold;"&gt;http://localhost:8080&lt;/span&gt; in your address bar, you will access the web-page of the remote server:80&lt;br /&gt;&lt;br /&gt;the added advantage of doing this is that your tunnel is encrypted and traffic travelling between your local and remote machines is secure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5972349526449670915?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5972349526449670915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5972349526449670915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5972349526449670915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5972349526449670915'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/06/forwarding-ports-over-ssh.html' title='Forwarding Ports over SSH'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-696132948753636518.post-5278945107782099001</id><published>2008-06-16T09:06:00.004+02:00</published><updated>2008-08-21T22:02:50.457+02:00</updated><title type='text'>Access Control Lists (ACL's)</title><content type='html'>by Default only root user can &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;assign&lt;/span&gt; permissions on Directories and Folders.&lt;br /&gt;however if a standard user wants to allow access to a folder to one of his &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;colleagues&lt;/span&gt;&lt;br /&gt;you must use &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ACL&lt;/span&gt; Access control list&lt;br /&gt;&lt;br /&gt;first off &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;acl&lt;/span&gt; needs to be instated on the mounted &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;file system&lt;/span&gt; that you want to allow users to manage their own permissions on, to do this edit your /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;fstab&lt;/span&gt; file and make sure that that you add the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;acl&lt;/span&gt; option to the mount so that it looks something like this&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;dev&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;hda&lt;/span&gt;   /home     ext3         defaults,&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;acl&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;  1 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;save your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;fstab&lt;/span&gt; file and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_11"&gt;force&lt;/span&gt; the Kernel to re-read its contents by typing&lt;br /&gt;&lt;span style="font-style: italic;"&gt;mount -a &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this will read in the contents of your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;fstab&lt;/span&gt; file and remount all the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_13"&gt;file systems&lt;/span&gt; with the the new settings.&lt;br /&gt;&lt;br /&gt;then for a standard user to give access to a certain folder they must use the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;setfacl&lt;/span&gt; command&lt;br /&gt;so to give user2 read write &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_15"&gt;access&lt;/span&gt; to /home/user1/projects folder   user 1 would type&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;setfacl&lt;/span&gt; -m u:user2:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;rw&lt;/span&gt; /home/user1/projects&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;the &lt;span style="font-style: italic;"&gt;m&lt;/span&gt; stands for modify.  to remove &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;permissions&lt;/span&gt; you would replace the m with an x and then simply state the folder &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;you&lt;/span&gt; wanted permissions removed from&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;eg&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;setfacl&lt;/span&gt; -x /home/user1/projects&lt;/span&gt;&lt;br /&gt;you could set permissions to individual files as well not only directories&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;eg&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;setfacl&lt;/span&gt; -m u:user2:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;rw&lt;/span&gt; /home/user1/projects/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;filename&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;you can set permissions using rwx notation as well for example&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;To deny a user acces to a file type the following&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;setfacl -m u:user2:---/home/user1/projects/filename&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;to give him read access only you can type the following&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;setfacl -m u:user2:r--/home/user/projects/filename&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;if you want to see what permissions exist on a certain folder&lt;br /&gt;type &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;getfacl&lt;/span&gt; /home/user1/projects&lt;br /&gt;&lt;br /&gt;you should get a response similar to the following were you can see the added permissions for user 2&lt;br /&gt;# file: home/user1/project&lt;br /&gt;# owner: user1&lt;br /&gt;# group: user1&lt;br /&gt;user::&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;rwx&lt;/span&gt;&lt;br /&gt;user:user2:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;rw&lt;/span&gt;-&lt;br /&gt;group::r-x&lt;br /&gt;mask::&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;rwx&lt;/span&gt;&lt;br /&gt;other::r-x&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/696132948753636518-5278945107782099001?l=cgerada.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cgerada.blogspot.com/feeds/5278945107782099001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=696132948753636518&amp;postID=5278945107782099001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5278945107782099001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/696132948753636518/posts/default/5278945107782099001'/><link rel='alternate' type='text/html' href='http://cgerada.blogspot.com/2008/06/access-control-lists-acls.html' title='Access Control Lists (ACL&apos;s)'/><author><name>CG</name><uri>http://www.blogger.com/profile/01371885220903563314</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://4.bp.blogspot.com/_O1RbeaI0mtw/ShLBcKNbFKI/AAAAAAAAAac/byiwhYLs438/S220/ninja_tux.jpg'/></author><thr:total>0</thr:total></entry></feed>
