<?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>Krishna Sunuwar &#187; Linux</title>
	<atom:link href="http://www.krishnasunuwar.com.np/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.krishnasunuwar.com.np</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 04:39:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Reset MySQL root password</title>
		<link>http://www.krishnasunuwar.com.np/2011/04/reset-mysql-root-password/</link>
		<comments>http://www.krishnasunuwar.com.np/2011/04/reset-mysql-root-password/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 07:29:22 +0000</pubDate>
		<dc:creator>Krish</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.krishnasunuwar.com.np/?p=580</guid>
		<description><![CDATA[Reseting MySQL root Password is easy: 1. Stop MySQL sudo /etc/init.d/mysql stop 2. Start the mysqld demon process using the &#8211;skip-grant-tables option with this command sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &#038; 3. Login to MySQL as root. mysql -u root mysql 4. You done, flush privileges FLUSH PRIVILEGES; 5. You might want to change root password. [...]]]></description>
			<content:encoded><![CDATA[<p>Reseting MySQL root Password is easy:</p>
<p>1. Stop MySQL </p>
<pre class="bash">
    sudo /etc/init.d/mysql stop
</pre>
<p>2. Start the mysqld demon process using the &#8211;skip-grant-tables option with this command</p>
<pre class="bash">
    sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &#038;
</pre>
<p>3. Login to MySQL as root.</p>
<pre class="bash">
    mysql -u root mysql
</pre>
<p>4. You done, flush privileges</p>
<pre class="bash">
    FLUSH PRIVILEGES;
</pre>
<p>5. You might want to change root password.</p>
<pre class="bash">
    UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root';
    FLUSH PRIVILEGES;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.krishnasunuwar.com.np/2011/04/reset-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual screen in Linux</title>
		<link>http://www.krishnasunuwar.com.np/2011/02/virtual-screen-in-linux/</link>
		<comments>http://www.krishnasunuwar.com.np/2011/02/virtual-screen-in-linux/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 10:56:47 +0000</pubDate>
		<dc:creator>Krish</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.krishnasunuwar.com.np/?p=552</guid>
		<description><![CDATA[Fire some command, close the terminal go back, connect to screen. If you wish that to happen, Screen will help you. Screen is virtual screen in Linux, (works with Ubuntu and Debian, I tried). Install it: $apt-get install screen Type: $screen It takes you to virtual screen. Do some work, or fire some command. Then [...]]]></description>
			<content:encoded><![CDATA[<p>Fire some command, close the terminal go back, connect to screen. If you wish that to happen, Screen will help you. Screen is virtual screen in Linux, (works with Ubuntu and Debian, I tried).</p>
<p>Install it:</p>
<pre class="bash">$apt-get install screen
</pre>
<p>Type:</p>
<pre class="bash">$screen
</pre>
<p>It takes you to virtual screen. Do some work, or fire some command. Then type <strong>Ctrl+a</strong>, <strong>d</strong>. (this will detach from virtual screen). Close your terminal and go for coffee.</p>
<p>Come back, login to box using terminal (any ssh). Type <strong>screen -R</strong> to connect to virtual screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krishnasunuwar.com.np/2011/02/virtual-screen-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unable to start eAccelerator module in Unknown on line 0</title>
		<link>http://www.krishnasunuwar.com.np/2011/02/unable-to-start-eaccelerator-module-in-unknown-on-line-0/</link>
		<comments>http://www.krishnasunuwar.com.np/2011/02/unable-to-start-eaccelerator-module-in-unknown-on-line-0/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 07:15:00 +0000</pubDate>
		<dc:creator>Krish</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.krishnasunuwar.com.np/?p=545</guid>
		<description><![CDATA[Have you ever encounter this error (and your Apache can not start) Unable to start eAccelerator module in Unknown on line 0. This is because when you upgrade PHP, eAccelerator need to recompile. eAccelerator always seek current version of PHP, so recompile it to get Apache running. Full log: SIGHUP received. Attempting to restart PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever encounter this error (and your Apache can not start)</p>
<p>Unable to start eAccelerator module in Unknown on line 0.</p>
<p>This is because when you upgrade PHP, eAccelerator need to recompile. eAccelerator always seek current version of PHP, so recompile it to get Apache running.</p>
<p>Full log:</p>
<pre class="log" style="width:500px; overflow:auto">SIGHUP received.  Attempting to restart
PHP Warning:  [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.6-1+lenny3. Rebuild it for your PHP version (5.2.6-1+lenny9) or download precompiled binaries.\n in Unknown on line 0
PHP Fatal error:  Unable to start eAccelerator module in Unknown on line 0
PHP Warning:  [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.6-1+lenny3. Rebuild it for your PHP version (5.2.6-1+lenny9) or download precompiled binaries.\n in Unknown on line 0
PHP Fatal error:  Unable to start eAccelerator module in Unknown on line 0
PHP Warning:  [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.6-1+lenny3. Rebuild it for your PHP version (5.2.6-1+lenny9) or download precompiled binaries.\n in Unknown on line 0
PHP Fatal error:  Unable to start eAccelerator module in Unknown on line 0
</pre>
<p>Useful link:</p>
<ol>
<li><a href="http://groups.google.com/group/eaccelerator/browse_thread/thread/809899bade9f2238">http://groups.google.com/group/eaccelerator/browse_thread/thread/809899bade9f2238</a></li>
</ol>
<p>Useful Tips:</p>
<p>If you want apache running quick, simply move eacceletor.ini from /etc/php5/conf.d. If you don&#8217;t have that file, you may want to edit php.ini.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krishnasunuwar.com.np/2011/02/unable-to-start-eaccelerator-module-in-unknown-on-line-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screw Network Manager (nm-applet) from panel in Ubuntu?</title>
		<link>http://www.krishnasunuwar.com.np/2011/02/screw-network-manager-nm-applet-in-ubuntu/</link>
		<comments>http://www.krishnasunuwar.com.np/2011/02/screw-network-manager-nm-applet-in-ubuntu/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 11:06:51 +0000</pubDate>
		<dc:creator>Krish</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.krishnasunuwar.com.np/?p=541</guid>
		<description><![CDATA[I screw Network Manager many times and it just disappear from panel. Following tip may be helpful, easy &#8211; to &#8211; tough: Option 1: Try Adding it. Right click on Pannel Select Add to Panel Select Network Manager Option 2: Start nm-applet Go to terminal Type, $sudo killall nm-applet &#38;&#38; nm-applet &#8211;sc-disable Option 3: Keep [...]]]></description>
			<content:encoded><![CDATA[<p>I screw Network Manager many times and it just disappear from panel. Following tip may be helpful, easy &#8211; to &#8211; tough:</p>
<ol>
<li>Option 1: Try Adding it.
<ol>
<li>Right click on Pannel</li>
<li>Select Add to Panel</li>
<li>Select Network Manager</li>
</ol>
</li>
<li>Option 2: Start nm-applet
<ol>
<li>Go to terminal</li>
<li>Type, $sudo killall nm-applet &amp;&amp; nm-applet &#8211;sc-disable</li>
</ol>
</li>
<li>Option 3: Keep it in start up
<ol>
<li>System -&gt; Preference -&gt; Startup Applications</li>
<li>Make sure Network Manager exists there with command nm-applet &#8211;sc-disable</li>
</ol>
</li>
<li>Option 4: Reset Gnom Panel
<ol>
<li>$gconftool &#8211;recursive-unset /apps/panel &amp;&amp; killall gnome-panel</li>
</ol>
</li>
<li>Option 5: Sometimes if you configure interface manually, Network Manager will disappear, make it auto
<ol>
<li>$vi /etc/network/interfaces</li>
<li>Comment all lines</li>
<li>Press Esc, Type :wq, then press enter (to save and exit)</li>
</ol>
</li>
</ol>
<ol></ol>
]]></content:encoded>
			<wfw:commentRss>http://www.krishnasunuwar.com.np/2011/02/screw-network-manager-nm-applet-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure Shell (SSH) Public Key Authentication</title>
		<link>http://www.krishnasunuwar.com.np/2010/09/secure-shell-ssh-public-key-authentication/</link>
		<comments>http://www.krishnasunuwar.com.np/2010/09/secure-shell-ssh-public-key-authentication/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 03:23:19 +0000</pubDate>
		<dc:creator>Krish</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Public Key Login]]></category>

		<guid isPermaLink="false">http://www.krishnasunuwar.com.np/?p=389</guid>
		<description><![CDATA[Secure Shell (SSH) public key authentication can be used by a client to access servers, if properly configured. Password free logins benefit remote access and automation, for example if administering many servers or accessing version control software over SSH. Below, I&#8217;ll show how to enable a ssh-agent to allow for passphrase-free logins. Client: the system [...]]]></description>
			<content:encoded><![CDATA[<p><img title="Authentication" src="http://i70.photobucket.com/albums/i88/s2krish/blog/authentication.jpg" alt="Authentication" align="right" /></p>
<div>Secure Shell (SSH) public key authentication can be used by a client to access servers, if properly configured. Password free logins benefit remote access and automation, for example if administering many servers or accessing version control software over SSH. Below, I&#8217;ll show how to enable a ssh-agent to allow for passphrase-free logins.</div>
<div><strong>Client</strong>: the system one types directly on, such as a laptop or desktop system. Usually this is maching which are using</div>
<div><strong>Server</strong>: anything connected to from the client. This includes other servers accessed through the first server connected to. Usually this is maching is is in remote.</div>
<div><strong>1. Generate RSA key pair in client.</strong></div>
<pre class="bash">$ mkdir ~/.ssh
$ ssh-keygen -q -f ~/.ssh/id_rsa -t rsa</pre>
<div>It will ask you passphrase If you are using public login for auto-login system e.g. crontab task, don&#8217;t use any passphrase.</div>
<div>(Execute line if if not ~/.ssh directory exists. )</div>
<div><strong>2) Fix the permission (optional)</strong></div>
<pre class="bash">$ chmod go-w ~/
$ chmod 700 ~/.ssh
$ chmod go-rwx ~/.ssh/*</pre>
<p><strong>3) Key distribution (upload public key to server)</strong></p>
<div>a. Move id_rsa.pub to server  (user&#8217;s home directory)</div>
<pre class="bash">$ scp .ssh/id_rsa.pub user@yourserver.com:~/</pre>
<div>b. Check, if ~/.ssh exists, if not create it ($mkdir ~/.ssh &amp;&amp; chmod 700 ~/.ssh)</div>
<div>c. Copy key into authorized_keys</div>
<pre class="bash">$ cat id_rsa.pub &gt;&gt; .ssh/authorized_keys</pre>
<p style="padding-left: 30px;">(Note: you can avoide 3a-3c by one command</p>
<pre class="bash" style="padding-left: 30px;">$ ssh-copy-id -i ~/.ssh/id_rsa.pub username@mystery)</pre>
<div>Check if server support public login system.</div>
<pre class="bash">ssh -o PreferredAuthentications=publickey user@yourserver.com</pre>
<div>Hurry!</div>
<div><strong>Application:</strong></div>
<div>
<ol>
<li>Auto login within trusted network (not having to type user name and password each time)</li>
<li>Useful while taking automated backup server to server.</li>
<li>Copying large number of files from one computer to anuther using SCP.</li>
</ol>
</div>
<div><strong>More readings:</strong></div>
<div>
<ol>
<li>https://help.ubuntu.com/community/SSH/OpenSSH/Keys</li>
<li>https://help.ubuntu.com/8.04/serverguide/C/openssh-server.html</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.krishnasunuwar.com.np/2010/09/secure-shell-ssh-public-key-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian or Ubuntu &#8211; build essential for develoepr</title>
		<link>http://www.krishnasunuwar.com.np/2009/12/debain-or-ubuntu-build-essential-for-develoepr/</link>
		<comments>http://www.krishnasunuwar.com.np/2009/12/debain-or-ubuntu-build-essential-for-develoepr/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 15:40:21 +0000</pubDate>
		<dc:creator>Krish</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.krishnasunuwar.com.np/?p=223</guid>
		<description><![CDATA[Compiling source code and creating build is not easy in Linux box. If you are developer and new to Debian or Ubuntu machine, following command may interest you. sudo aptitude install build-essential What does it do? It actually install all c/c++ compiler which are necessary to compile source. You can give try. Suppose you have [...]]]></description>
			<content:encoded><![CDATA[<p>Compiling source code and creating build is not easy in Linux box. If you are developer and new to Debian or Ubuntu machine, following command may interest you.</p>
<pre class="bash">sudo aptitude install build-essential</pre>
<p>What does it do? It actually install all c/c++ compiler which are necessary to compile source. You can give try.</p>
<p>Suppose you have create helloword.c file. Just do this</p>
<pre class="bash">cc -c helloworld.c
cc -o helloword helloworld.c
./helloworld
</pre>
<p>Instead, if you have helloworld.cpp (C++ code)</p>
<pre class="bash">
g++ helloworld.cpp -o helloworld
./helloworld
</pre>
<p>Happy programming!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.krishnasunuwar.com.np/2009/12/debain-or-ubuntu-build-essential-for-develoepr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

