<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Sohail Riaz, Linux and Open Source Blog</title>
	
	<link>http://www.sohailriaz.com</link>
	<description>Sohail Riaz, Linux and Open Source Blog</description>
	<lastBuildDate>Tue, 03 Apr 2012 07:41:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/sohailriaz" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="sohailriaz" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">sohailriaz</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Free Icon/Symbol from Open Icon Library</title>
		<link>http://www.sohailriaz.com/free-iconsymbol-from-open-icon-library/</link>
		<comments>http://www.sohailriaz.com/free-iconsymbol-from-open-icon-library/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 07:41:17 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=356</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/free-iconsymbol-from-open-icon-library/"><img src=""  alt="" title="" /></a>
A project Open Icon Library (http://openiconlibrary.sourceforge.net/) will be very useful for the developers / designers to use icon free, modify and redistribute. I found it very helpful to community and some how everybody in this community need icons either they are web designers or application developers.
A free and open Icon collection. Over 10,000 Unique Icons. [...]]]></description>
			<content:encoded><![CDATA[<p>A project Open Icon Library (<a href="http://openiconlibrary.sourceforge.net/" target="_blank">http://openiconlibrary.sourceforge.net/</a>) will be very useful for the developers / designers to use icon free, modify and redistribute. I found it very helpful to community and some how everybody in this community need icons either they are web designers or application developers.</p>
<blockquote><p>A free and open Icon collection. Over 10,000 Unique Icons. Free for  anyone to use on you computer, website or any other project.  The  library is not a theme.  Its a centralized source for icons to cover all  your needs.  The goal is to cover all common apps, operating systems,  mimetypes, devices, and country flags.<span id="more-356"></span></p></blockquote>
<p>The icons includes application icons, flags, devices, OS etc, full list can be viewed at http://openiconlibrary.sourceforge.net</p>
<p>You can download them as Icon Package or Webapp Package and used them as per your need.</p>
<p>There goal is to</p>
<blockquote><p>Offer a consolidated source of icons for people to custimise there desktop, as they wish, without relying of a single theme.</p></blockquote>
<p>Happy designing/developing.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=356&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/free-iconsymbol-from-open-icon-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Downgrade RPM Package Using YUM</title>
		<link>http://www.sohailriaz.com/how-to-downgrade-rpm-package-using-yum/</link>
		<comments>http://www.sohailriaz.com/how-to-downgrade-rpm-package-using-yum/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 11:42:41 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=345</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-downgrade-rpm-package-using-yum/"><img src=""  alt="" title="" /></a>
In this howto I will describe how to Downgrade a RPM Package Using YUM. Yum came with a plugin named yum-allowdowngrade which allow you to downgrade any existing install RPM to older version. This requirement came from one of my client server that it requires to downgrade PHP version from 5.3.8 to 5.2.17.
1) Check Already [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto I will describe how to Downgrade a RPM Package Using YUM. Yum came with a plugin named <strong>yum-allowdowngrade</strong> which allow you to downgrade any existing install RPM to older version. This requirement came from one of my client server that it requires to downgrade PHP version from 5.3.8 to 5.2.17.<span id="more-345"></span></p>
<h3>1) Check Already Installed RPM and Required RPM</h3>
<p>Following command will check which rpm version is installed.</p>
<blockquote><p>rpm -qa | grep php</p></blockquote>
<p>The next command will show you all available version using yum. Be noted I am using atomic repository for my PHP upgrade and downgrade. But you can do this with any rpm hence yum provide you with lower version of rpm package. How to add atomic repository kindly see my following post</p>
<p><a href="http://www.sohailriaz.com/how-to-update-php-on-servers-centosfedorarhel/" target="_blank">http://www.sohailriaz.com/how-to-update-php-on-servers-centosfedorarhel/</a></p>
<blockquote><p>yum list | grep php | grep atomic</p></blockquote>
<h3>2) Install YUM Plugin</h3>
<p>Issue following command to install yum-allowdowngrade plugin</p>
<blockquote><p>yum -y install yum-allowdowngrade</p></blockquote>
<h3>3) Downgrade RPM Install</h3>
<p>First you should be sure what rpm&#8217;s you are going to downgrade. For my list I will using already install PHP rpm package name with downgrade argument, which let yum to automatically use the lower version to install and remove the current version of PHP.</p>
<blockquote><p>yum downgrade php-dba php-soap php-ldap php-mysql php-mcrypt php-common php-cli php-gd php-odbc php-xmlrpc php-snmp  php-bcmath php-imap- php-devel php-pdo php php-pgsql php-pgsql php-mbstring php-xml</p></blockquote>
<p>The above command detect the lower version 5.2.17 at itself and give me option to downgrade the php version to 5.2.17. By giving y to start the installation, it removes the current php version, save the configuration files and install the older version of php 5.2.17. Which was than verified using following commands</p>
<blockquote><p>rpm -qa | grep php</p></blockquote>
<p>shows install php rpm with version, additionally you can use php command with version option</p>
<blockquote><p>php &#8211;version</p></blockquote>
<p>If you have any question please comment.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=345&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-downgrade-rpm-package-using-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Remove i386 RPM Package from x86_64 Install</title>
		<link>http://www.sohailriaz.com/how-to-remove-i386-rpm-package-from-x86_64-install/</link>
		<comments>http://www.sohailriaz.com/how-to-remove-i386-rpm-package-from-x86_64-install/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 11:44:26 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=352</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-remove-i386-rpm-package-from-x86_64-install/"><img src=""  alt="" title="" /></a>
