<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WEB-NES-BAY &#187; Sleep</title>
	<atom:link href="http://webnesbay.com/tag/sleep/feed/" rel="self" type="application/rss+xml" />
	<link>http://webnesbay.com</link>
	<description>Learn Tips and tricks on Linux, Hacking, linux, PHP, Perl, Web, Hardware</description>
	<lastBuildDate>Sun, 11 Apr 2010 05:12:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Shell Script to Disable CTRL C / CTRL Z</title>
		<link>http://webnesbay.com/shell-script-disable-ctrl-c-ctrl-z/</link>
		<comments>http://webnesbay.com/shell-script-disable-ctrl-c-ctrl-z/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 07:46:02 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ctrl C]]></category>
		<category><![CDATA[Ctrl Z]]></category>
		<category><![CDATA[disable control keys]]></category>
		<category><![CDATA[Echo Test]]></category>
		<category><![CDATA[shel script]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Sigalrm]]></category>
		<category><![CDATA[Sigkill]]></category>
		<category><![CDATA[Signals]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[Sleep Sleep]]></category>
		<category><![CDATA[Test Loop]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=533</guid>
		<description><![CDATA[Most of the times it is useful for you to disable ctrl +c and ctrl+z wherein copy and undo. This is the simple script that allows you disable ctrl c and ctrl z
#!/bin/bash
# at start add
trap &#8220;&#8221; 2 20
# your script
echo &#8221; Test&#8221;
# loop for sleep
sleep 5
trap -l command list all signals
20 is for CTRL + Z
2 is for CTRL  + C
Here is full list created by trap -l command:
1) SIGHUP     2) SIGINT     3) SIGQUIT     4) SIGILL
5) SIGTRAP     6) SIGABRT     [...]


Related posts:<ol><li><a href='http://webnesbay.com/download-youtube-videos-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: Download youtube videos in ubuntu linux'>Download youtube videos in ubuntu linux</a></li>
<li><a href='http://webnesbay.com/perl-script-for-search-replace-in-several-files/' rel='bookmark' title='Permanent Link: Perl script for search &#038; replace in several files'>Perl script for search &#038; replace in several files</a></li>
<li><a href='http://webnesbay.com/search-replace-in-several-files-in-perl-script/' rel='bookmark' title='Permanent Link: search &#038; replace in several files in perl script'>search &#038; replace in several files in perl script</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Most of the times it is useful for you to disable ctrl +c and ctrl+z wherein copy and undo. This is the simple script that allows you disable ctrl c and ctrl z</p>
<p>#!/bin/bash<br />
# at start add<br />
trap &#8220;&#8221; 2 20</p>
<p># your script<br />
echo &#8221; Test&#8221;</p>
<p># loop for sleep<br />
sleep 5</p>
<p>trap -l command list all signals</p>
<p>20 is for CTRL + Z<br />
2 is for CTRL  + C</p>
<p><!-- END TEMPLATE: bbcode_code -->Here is full list created by trap -l command:</p>
<p>1) SIGHUP     2) SIGINT     3) SIGQUIT     4) SIGILL<br />
5) SIGTRAP     6) SIGABRT     7) SIGBUS     <img src='http://webnesbay.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> SIGFPE<br />
9) SIGKILL    10) SIGUSR1    11) SIGSEGV    12) SIGUSR2<br />
13) SIGPIPE    14) SIGALRM    15) SIGTERM    16) SIGSTKFLT<br />
17) SIGCHLD    18) SIGCONT    19) SIGSTOP    20) SIGTSTP<br />
21) SIGTTIN    22) SIGTTOU    23) SIGURG    24) SIGXCPU<br />
25) SIGXFSZ    26) SIGVTALRM    27) SIGPROF    28) SIGWINCH<br />
29) SIGIO    30) SIGPWR    31) SIGSYS    34) SIGRTMIN<br />
35) SIGRTMIN+1    36) SIGRTMIN+2    37) SIGRTMIN+3    38) SIGRTMIN+4<br />
39) SIGRTMIN+5    40) SIGRTMIN+6    41) SIGRTMIN+7    42) SIGRTMIN+8<br />
43) SIGRTMIN+9    44) SIGRTMIN+10    45) SIGRTMIN+11    46) SIGRTMIN+12<br />
47) SIGRTMIN+13    48) SIGRTMIN+14    49) SIGRTMIN+15    50) SIGRTMAX-14<br />
51) SIGRTMAX-13    52) SIGRTMAX-12    53) SIGRTMAX-11    54) SIGRTMAX-10<br />
55) SIGRTMAX-9    56) SIGRTMAX-8    57) SIGRTMAX-7    58) SIGRTMAX-6<br />
59) SIGRTMAX-5    60) SIGRTMAX-4    61) SIGRTMAX-3    62) SIGRTMAX-2<br />
63) SIGRTMAX-1    64) SIGRTMAX</p>


