<?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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Cybergavin</title>
	
	<link>http://cybergav.in</link>
	<description>Been there, Done that, Wanna Remember!</description>
	<lastBuildDate>Wed, 04 Apr 2012 02:54:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/cybergavin/it" /><feedburner:info uri="cybergavin/it" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>cybergavin/it</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>SSH Authentication is slow</title>
		<link>http://feedproxy.google.com/~r/cybergavin/it/~3/e6HgPF33cFs/</link>
		<comments>http://cybergav.in/2012/04/03/ssh-authentication-is-slow/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 02:54:11 +0000</pubDate>
		<dc:creator>mrkips</dc:creator>
				<category><![CDATA[IT Support]]></category>
		<category><![CDATA[slow ssh]]></category>
		<category><![CDATA[slow ssh login]]></category>
		<category><![CDATA[ssh authentication slow]]></category>
		<category><![CDATA[ssh login takes time]]></category>
		<category><![CDATA[ssh reverse dns]]></category>
		<category><![CDATA[ssh reverse domain lookup]]></category>

		<guid isPermaLink="false">http://cybergav.in/?p=910</guid>
		<description><![CDATA[Problem: When trying to connect to a server via SSH, the authentication is slow (takes a few seconds), but the server seems normally responsive after authentication. Background &#38; Analysis: I’ve experienced this problem when trying to connect to Linux hosts using SSH. Som of my Linux hosts use OpenSSH and some use Reflection for Secure [...]]]></description>
			<content:encoded><![CDATA[<p><u><strong><font size="2">Problem:</font></strong></u></p>
<p align="left"><font color="#ff0000" size="2" face="Courier New"><font color="#333333" face="Verdana">When trying to connect to a server via SSH, the authentication is slow (takes a few seconds), but the server seems normally responsive after authentication.</font></font></p>
<p align="left"><font size="2"><u><strong>Background &amp; Analysis:</strong></u></font></p>
<p align="justify"><font size="2">I’ve experienced this problem when trying to connect to Linux hosts using SSH. Som of my Linux hosts use OpenSSH and some use Reflection for Secure IT Server. </font></p>
<p align="justify"><font size="2">When authenticating via SSH, the SSH server will perform a <strong>reverse domain lookup</strong> of the client’s IP address and this delays the authentication process.</font></p>
<p align="justify"><font size="2">SSH servers have options in their configurations to disable the reverse domain lookup of clients’ IP addresses.</font></p>
<p align="justify"><font size="2"><strong><u>Solution:</u></strong></font></p>
<p align="justify">Disable reverse domain lookup of the client’s IP address in the SSH Server Configuration. Given below are examples of how this is done in two SSH servers:</p>
<p align="justify"><strong>OpenSSH:</strong> Edit /etc/ssh/sshd_config (or wherever your config file is) and set
<pre class="brush: bash; title: ; notranslate">UseDNS=no</pre>
</p>
<p align="justify"><strong>RSIT:</strong> Edit /etc/ssh2/sshd2_config and set
<pre class="brush: bash; title: ; notranslate">ResolveClientHostname=no</pre>
</p>
<p align="justify"><font size="2"><strong><u></u></strong></font></p>
<p align="justify"><font size="2"><strong><u>Root Cause:</u></strong></font></p>
<p align="justify">Slow Reverse Domain Lookup of clients’ IP addresses.</p>
<p align="justify">&#160;</p>
<p><font color="#0000ff" size="1">(1) The solution above describes a successful problem-solving experience and may not be applicable to other problems with similar symptoms.      </p>
<p>(2) Your rating of this post will be much appreciated as it gives me and others who read this article, an indication of whether this solution has worked for people other than me. Also, feel free to leave comments.</font></p>
<p><font color="#0000ff" size="1">&#160;</font></p>
<img src="http://feeds.feedburner.com/~r/cybergavin/it/~4/e6HgPF33cFs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cybergav.in/2012/04/03/ssh-authentication-is-slow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cybergav.in/2012/04/03/ssh-authentication-is-slow/</feedburner:origLink></item>
		<item>
		<title>New Page Notification In Mediawiki</title>
		<link>http://feedproxy.google.com/~r/cybergavin/it/~3/NwuKSwHIDqM/</link>
		<comments>http://cybergav.in/2012/03/31/new-page-notification-in-mediawiki/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 14:27:09 +0000</pubDate>
		<dc:creator>mrkips</dc:creator>
				<category><![CDATA[IT Support]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[create page notification]]></category>
		<category><![CDATA[email users when pages are created]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[New Page Notification In Mediawiki]]></category>

		<guid isPermaLink="false">http://cybergav.in/?p=884</guid>
		<description><![CDATA[In trying to make my team aware of what&#8217;s in our team&#8217;s wiki (based on Mediawiki), I wanted a simple notification to go out to the team daily listing the new wiki pages created on the previous day. This may be achieved with a simple shell script that queries the Mediawiki recentchanges table. STEP 1: [...]]]></description>
			<content:encoded><![CDATA[<p><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<p align="justify">In trying to make my team aware of what&#8217;s in our team&#8217;s wiki (based on Mediawiki), I wanted a simple notification to go out to the team daily listing the new wiki pages created on the previous day. This may be achieved with a simple shell script that queries the Mediawiki <strong>recentchanges </strong>table.</p>
<h3>STEP 1: Deploy Shell Script</h3>
<p>The following script queries the recentchanges table and fetches data for pages created (rc_type = 1) the previous day in the Main namespace (rc_namespace = 0).</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
# Author         :       Cybergavin (http://www.cybergav.in)
# Date Created   :       31st March 2012
# Description    :       This simple script queries the Wiki database and sends a notification to specific users regarding page creation. Reminds users about the existence of the wiki and what's in there.
#####################################################################################
#
# Variables
#
EMAIL_RECIPIENTS=&quot;wikiusers@abc.com&quot;
REPORT_DATE=$(date '+%Y%m%d' --date=&quot;yesterday&quot;)
REPORT_DATE_FORMAIL=$(date '+%d-%b-%Y' --date=&quot;yesterday&quot;)
WIKI_BASEURL=&quot;http://wiki.abc.com/wiki/index.php/&quot;
#
# Functions
#
getDBdata()
{
mysql -u wiki -p'xxxxx' --skip-column-names wiki &lt;&lt;EOSQL
connect wiki;
select rc_title, rc_user_text from recentchanges
where rc_timestamp like '$REPORT_DATE%'
and rc_type = 1
and rc_namespace=0;
quit
EOSQL
}
#
# Main
#
mail -s &quot;Tech Ops Wiki : New Page Notification For $REPORT_DATE_FORMAIL&quot; $EMAIL_RECIPIENTS &lt;&lt;EOMAIL
Hi

Given below are Pages created on the ABC Wiki ( http://wiki.abc.com ) yesterday ($REPORT_DATE_FORMAIL) along with their authors:

`getDBdata | awk -v a=&quot;$WIKI_BASEURL&quot; '{printf &quot;%-70s %s %s\n&quot;, a$1,&quot;-&quot;, $2}'`

EOMAIL
#
##################################### T H E     E N D ###############################
</pre>
<p>
<strong>NOTE:</strong><br /> (1) You must change certain variables and the body of the email as per your requirements.<br /> (2) If your wiki isn&#8217;t updated with new pages very often, you may send this notification weekly. To do so, simply replace &#8220;yesterday&#8221; by &#8220;last week&#8221; on lines 11 and 12 and replace &#8220;where rc_timestamp like &#8216;$REPORT_DATE%&#8217;&#8221; by &#8220;where rc_timestamp > $REPORT_DATE0000&#8243;</p>
<h3>STEP 2: Cron the Shell Script</h3>
<p>  Set up a cron job to send a daily notification. The example below executes the script daily at 9 AM.  </p>
<pre class="brush: bash; light: true; title: ; wrap-lines: true; notranslate">
0 9 * * * /opt/support/wikiPCnotify.sh &gt; /opt/support/wikiPCnotify.out 2&gt; /opt/support/wikiPCnotify.err
</pre>
<img src="http://feeds.feedburner.com/~r/cybergavin/it/~4/NwuKSwHIDqM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cybergav.in/2012/03/31/new-page-notification-in-mediawiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cybergav.in/2012/03/31/new-page-notification-in-mediawiki/</feedburner:origLink></item>
		<item>
		<title>Unknown groups in SLES</title>
		<link>http://feedproxy.google.com/~r/cybergavin/it/~3/4TsCu6DuMww/</link>
		<comments>http://cybergav.in/2012/02/21/unknown-groups-in-sles/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 19:22:22 +0000</pubDate>
		<dc:creator>mrkips</dc:creator>
				<category><![CDATA[IT Support]]></category>
		<category><![CDATA[/etc/default/useradd]]></category>
		<category><![CDATA[dialout]]></category>
		<category><![CDATA[unknown group]]></category>

		<guid isPermaLink="false">http://cybergav.in/?p=880</guid>
		<description><![CDATA[Problem: On SLES 11 SP 1, while trying to add users with the useradd command, the following is displayed: useradd: Unknown group `video&#8217;. useradd: Unknown group `dialout&#8217;. Background &#38; Analysis: The “video” and “dialout” groups are default groups in SLES. This is configured in /etc/default/useradd. These groups were removed from /etc/group using the groupadd command [...]]]></description>
			<content:encoded><![CDATA[<p><u><strong><font size="2">Problem:</font></strong></u></p>
<p align="left">On SLES 11 SP 1, while trying to add users with the useradd command, the following is displayed:</p>
<p><font color="#ff0000" face="Courier New">useradd: Unknown group `video&#8217;.      <br />useradd: Unknown group `dialout&#8217;.</font></p>
<p align="justify"><font size="2"><u><strong>Background &amp; Analysis:</strong></u></font></p>
<p align="justify"><font size="2">The “video” and “dialout” groups are default groups in SLES. This is configured in /etc/default/useradd.</font></p>
<p align="justify"><font size="2">These groups were removed from /etc/group using the groupadd command although the useradd command uses them as default groups.</font></p>
<p align="justify"><font size="2"><strong><u>Solution:</u></strong></font></p>
<p align="justify"><strong>STEP 1: Modify /etc/default/useradd</strong></p>
<p align="justify">Edit /etc/default/useradd and remove video and dialout from the GROUPS directive. After doing so, my /etc/default/useradd looks like this (I have removed the GROUPS directive as I do not want default groups):</p>
<pre class="brush: bash; title: ; notranslate">
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
</pre>
<p align="justify">&#160;</p>
<p><font color="#0000ff" size="1">&#160;</font></p>
<img src="http://feeds.feedburner.com/~r/cybergavin/it/~4/4TsCu6DuMww" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cybergav.in/2012/02/21/unknown-groups-in-sles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cybergav.in/2012/02/21/unknown-groups-in-sles/</feedburner:origLink></item>
		<item>
		<title>How to Install PHP with FreeTDS on Linux</title>
		<link>http://feedproxy.google.com/~r/cybergavin/it/~3/wRwUS7qMQYA/</link>
		<comments>http://cybergav.in/2012/01/15/how-to-install-php-with-freetds-on-linux/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 05:31:07 +0000</pubDate>
		<dc:creator>mrkips</dc:creator>
				<category><![CDATA[IT Support]]></category>
		<category><![CDATA[install PHP with FreeTDS]]></category>
		<category><![CDATA[install sybase_ct extension]]></category>
		<category><![CDATA[PHP with FreeTDS]]></category>
		<category><![CDATA[sybase_ct]]></category>

		<guid isPermaLink="false">http://cybergav.in/?p=877</guid>
		<description><![CDATA[There are PHP applications which use MSSQL as the back-end database and such applications require FreeTDS to enable PHP code interface with MSSQL. This article describes how to install PHP and FreeTDS on Linux hosts. To compile or not?: Typically, it is recommended to use package managers like yum to install software on Linux platforms. [...]]]></description>
			<content:encoded><![CDATA[<p><script>if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
</p>
<p align="justify">There are PHP applications which use MSSQL as the back-end database and such applications require FreeTDS to enable PHP code interface with MSSQL. This article describes how to install PHP and FreeTDS on Linux hosts. </p>
<p align="justify"><b>To compile or not?:</b> Typically, it is recommended to use package managers like yum to install software on Linux platforms. Using package managers facilitates installation and administration (e.g. updates) of the software. However, when the software requires special options to be set or modules/extensions to be enabled, it may be difficult to obtain software built to suit those requirements. In such cases, it will be required to compile the software from its source. If compiling, then it will be prudent to organize all compiled software in standard locations on the host. </p>
<p>Given below are the implementation steps that were used for installing <strong>PHP 5.3.3</strong> and <strong>FreeTDS 0.91</strong> on <strong>RHEL 6.2</strong>. </p>
<p><b>NOTE:</b> All commands in the examples below must be executed with <strong>root</strong> privileges, unless otherwise stated. </p>
<h3><span class="mw-headline">STEP 1: Create Installation Directory Structure</span></h3>
<ul>
<li>Use the following commands to create an appropriate directory structure for compiled software: </li>
</ul>
<pre>mkdir /opt/src</pre>
<ul>
<li>Use a standard location (e.g. /opt) to install all software compiled from source to facilitate administration (re-compilation, removal, etc.) </li>
</ul>
<h2><span class="mw-headline"></span></h2>
<h3><span class="mw-headline">STEP 2: Download and Unpack Software Source</span></h3>
<ul>
<li>Download software sources (typically *.tar.gz files) and place them in /opt/src </li>
<li>Unpack source software (*.tar.gz) as per the following examples: </li>
</ul>
<pre class="brush: bash; title: ; notranslate">
tar xfz php-5.3.3.tar.gz
tar xfz freetds-0.91.tar.gz
</pre>
<p>The above commands will create directories /opt/src/php-5.3.3 and /opt/src/freetds-0.91 </p>
<h2><span id="Compile_and_Build_FreeTDS" class="mw-headline"></span></h2>
<h3><span class="mw-headline">STEP 3: Compile and Build FreeTDS</span></h3>
<p>Compile and build FreeTDS as per the example below: </p>
<pre class="brush: bash; title: ; notranslate">
cd /opt/src/freetds-0.91
./configure --prefix=/opt/freetds-0.91
make
make install
</pre>
<p><b>NOTE:</b> In order to facilitate administration, you may create a soft link as follows: </p>
<pre class="brush: bash; title: ; notranslate">
cd /opt
ln -s freetds-0.91 freetds
</pre>
<h2><span id="Compile_and_Build_PHP" class="mw-headline"></span></h2>
<h3><span class="mw-headline">STEP 4: Compile and Build PHP</span></h3>
<p>Compile and build PHP as per the example below: </p>
<pre class="brush: bash; title: ; notranslate">
cd /opt/src/php-5.3.3
./configure --prefix=/opt/php-5.3.3 --with-config-file-path=/opt/php-5.3.3
make
make install
</pre>
<p><b>NOTE:</b> In order to facilitate administration, you may create a soft link as follows: </p>
<pre class="brush: bash; title: ; notranslate">
cd /opt
ln -s php-5.3.3 php
</pre>
<h2><span id="Compile_and_Build_the_PHP_Sybase_Extension" class="mw-headline"></span></h2>
<h3><span class="mw-headline">STEP 5: Compile and Build the PHP Sybase Extension</span></h3>
<p>PHP requires the sybase_ct extension to allow PHP code to interface with MSSQL. You may compile and build the sybase_ct extension as follows: </p>
<pre class="brush: bash; title: ; wrap-lines: true; notranslate">
cd /opt/src/php-5.3.3/ext/sybase_ct
sh ../../scripts/phpize
./configure --prefix=/opt/php --with-php-config=/opt/php/bin/php-config --with-sybase-ct=/opt/freetds
make
make install
</pre>
<h2><span id="Enable_the_PHP_Sybase_Extension" class="mw-headline"></span></h2>
<h3><span class="mw-headline">STEP 6: Enable the PHP Sybase Extension</span></h3>
<p>Enable the sybase_ct extension by adding the following line to /opt/php/php.ini </p>
<pre>extension=sybase_ct.so</pre>
<h2><span class="editsection"></span></h2>
<h3><span class="editsection">STEP 7: </span><span id="Verify_the_PHP_.28with_FreeTDS.29_Installation" class="mw-headline">Verify the PHP (with FreeTDS) Installation</span></h3>
<p>If PHP and the sybase_ct extension have been successfully installed, you should be able to view the sybase_ct module when displaying the PHP configuration information as shown below: </p>
<p>Execute the following command (any user): </p>
<pre>php -i | grep sybase_ct</pre>
<p>If you see &quot;sybase_ct&quot; in the output, then it means that PHP and the sybase_ct extension have been successfully installed. </p>
<p><b>NOTE:</b> Since PHP and FreeTDS have been compiled from source and installed in non-standard locations, you must add /opt/php/bin:/opt/freetds/bin to a user&#8217;s PATH environment variable. </p>
<p><!--<br />
NewPP limit report<br />
Preprocessor node count: 38/1000000<br />
Post-expand include size: 0/2097152 bytes<br />
Template argument size: 0/2097152 bytes<br />
Expensive parser function count: 0/100<br />
--><!-- Saved in parser cache with key mediawiki:pcache:idhash:23-1!1!0!!en!2 and timestamp 20120115045253 --></p>
<img src="http://feeds.feedburner.com/~r/cybergavin/it/~4/wRwUS7qMQYA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cybergav.in/2012/01/15/how-to-install-php-with-freetds-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cybergav.in/2012/01/15/how-to-install-php-with-freetds-on-linux/</feedburner:origLink></item>
		<item>
		<title>Unable to load module osad</title>
		<link>http://feedproxy.google.com/~r/cybergavin/it/~3/SS17Xwh5YVY/</link>
		<comments>http://cybergav.in/2012/01/06/unable-to-load-module-osad/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 19:34:57 +0000</pubDate>
		<dc:creator>mrkips</dc:creator>
				<category><![CDATA[IT Support]]></category>
		<category><![CDATA[cannot start osad]]></category>
		<category><![CDATA[no module named hashlib]]></category>
		<category><![CDATA[unable to load module osad]]></category>

		<guid isPermaLink="false">http://cybergav.in/2012/01/06/unable-to-load-module-osad/</guid>
		<description><![CDATA[Problem: The osad service does not start (RHEL 5.7) and throws the following error: Starting osad: Unable to load module osad Background &#38; Analysis: The osad service is required on all Red Hat Network Satellite clients to receive pushed actions from the RHN Satellite Server. For more details on the osad and related services, please [...]]]></description>
			<content:encoded><![CDATA[<p><u><strong><font size="2">Problem:</font></strong></u></p>
<p align="left">The osad service does not start (RHEL 5.7) and throws the following error:</p>
<p align="left"><font color="#ff0000" size="2" face="Courier New">Starting osad: Unable to load module osad</font></p>
<p align="justify"><font size="2"><u><strong>Background &amp; Analysis:</strong></u></font></p>
<p align="justify">The osad service is required on all <a href="http://www.redhat.com/red_hat_network/" target="_blank">Red Hat Network Satellite</a> clients to receive pushed actions from the RHN Satellite Server. For more details on the osad and related services, please refer this <a href="https://fedorahosted.org/spacewalk/wiki/OsadHowTo" target="_blank">Spacewalk</a> (open-source version of RHN Satellite) article.</p>
<p align="justify"><font size="2"><u><strong>Solution:</strong></u></font></p>
<p align="justify">The osad service depends on the <strong>python-hashlibs</strong> package.</p>
<p align="justify"><strong>STEP 1: Install python-hashlibs</strong></p>
<p align="justify">Install python-hashlibs as follows:</p>
<pre lang="bash" escape="true">sudo rpm -ivh &lt;package&gt;</pre>
<p align="justify">where &lt;package&gt;= the name of the python-hashlibs rpm</p>
<p align="justify">Refer the screenshot below:</p>
<p align="justify"><a href="http://cybergav.in/wp-content/uploads/2012/01/osadpythonhaslibdep.png" rel="lightbox[875]"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="osad-python-haslib-dep" border="0" alt="osad-python-haslib-dep" src="http://cybergav.in/wp-content/uploads/2012/01/osadpythonhaslibdep_thumb.png" width="640" height="176" /></a> </p>
<p align="justify"><strong>NOTE:</strong> You may also use a &quot;yum install&quot; if python-haslibs is available in any of your your yum repositories.</p>
<p><font color="#0000ff" size="1">(1) The solution above describes a successful problem-solving experience and may not be applicable to other problems with similar symptoms. </p>
<p>(2) Your rating of this post will be much appreciated as it gives me and others who read this article, an indication of whether this solution has worked for people other than me. Also, feel free to leave comments.</font></p>
<p><font color="#0000ff" size="1">&#160;</font></p>
<img src="http://feeds.feedburner.com/~r/cybergavin/it/~4/SS17Xwh5YVY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cybergav.in/2012/01/06/unable-to-load-module-osad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cybergav.in/2012/01/06/unable-to-load-module-osad/</feedburner:origLink></item>
	</channel>
</rss>