In this how to I will describe how to remove any i386 RPM Package from your x86_64 version of install. The operating system can be RHEL, Fedora or CentOS. Sometimes using yum we accidentally or intentionally or as requirement we install i386 rpm package on our x86_64 install of RHEL, Fedora or CentOS. 
This can [...]]]></description>
			<content:encoded><![CDATA[<p>In this how to I will describe how to remove any i386 RPM Package from your x86_64 version of install. The operating system can be RHEL, Fedora or CentOS. Sometimes using yum we accidentally or intentionally or as requirement we install i386 rpm package on our x86_64 install of RHEL, Fedora or CentOS. <span id="more-352"></span></p>
<p>This can be either library or full package itself. We came to issue of upgrading PHP while it require to upgrade MySQL server. By issueing yum upgrade command stuck with conflict with already i386 version of install. By checking we found out both i386 and x86_64 version of rpm were install of MySQL. There is option available in rpm command to remove both of them. But our requirements is to remove only i386 version of MySQL rpm.</p>
<h3>1) Get a List of i386 RPMs for MySQL</h3>
<p>If I do only</p>
<blockquote><p>rpm -qa | grep mysql</p>
<p>mysql-5.0.77-4.el5_5.4<br />
mysql-5.0.77-4.el5_5.4<br />
mysql-server-5.0.77-4.el5_5.4<br />
mysql-server-5.0.77-4.el5_5.4<br />
mysql-devel-5.0.77-4.el5_5.4<br />
mysql-devel-5.0.77-4.el5_5.4</p></blockquote>
<p>will give me both install of mysql with same name. So I will give it queryformat option to get out only i386 version of MySQL</p>
<blockquote><p>rpm -qa &#8211;queryformat=&#8217;%{n}-%{v}-%{r}.%{arch}\n&#8217; | grep &#8216;\i[3456]86$&#8217; | grep mysql</p>
<p>mysql-5.0.77-4.el5_5.4.i386<br />
mysql-server-5.0.77-4.el5_5.4.i386<br />
mysql-devel-5.0.77-4.el5_5.4.i386</p></blockquote>
<p>The above command will bring MySQL rpm of i386 version install.</p>
<h3>2) Delete the i386 rpm.</h3>
<p>Now you can issue individual command to remove the found i386 rpm files.</p>
<blockquote><p>rpm -e mysql-5.0.77-4.el5_5.4.i386<br />
rpm -e mysql-server-5.0.77-4.el5_5.4.i386<br />
rpm -e mysql-devel-5.0.77-4.el5_5.4.i386</p></blockquote>
<p>The architecture at the end will cause only i386 version of rpm to delete.</p>
<h3>3) Delete all i386 RPM Found.</h3>
<p>If you wish you can delete all i386 RPM files found on your x86_64 install of RHEL, Fedora or CentOS. You can use following command to do so.</p>
<blockquote><p>rpm -qa &#8211;queryformat=&#8217;%{n}-%{v}-%{r}.%{arch}\n&#8217; | grep &#8216;\.i[3456]86$&#8217; | xargs rpm -ev</p></blockquote>
<p>If you have any question please comment.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=352&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-remove-i386-rpm-package-from-x86_64-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Add EPEL Repository on CentOS / RHEL 6.x</title>
		<link>http://www.sohailriaz.com/how-to-add-epel-repository-on-centos-rhel-6-x/</link>
		<comments>http://www.sohailriaz.com/how-to-add-epel-repository-on-centos-rhel-6-x/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 06:24:13 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WGET]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=335</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-add-epel-repository-on-centos-rhel-6-x/"><img src=""  alt="" title="" /></a>