<p>Related posts:<ol><li><a href='http://webnesbay.com/download-youtube-videos-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: Download youtube videos in ubuntu linux'>Download youtube videos in ubuntu linux</a></li>
<li><a href='http://webnesbay.com/perl-script-for-search-replace-in-several-files/' rel='bookmark' title='Permanent Link: Perl script for search &#038; replace in several files'>Perl script for search &#038; replace in several files</a></li>
<li><a href='http://webnesbay.com/search-replace-in-several-files-in-perl-script/' rel='bookmark' title='Permanent Link: search &#038; replace in several files in perl script'>search &#038; replace in several files in perl script</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/shell-script-disable-ctrl-c-ctrl-z/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get SSH back door in linux</title>
		<link>http://webnesbay.com/get-ssh-back-door-in-linux/</link>
		<comments>http://webnesbay.com/get-ssh-back-door-in-linux/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 09:48:33 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Back Door]]></category>
		<category><![CDATA[Blackbox]]></category>
		<category><![CDATA[Company Firewall]]></category>
		<category><![CDATA[Forgiveness]]></category>
		<category><![CDATA[Ginger]]></category>
		<category><![CDATA[Judgment]]></category>
		<category><![CDATA[Localhost]]></category>
		<category><![CDATA[Port 22]]></category>
		<category><![CDATA[Root User]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[Ssh Linux]]></category>
		<category><![CDATA[Ssh Tunnel]]></category>
		<category><![CDATA[Syntax]]></category>
		<category><![CDATA[Technical Support]]></category>
		<category><![CDATA[Traffic]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=20</guid>
		<description><![CDATA[Many times I&#8217;ll be at a site where I need remote support from someone who                 is blocked on the outside by a company firewall. Few people realize that                 if you can get out to the world through a firewall, then it is relatively      [...]


Related posts:<ol><li><a href='http://webnesbay.com/hello-world/' rel='bookmark' title='Permanent Link: Checking your bandwidth'>Checking your bandwidth</a></li>
<li><a href='http://webnesbay.com/how-to-block-websites-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: How to block websites in Ubuntu Linux'>How to block websites in Ubuntu Linux</a></li>
<li><a href='http://webnesbay.com/hack-windows-admin-password-using-ubuntu-linux/' rel='bookmark' title='Permanent Link: Hack Windows Admin Password using Ubuntu Linux'>Hack Windows Admin Password using Ubuntu Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Many times I&#8217;ll be at a site where I need remote support from someone who                 is blocked on the outside by a company firewall. Few people realize that                 if you can get out to the world through a firewall, then it is relatively                 easy to open a hole so that the world can come into you.</p>
<p>In its crudest form, this is called &#8220;poking a hole in the firewall.&#8221; I&#8217;ll                 call it an <em>SSH back door</em>. To use it, you&#8217;ll need a machine on the                 Internet that you can use as an intermediary.</p>
<p>In our example, we&#8217;ll call our machine blackbox.example.com. The machine                 behind the company firewall is called ginger. Finally, the machine that                 technical support is on will be called tech. Figure 4 explains how this is                 set up.</p>
<div id="attachment_21" class="wp-caption aligncenter" style="width: 520px"><img class="size-full wp-image-21" title="figure4" src="http://webnesbay.com/wp-content/uploads/2009/06/figure4.gif" alt="SSH Back Door" width="510" height="278" /><p class="wp-caption-text">SSH Back Door</p></div>
<p>Here&#8217;s how to proceed:</p>
<ol>
<li>Check that what you&#8217;re doing is allowed, but make sure you ask the                     right people. Most people will cringe that you&#8217;re opening the                     firewall, but what they don&#8217;t understand is that it is completely                     encrypted. Furthermore, someone would need to hack your outside                     machine before getting into your company. Instead, you may belong to                     the school of &#8220;ask-for-forgiveness-instead-of-permission.&#8221; Either way,                     use your judgment and don&#8217;t blame me if this doesn&#8217;t go your way.</li>
<li>SSH from ginger to blackbox.example.com with the                     <code>-R</code> flag. I&#8217;ll assume that you&#8217;re the root user                     on ginger and that tech will need the root user ID to help you with                     the system. With the <code>-R</code> flag, you&#8217;ll forward                     instructions of port 2222 on blackbox to port 22 on ginger. This is                     how you set up an SSH tunnel. Note that only SSH traffic can come into                     ginger: You&#8217;re not putting ginger out on the Internet naked.You can                     do this with the following syntax:
<p><code> <span>~# ssh -R 2222:localhost:22 thedude@blackbox.example.com</span> </code></p>
<p>Once you are into blackbox, you just need to stay logged                     in. I usually enter a command like:</p>
<p><code> <span>thedude@blackbox:~$ while [ 1 ]; do date; sleep 300; done</span> </code></p>
<p>to keep the machine busy. And minimize the window.</li>
<li>Now instruct your friends at tech to SSH as thedude into blackbox                     without using any special SSH flags. You&#8217;ll have to give them your                     password:<code> <span>root@tech:~# ssh thedude@blackbox.example.com</span> </code>.</li>
<li>Once tech is on the blackbox, they can SSH to ginger using the                     following command:<code> <span>thedude@blackbox:~$: ssh -p 2222 root@localhost</span> </code></li>
<li>Tech will then be prompted for a password. They should enter the root                     password of ginger.</li>
<li>Now you and support from tech can work together and solve the problem.                     You may even want to use screen together! (See                     <a href="http://www.ibm.com/developerworks/linux/library/l-10sysadtips/#T4">Trick 4</a>.)</li>
</ol>


<p>Related posts:<ol><li><a href='http://webnesbay.com/hello-world/' rel='bookmark' title='Permanent Link: Checking your bandwidth'>Checking your bandwidth</a></li>
<li><a href='http://webnesbay.com/how-to-block-websites-in-ubuntu-linux/' rel='bookmark' title='Permanent Link: How to block websites in Ubuntu Linux'>How to block websites in Ubuntu Linux</a></li>
<li><a href='http://webnesbay.com/hack-windows-admin-password-using-ubuntu-linux/' rel='bookmark' title='Permanent Link: Hack Windows Admin Password using Ubuntu Linux'>Hack Windows Admin Password using Ubuntu Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/get-ssh-back-door-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unmounting the unresponsive DVD drive</title>
		<link>http://webnesbay.com/unmounting-the-unresponsive-dvd-drive/</link>
		<comments>http://webnesbay.com/unmounting-the-unresponsive-dvd-drive/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 09:44:51 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Boom]]></category>
		<category><![CDATA[Bounce]]></category>
		<category><![CDATA[Cd Media]]></category>
		<category><![CDATA[Cd Rom]]></category>
		<category><![CDATA[DVD]]></category>
		<category><![CDATA[Dvd Cd]]></category>
		<category><![CDATA[Dvd Cdrom]]></category>
		<category><![CDATA[Dvd Drive]]></category>
		<category><![CDATA[Dvd Media]]></category>
		<category><![CDATA[Dvd Server]]></category>
		<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Freedom]]></category>
		<category><![CDATA[Fuser]]></category>
		<category><![CDATA[Godlike Powers]]></category>
		<category><![CDATA[Heart]]></category>
		<category><![CDATA[Linux Administrator]]></category>
		<category><![CDATA[Mound Optical Media]]></category>
		<category><![CDATA[Mount Cdrom]]></category>
		<category><![CDATA[Newbie]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Sleep]]></category>
		<category><![CDATA[Tips For Dvd]]></category>
		<category><![CDATA[Trouble Shoot Dvd]]></category>
		<category><![CDATA[Ubuntu Dvd Drive]]></category>
		<category><![CDATA[Ubuntu Tricks]]></category>
		<category><![CDATA[Unmount Dvd]]></category>
		<category><![CDATA[Unmount Unresponsive Drive]]></category>

		<guid isPermaLink="false">http://webnesbay.com/linux/unmounting-the-unresponsive-dvd-drive/</guid>
		<description><![CDATA[The newbie states that when he pushes the Eject button on the DVD drive of                 a server running a certain Redmond-based operating system, it will eject                 immediately. He then complains that, in most enterprise Linux servers, if a           [...]


Related posts:<ol><li><a href='http://webnesbay.com/how-to-repair-windows-using-linux/' rel='bookmark' title='Permanent Link: How to repair windows using linux'>How to repair windows using linux</a></li>
<li><a href='http://webnesbay.com/how-to-open-chm-files-in-ubuntu/' rel='bookmark' title='Permanent Link: How to open .chm files in ubuntu'>How to open .chm files in ubuntu</a></li>
<li><a href='http://webnesbay.com/ubuntu-fire-eye-wallpaper/' rel='bookmark' title='Permanent Link: Ubuntu fire eye wallpaper'>Ubuntu fire eye wallpaper</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The newbie states that when he pushes the Eject button on the DVD drive of                 a server running a certain Redmond-based operating system, it will eject                 immediately. He then complains that, in most enterprise Linux servers, if a                 process is running in that directory, then the ejection won&#8217;t happen. For                 too long as a Linux administrator, I would reboot the machine and get my                 disk on the bounce if I couldn&#8217;t figure out what was running and why it                 wouldn&#8217;t release the DVD drive. But this is ineffective.</p>
<p>Here&#8217;s how you find the process that holds your DVD drive and eject it to                 your heart&#8217;s content: First, simulate it. Stick a disk in your DVD drive,                 open up a terminal, and mount the DVD drive:</p>
<p><code> <span># mount /media/cdrom<br />
# cd /media/cdrom<br />
# while [ 1 ]; do echo "All your drives are belong to us!"; sleep 30; done</span> </code></p>
<p>Now open up a second terminal and try to eject the DVD drive:</p>
<p><code> <span># eject</span> </code></p>
<p>You&#8217;ll get a message like:</p>
<p><code>umount: /media/cdrom: device is busy</code></p>
<p>Before you free it, let&#8217;s find out who is using it.</p>
<p><code> <span># fuser /media/cdrom</span> </code></p>
<p>You see the process was running and, indeed, it is our fault we can not                 eject the disk.</p>
<p>Now, if you are root, you can exercise your godlike powers and kill                 processes:</p>
<p><code> <span># fuser -k /media/cdrom</span> </code></p>
<p>Boom! Just like that, freedom. Now solemnly unmount the drive:</p>
<p><code> <span># eject</span> </code></p>
<p><code>fuser</code> is good.</p>


<p>Related posts:<ol><li><a href='http://webnesbay.com/how-to-repair-windows-using-linux/' rel='bookmark' title='Permanent Link: How to repair windows using linux'>How to repair windows using linux</a></li>
<li><a href='http://webnesbay.com/how-to-open-chm-files-in-ubuntu/' rel='bookmark' title='Permanent Link: How to open .chm files in ubuntu'>How to open .chm files in ubuntu</a></li>
<li><a href='http://webnesbay.com/ubuntu-fire-eye-wallpaper/' rel='bookmark' title='Permanent Link: Ubuntu fire eye wallpaper'>Ubuntu fire eye wallpaper</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/unmounting-the-unresponsive-dvd-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