In this How To we are going to add EPEL (Extra Packages for Enterprise Linux) on CentOS / RHEL 6.x. Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat [...]]]></description>
			<content:encoded><![CDATA[<p>In this How To we are going to add EPEL (Extra Packages for Enterprise Linux) on CentOS / RHEL 6.x. Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL),CentOS and Scientific Linux (SL). <span id="more-335"></span></p>
<p><span style="color: #ff9900;"><span style="text-decoration: underline;"><strong>Video at the end to demonstrate all commands.</strong></span></span></p>
<h3>1) Installing EPEL Repository</h3>
<p>Use following command to install EPEL Repository</p>
<blockquote><p>cd /usr/src<br />
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm<br />
rpm -ivh epel-release-6-5.noarch.rpm</p></blockquote>
<h3>2) Testing</h3>
<p>Use following command to see EPEL Repo get listed.</p>
<blockquote><p>yum repolist<br />
Plugin &#8220;refresh-packagekit&#8221; can&#8217;t be imported<br />
Loaded plugins: fastestmirror<br />
Loading mirror speeds from cached hostfile<br />
epel/metalink                                            | 6.1 kB     00:00<br />
* base: centos.mirror.lstn.net<br />
* epel: fedora-epel.mirror.lstn.net<br />
* extras: centos.mirror.lstn.net<br />
* updates: mirror.steadfast.net<br />
epel                                                     | 4.0 kB     00:00<br />
epel/primary_db                                          | 4.2 MB     00:00<br />
repo id                repo name                                          status<br />
adobe-linux-x86_64     Adobe Systems Incorporated                             2<br />
base                   CentOS-6 &#8211; Base                                    6,294<br />
<strong>epel                   Extra Packages for Enterprise Linux 6 &#8211; x86_64     7,016</strong><br />
extras                 CentOS-6 &#8211; Extras                                      4<br />
updates                CentOS-6 &#8211; Updates                                   466<br />
vz-base                vz-base                                                3<br />
vz-updates             vz-updates                                             0<br />
repolist: 13,785</p></blockquote>
<p>You can see above (bold line) about EPEL install and its now part of yum repository list. So now you can download any package listed in EPEL repository. For all list you can use following command.</p>
<blockquote><p>yum list | grep epel | less</p></blockquote>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/tY35glifZrs?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>If you have any question please comment.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=335&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-add-epel-repository-on-centos-rhel-6-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Prevent Package Update Using YUM</title>
		<link>http://www.sohailriaz.com/how-to-prevent-package-update-using-yum/</link>
		<comments>http://www.sohailriaz.com/how-to-prevent-package-update-using-yum/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 17:13:01 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[YUM]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=328</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-prevent-package-update-using-yum/"><img src=""  alt="" title="" /></a>
In this howto we will discuss how to prevent any package to be update using yum even its update is available. Sometimes we require to stick with current version of any installed rpm package and does not need to update. But whenever you execute yum command, it will search for available update for the current [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto we will discuss how to prevent any package to be update using yum even its update is available. Sometimes we require to stick with current version of any installed rpm package and does not need to update. But whenever you execute yum command, it will search for available update for the current package install. Even if any package which is part of dependencies of installing rpm package will get update using yum.<span id="more-328"></span></p>
<p>This can be prevent by using yum plugin yum-versionlock.</p>
<h3>1) Install yum-versionlock</h3>
<blockquote><p>yum install yum-versionlock</p></blockquote>
<p>Above command will install versionlock plugin to work with.</p>
<h3>2) Configure yum-versionlock</h3>
<p>We have one package installed named gnupg and has update available.</p>
<blockquote><p>yum update gnupg<br />
Loaded plugins: langpacks, presto, refresh-packagekit, versionlock<br />
Setting up Update Process<br />
Resolving Dependencies<br />
&#8211;&gt; Running transaction check<br />
&#8212;&gt; Package gnupg.x86_64 0:1.4.11-3.fc15 will be updated<br />
&#8212;&gt; Package gnupg.x86_64 0:1.4.12-1.fc16 will be an update<br />
&#8211;&gt; Finished Dependency Resolution</p>
<p>Dependencies Resolved</p>
<p>================================================================================<br />
Package        Arch            Version                  Repository        Size<br />
================================================================================<br />
Updating:<br />
gnupg          x86_64          1.4.12-1.fc16            updates          1.3 M</p>
<p>Transaction Summary<br />
================================================================================<br />
Upgrade       1 Package</p>
<p>Total download size: 1.3 M<br />
Is this ok [y/N]: N</p></blockquote>
<p>Now we will configure yum-versionlock to prevent this package to be update next time. All packages name goes into /etc/yum/pluginconf.d/versionlock.list with format you get from rpm -qa</p>
<blockquote><p>rpm -qa | grep gnupg<br />
gnupg-1.4.11-3.fc15.x86_64</p></blockquote>
<p>either write the package name as above in the file or redirect the output.</p>
<blockquote><p>rpm -qa | grep gnupg &gt;&gt; /etc/yum/pluginconf.d/versionlock.list</p></blockquote>
<blockquote><p>cat /etc/yum/pluginconf.d/versionlock.list<br />
gnupg-1.4.11-3.fc15.x86_64</p></blockquote>
<p>Now again try to update the same package.</p>
<blockquote><p>yum update gnupg<br />
Loaded plugins: langpacks, presto, refresh-packagekit, versionlock<br />
Setting up Update Process<br />
No Packages marked for Update</p></blockquote>
<p>You can see it exclude this package for update. If you have any question please comment.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=328&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-prevent-package-update-using-yum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Encrypt Files Using GnuPG</title>
		<link>http://www.sohailriaz.com/how-to-encrypt-files-using-gnupg/</link>
		<comments>http://www.sohailriaz.com/how-to-encrypt-files-using-gnupg/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 20:53:47 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=317</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-encrypt-files-using-gnupg/"><img src=""  alt="" title="" /></a>
In this HowTo we will discuss to encypt files using GnuPG. Encryption is a method which protect data stored on your computer or sending over the network from compromise. It can be used to ensure and verify data comes from a rightful owner, and also to maintain confidentiality of the data. We will used a [...]]]></description>
			<content:encoded><![CDATA[<p>In this HowTo we will discuss to encypt files using GnuPG. Encryption is a method which protect data stored on your computer or sending over the network from compromise. It can be used to ensure and verify data comes from a rightful owner, and also to maintain confidentiality of the data. We will used a tool GnuPG (GNU Privacy Guard) to encrypt individual files or validate files.<span id="more-317"></span></p>
<p>GnuPG is an opensource implementation of the OpenPGP public key encryption system. Public Key Encryption uses asymmetric encryption, in which a matching pair of public and private keys are used to encrypt or decrypt. A person who accomplished this has to generate two keys i.e Private Key and Public Key.</p>
<p>Private Key is the one kept by owner secretly and what is encrypt by private key can decrypt by the one who has the matching public key or what is encrypt by the public key by anyone can decrypt by the private key owner. Beside encryption it also verify that messages comes from the holder of the private or public keys.</p>
<h3>1) Generate Keys</h3>
<p>Use following command to generate Public and Private Keys.</p>
<blockquote><p>gpg &#8211;gen-key</p></blockquote>
<p>It will ask series of questions, you can answer as per your need but this is what I used for example.</p>
<blockquote><p>Please select what kind of key you want:<br />
(1) RSA and RSA (default)<br />
(2) DSA and Elgamal<br />
(3) DSA (sign only)<br />
(4) RSA (sign only)<br />
Your selection? <span style="color: #ff0000;">Press Enter to have default RSA</span></p></blockquote>
<blockquote><p>RSA keys may be between 1024 and 4096 bits long.<br />
What keysize do you want? (2048) <span style="color: #ff0000;">Press Enter</span></p></blockquote>
<blockquote><p>Please specify how long the key should be valid.<br />
0 = key does not expire<br />
= key expires in n days<br />
w = key expires in n weeks<br />
m = key expires in n months<br />
y = key expires in n years<br />
Key is valid for? (0) Press Enter<br />
Key does not expire at all<br />
Is this correct? (y/N) <span style="color: #ff0000;">y</span></p></blockquote>
<blockquote><p>You need a user ID to identify your key; the software constructs the user ID<br />
from the Real Name, Comment and Email Address in this form:<br />
&#8220;Heinrich Heine (Der Dichter) &#8221;</p>
<p>Real name: <span style="color: #ff0000;">Sohail Riaz</span><br />
Email address: <span style="color: #ff0000;">sohail@sohailriaz.com</span><br />
Comment: Press Enter<br />
You selected this USER-ID:<br />
&#8220;Sohail Riaz &#8221;</p>
<p>Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <span style="color: #ff0000;">o</span></p></blockquote>
<blockquote><p>You need a Passphrase to protect your secret key.<br />
<span style="color: #ff0000;">redhat</span></p></blockquote>
<p>Use following commands to list your keys. You need to note the key-id to export your key. In below you can see the key-id after<strong> pub2048R </strong>which is<strong> ABF9DEAB</strong>.</p>
<blockquote><p>gpg &#8211;list-keys<br />
/home/sohail/.gnupg/pubring.gpg<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
pub   2048R/<strong>ABF9DEAB</strong> 2012-02-16<br />
uid                  Sohail Riaz<br />
sub   2048R/68DA88B7 2012-02-16</p></blockquote>
<h3>2). Export Public Key</h3>
<p>Use following command to export your public key.</p>
<blockquote><p>gpg -a -o sohail-public.key &#8211;export ABF9DEAB</p></blockquote>
<p>It will create a file named sohail-public.key on current location. Now transfer this file to your partner which you need to have it to decrypt or verify your files.</p>
<p>Where -a is to put output in text rather than binary format. key-id will ensure we are using same key.</p>
<blockquote><p>scp sohail-public.key imran@192.168.122.152:</p></blockquote>
<p>Now let your partner to import your public key.</p>
<blockquote><p>gpg &#8211;import sohail-public.key</p></blockquote>
<p>It will list your information with key-id. It has to noted it down or grep on every gpg &#8211;list-key whenever it need to encrypt file for partner sohail.</p>
<h3>3) Encrypt and Decrypt the File.</h3>
<p>Lets now test it by encrypting one file by imran using sohail public key and then decrypt it.</p>
<blockquote><p>echo &#8216;This text is encrpted and can only be view by using sohail public key&#8217; &gt; decrypt-me.txt</p></blockquote>
<blockquote><p>gpg &#8211;encrypt -a -r ABF9DEAB decrypt-me.txt</p></blockquote>
<p>It will create encrypted file with appended .asc extension. where -r will require to pub recipient name or key-id to whom this encryption has done.</p>
<blockquote><p>ls<br />
decrypt-me.txt.asc</p></blockquote>
<p>Now transfer this file to your partner computer.</p>
<blockquote><p>scp imran@192.168.122.152:decrypt-me.txt.asc .</p></blockquote>
<p>Now decrypt the file on your computer.</p>
<p>First see what it contain.</p>
<blockquote><p>cat decrypt-me.txt.asc</p>
<p>&#8212;&#8211;BEGIN PGP MESSAGE&#8212;&#8211;<br />
Version: GnuPG v1.4.11 (GNU/Linux)</p>
<p>hQEMAy7GnyBo2oi3AQgAg1m/6bcLj+RZ4IKSr0HitWWyWc3mkIUkZ6KAMJnY2kSx<br />
JmZ6e0Sc+D/D9CUy0cmD6PGQcO2LjfQvTKpPvups9Ug3mr9JCqJyjfeDb59uiKN1<br />
8cvq2U0/OVppLb+yf4Z19OryuCdX2MlDdkmhlUaNbftWOA3YlYubi5Db0Fwl+e+X<br />
nt6SZv51XnQ1wM3fsGN0q5+DAfPsIYtmRkDHvMkkdojkdO8Oxnj4LNu3/iFhgNTl</p>
<p>&#8212;&#8211;END PGP MESSAGE&#8212;&#8211;</p></blockquote>
<p>Now decrypt and save output on a file named decrypted.txt, note it will require passphrase which you used while creating keys.</p>
<blockquote><p>gpg &#8211;decrypt decrypt-me.txt.asc &gt; decrypted.txt</p>
<p>You need a passphrase to unlock the secret key for<br />
user: &#8220;Sohail Riaz &#8221;<br />
2048-bit RSA key, ID 68DA88B7, created 2012-02-16 (main key ID ABF9DEAB)</p>
<p>gpg: encrypted with 2048-bit RSA key, ID 68DA88B7, created 2012-02-16<br />
&#8220;Sohail Riaz &#8220;</p></blockquote>
<blockquote><p>cat decrypted.txt<br />
This text is encrypted using sohail public key and can only be decrypt by sohail</p></blockquote>
<p>For more options you can see man pages of gpg using following command.</p>
<blockquote><p>man gpg</p></blockquote>
<p>For any question please comment.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=317&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-encrypt-files-using-gnupg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Fix Bluetooth in Fedora 15</title>
		<link>http://www.sohailriaz.com/how-to-fix-bluetooth-in-fedora-15/</link>
		<comments>http://www.sohailriaz.com/how-to-fix-bluetooth-in-fedora-15/#comments</comments>
		<pubDate>Thu, 26 May 2011 15:30:38 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=306</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-fix-bluetooth-in-fedora-15/"><img src=""  alt="" title="" /></a>
In this howto I will describe how to fix bluetooth issue in Fedora 15. I updated Fedora 15 last night and found out my bluetooth mouse is not connected. By seeing icon at tray, it shows bluetooth is on but visibility option was faded and by selecting setting everything was faded. That means something was [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto I will describe how to fix bluetooth issue in Fedora 15. I updated Fedora 15 last night and found out my bluetooth mouse is not connected. By seeing icon at tray, it shows bluetooth is on but visibility option was faded and by selecting setting everything was faded. That means something was fishing regarding it. By investigating different fedora forums founds its been a small bug that bluetooth service were not run at startup. To fix this you have to enable the service to run at startup and start the service to use your bluetooth pheriphirals.<span id="more-306"></span></p>
<h3>1) Check Bluetooth Service.</h3>
<blockquote><p>systemctl status bluetooth.service</p>
<p>bluetooth.service &#8211; Bluetooth Manager<br />
Loaded: loaded (/lib/systemd/system/bluetooth.service)<br />
Active: inactive (dead)<br />
CGroup: name=systemd:/system/bluetooth.service</p></blockquote>
<p>It shows my bluetooth is inactive (dead).</p>
<h3>2) Activate Bluetooth Service.</h3>
<p>First priority is to enable the service to be run on every startup, to do this use following command.</p>
<blockquote><p>systemctl enable bluetooth.service</p>
<p>ln -s &#8216;/lib/systemd/system/bluetooth.service&#8217; &#8216;/etc/systemd/system/dbus-org.bluez.service&#8217;<br />
ln -s &#8216;/lib/systemd/system/bluetooth.service&#8217; &#8216;/etc/systemd/system/bluetooth.target.wants/bluetooth.service&#8217;</p></blockquote>
<p>Secondly you need to run the service to have bluetooth working on running system.</p>
<blockquote><p>systemctl start bluetooth.service</p></blockquote>
<p>Here you go, all bluetooth devices will be visible and can connected to your newly installed/updated Fedora 15.</p>
<p>Confused about systemctl command, please look fedora documentation.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=306&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-fix-bluetooth-in-fedora-15/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>How To Fix MySQL Error ‘Could not parse relay log event entry’</title>
		<link>http://www.sohailriaz.com/how-to-fix-mysql-error-could-not-parse-relay-log-event-entry/</link>
		<comments>http://www.sohailriaz.com/how-to-fix-mysql-error-could-not-parse-relay-log-event-entry/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 08:11:57 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=296</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-fix-mysql-error-could-not-parse-relay-log-event-entry/"><img src=""  alt="" title="" /></a>
In this howto i will describe how to fix MySql error &#8216;Could not parse relay log event entry&#8217;. On one of my client database replication cluster we got issue of &#8216;Could not parse relay log event entry&#8217; on slaves. On investigating it found he has deleted some relay log files to free up the space. [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto i will describe how to fix MySql error &#8216;Could not parse relay log event entry&#8217;. On one of my client database replication cluster we got issue of &#8216;Could not parse relay log event entry&#8217; on slaves. On investigating it found he has deleted some relay log files to free up the space. You can see the error in show slave status command on Last_Error field.<span id="more-296"></span></p>
<blockquote><p>[root@server1 ~]# mysql -u root -p<br />
Enter password:<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 179<br />
Server version: 5.0.77 Source distribution</p>
<p>Type &#8216;help;&#8217; or &#8216;\h&#8217; for help. Type &#8216;\c&#8217; to clear the buffer.</p>
<p>mysql&gt; show slave status\G;<br />
*************************** 1. row ***************************<br />
Slave_IO_State:<br />
Master_Host: 192.168.0.1<br />
Master_User: mysqladmin<br />
Master_Port: 3306<br />
Connect_Retry: 5<br />
Master_Log_File: mysql-bin.000019<br />
Read_Master_Log_Pos: 18816335<br />
Relay_Log_File: mysqld-relay-bin.000153<br />
Relay_Log_Pos: 593<br />
Relay_Master_Log_File: mysql-bin.000019<br />
Slave_IO_Running: No<br />
Slave_SQL_Running: No<br />
Replicate_Do_DB: test1<br />
Replicate_Ignore_DB:<br />
Replicate_Do_Table:<br />
Replicate_Ignore_Table:<br />
Replicate_Wild_Do_Table:<br />
Replicate_Wild_Ignore_Table:<br />
Last_Errno: 0<br />
Last_Error: Could not parse relay log event entry. The possible reasons are: the master&#8217;s binary log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; on the binary log), the slave&#8217;s relay log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; on the relay log), a network problem, or a bug in the master&#8217;s or slave&#8217;s MySQL code. If you want to check the master&#8217;s binary log or slave&#8217;s relay log, you will be able to know their names by issuing &#8216;SHOW SLAVE STATUS&#8217; on this slave.<br />
Skip_Counter: 0<br />
Exec_Master_Log_Pos: 18337925<br />
Relay_Log_Space: 479619<br />
Until_Condition: None<br />
Until_Log_File:<br />
Until_Log_Pos: 0<br />
Master_SSL_Allowed: No<br />
Master_SSL_CA_File:<br />
Master_SSL_CA_Path:<br />
Master_SSL_Cert:<br />
Master_SSL_Cipher:<br />
Master_SSL_Key:<br />
Seconds_Behind_Master: NULL<br />
1 row in set (0.00 sec)</p>
<p>ERROR:<br />
No query specified</p></blockquote>
<h3>1) Get Log Filename and Position from Master.</h3>
<p>To fix this we need two values from MySQL Master Server. i.e Master Log File Name and Master Log Position. To achieve this run following command on MySQL Master Server.</p>
<blockquote><p>mysql&gt; show master status\G;<br />
*************************** 1. row ***************************<br />
File: mysql-bin.000020<br />
Position: 5387330<br />
Binlog_Do_DB: test1,test2<br />
Binlog_Ignore_DB:<br />
1 row in set (0.00 sec)</p>
<p>ERROR:<br />
No query specified</p></blockquote>
<h3>2) Fix Slave Server</h3>
<p>To fix slave, first you need to stop slave on it and then run change master command with require values and start slave again to start working.</p>
<blockquote><p>mysql&gt; slave stop<br />
-&gt; ;<br />
Query OK, 0 rows affected, 1 warning (0.00 sec)</p>
<p>mysql&gt; change master to master_log_file=&#8221;mysql-bin.000020&#8243;, master_log_pos=5382560;<br />
Query OK, 0 rows affected (0.03 sec)</p>
<p>mysql&gt; start slave;<br />
Query OK, 0 rows affected (0.00 sec)</p></blockquote>
<p>To check whether slave is OK or not, run slave status command on Slave Server.</p>
<blockquote><p>mysql&gt; show slave status\G;<br />
*************************** 1. row ***************************<br />
Slave_IO_State: Waiting for master to send event<br />
Master_Host: 192.168.1.252<br />
Master_User: mysqladmin<br />
Master_Port: 3306<br />
Connect_Retry: 5<br />
Master_Log_File: mysql-bin.000020<br />
Read_Master_Log_Pos: 5459989<br />
Relay_Log_File: mysqld-relay-bin.000002<br />
Relay_Log_Pos: 77672<br />
Relay_Master_Log_File: mysql-bin.000020<br />
Slave_IO_Running: Yes<br />
Slave_SQL_Running: Yes<br />
Replicate_Do_DB: test1<br />
Replicate_Ignore_DB:<br />
Replicate_Do_Table:<br />
Replicate_Ignore_Table:<br />
Replicate_Wild_Do_Table:<br />
Replicate_Wild_Ignore_Table:<br />
Last_Errno: 0<br />
Last_Error:<br />
Skip_Counter: 0<br />
Exec_Master_Log_Pos: 5459989<br />
Relay_Log_Space: 77672<br />
Until_Condition: None<br />
Until_Log_File:<br />
Until_Log_Pos: 0<br />
Master_SSL_Allowed: No<br />
Master_SSL_CA_File:<br />
Master_SSL_CA_Path:<br />
Master_SSL_Cert:<br />
Master_SSL_Cipher:<br />
Master_SSL_Key:<br />
Seconds_Behind_Master: 0<br />
1 row in set (0.00 sec)</p>
<p>ERROR:<br />
No query specified</p></blockquote>
<p>and you can see that there is no Last error and Seconds_Behind_Master value is 0 indicates we are totally sync with Master.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=296&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-fix-mysql-error-could-not-parse-relay-log-event-entry/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>How To Fix Access Points not shown in Fedora 13 (Broadcom driver)</title>
		<link>http://www.sohailriaz.com/how-to-fix-access-points-not-shown-in-fedora-13-broadcom-driver/</link>
		<comments>http://www.sohailriaz.com/how-to-fix-access-points-not-shown-in-fedora-13-broadcom-driver/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 16:55:34 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=292</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-fix-access-points-not-shown-in-fedora-13-broadcom-driver/"><img src=""  alt="" title="" /></a>
In this howto i will describe quick fix for Access Points not shown in Fedora 13 even you install Broadcom wireless driver using rpmfusion.org. For those who doesn&#8217;t know how to install broadcom driver for wireless card, you need to do following steps to install broadcom driver for wireless card.
1) Install RPMFusion Repositories
rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto i will describe quick fix for Access Points not shown in Fedora 13 even you install Broadcom wireless driver using rpmfusion.org. For those who doesn&#8217;t know how to install broadcom driver for wireless card, you need to do following steps to install broadcom driver for wireless card.<span id="more-292"></span></p>
<h3>1) Install RPMFusion Repositories</h3>
<blockquote><p>rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm<br />
rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm</p></blockquote>
<h3>2) Install Broadcom Wireless Card Driver</h3>
<blockquote><p>yum install broadcom-wl kmod-wl</p></blockquote>
<p>reboot the system to get modules get loaded. But when you try to scan using NetworkManager or wlaassistant, it show&#8217;s no wireless access point found. Even they are visible on computer desk available next to you.</p>
<h3>3) Fixing Access Points not showing.</h3>
<p>Its a quick and dirty fix from fedora forums.</p>
<blockquote><p>vi /boot/grub/grub.conf</p></blockquote>
<p>edit your available kernel lines and append intel_iommu=off in the end for kernel parameters.</p>
<blockquote><p>kernel /vmlinuz-2.6.33.5-112.fc13.x86_64 ro root=/dev/mapper/vg_server1-LogVol01 rd_LVM_LV=vg_server1/LogVol01 rd_LVM_LV=vg_server1/LogVol00 rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet</p></blockquote>
<p>change to</p>
<blockquote><p>kernel /vmlinuz-2.6.33.5-112.fc13.x86_64 ro root=/dev/mapper/vg_server1-LogVol01 rd_LVM_LV=vg_server1/LogVol01 rd_LVM_LV=vg_server1/LogVol00 rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet <strong>intel_iommu=off</strong></p></blockquote>
<p>save the file and reboot the system again to get kernel to load following kernel parameter and bravo you can see the Access Points <img src='http://www.sohailriaz.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=292&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-fix-access-points-not-shown-in-fedora-13-broadcom-driver/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How To Enable root Login at Graphical in Fedora 13</title>
		<link>http://www.sohailriaz.com/how-to-enable-root-login-at-graphical-in-fedora-13/</link>
		<comments>http://www.sohailriaz.com/how-to-enable-root-login-at-graphical-in-fedora-13/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 21:46:34 +0000</pubDate>
		<dc:creator>Sohail Riaz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sohailriaz.com/?p=286</guid>
		<description><![CDATA[<a href="http://www.sohailriaz.com/how-to-enable-root-login-at-graphical-in-fedora-13/"><img src=""  alt="" title="" /></a>
In this howto i will describe how to let root user to Graphical Login in Fedora 13. From Fedora 10 it was disable by default to let it login from GUI.We will be configure pam authentication files gdm and gdm-password respectively.
vi /etc/pam.d/gdm
find following line
auth       required    pam_succeed_if.so user != root quiet
comment out by placing # at [...]]]></description>
			<content:encoded><![CDATA[<p>In this howto i will describe how to let root user to Graphical Login in Fedora 13. From Fedora 10 it was disable by default to let it login from GUI.We will be configure pam authentication files gdm and gdm-password respectively.<span id="more-286"></span></p>
<blockquote><p>vi /etc/pam.d/gdm</p></blockquote>
<p>find following line</p>
<blockquote><p>auth       required    pam_succeed_if.so user != root quiet</p></blockquote>
<p>comment out by placing # at beginning to disable this check</p>
<blockquote><p>#auth       required    pam_succeed_if.so user != root quiet</p></blockquote>
<p>save and close the file.</p>
<blockquote><p>vi /etc/pam.d/gdm.password</p></blockquote>
<p>find following line</p>
<blockquote><p>auth       required    pam_succeed_if.so  user != root quiet</p></blockquote>
<p>comment out by placing # at beginning to  disable this check</p>
<blockquote><p>#auth       required    pam_succeed_if.so user  != root quiet</p></blockquote>
<p>save and close the file. Now logout from terminal or GUI and relogin with root from GUI.</p>
<img src="http://www.sohailriaz.com/wp-content/plugins/pixelstats/trackingpixel.php?post_id=286&amp;ts=1336450330" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.sohailriaz.com/how-to-enable-root-login-at-graphical-in-fedora-13/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

