<?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>Snoozing Dragon &#187; Information Technology</title>
	<atom:link href="http://www.snoozingdragon.com/category/information-technology/feed" rel="self" type="application/rss+xml" />
	<link>http://www.snoozingdragon.com</link>
	<description>Information Technology and Management weblog</description>
	<lastBuildDate>Fri, 15 Aug 2014 07:44:36 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.2</generator>
	<item>
		<title>Avidemux script to join multiple flv files</title>
		<link>http://www.snoozingdragon.com/information-technology/programmin/avidemux-script-to-join-multiple-flv-files-154.html</link>
		<comments>http://www.snoozingdragon.com/information-technology/programmin/avidemux-script-to-join-multiple-flv-files-154.html#comments</comments>
		<pubDate>Fri, 15 Aug 2014 07:42:25 +0000</pubDate>
		<dc:creator><![CDATA[yk]]></dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.snoozingdragon.com/?p=154</guid>
		<description><![CDATA[Some video sites allow you to download a show but they are broken up into multiple FLV files. The attached Avidemux Tinypy script will allow you to choose folder and join all the FLV files that are found inside and save it in a MKV container (more video player friendly). If you need to join [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Some video sites allow you to download a show but they are broken up into multiple FLV files. The attached Avidemux Tinypy script will allow you to choose folder and join all the FLV files that are found inside and save it in a MKV container (more video player friendly). </p>
<p>If you need to join other file types, modify the following lines:<br />
<code>ext="flv"</code></p>
<p>If you need to save as another file container type, modify the following lines:<br />
<code>adm.setContainer("MKV")</code><br />
and<br />
<code>outputFile = inputFolder+"\\"+directoryName+".mkv"</code></p>
<p>Pardon the messy code, it was done as a quick and dirty script.</p>
<p><a href="http://www.snoozingdragon.com/wp-content/uploads/2014/08/convert.zip">Click here to download the script</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snoozingdragon.com/information-technology/programmin/avidemux-script-to-join-multiple-flv-files-154.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Query error: Incorrect string value</title>
		<link>http://www.snoozingdragon.com/information-technology/programmin/query-error-incorrect-string-value-118.html</link>
		<comments>http://www.snoozingdragon.com/information-technology/programmin/query-error-incorrect-string-value-118.html#comments</comments>
		<pubDate>Sat, 20 Apr 2013 08:39:24 +0000</pubDate>
		<dc:creator><![CDATA[yk]]></dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.snoozingdragon.com/?p=118</guid>
		<description><![CDATA[I was inserting records into a MySQL table using php and got an error that says: Query error: Incorrect string value: '\xE2\x82...' for column 'message' at row 1 - Invalid query: INSERT INTO `my_table` (`message`) VALUES ('The price is xE2x82 500') The original string in the &#8216;message&#8217; field is actually The price is â‚¬ 500 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I was inserting records into a MySQL table using php and got an error that says:<br />
<code>Query error: Incorrect string value: '\xE2\x82...' for column 'message' at row 1 - Invalid query: INSERT INTO `my_table` (`message`) VALUES ('The price is xE2x82 500')</code></p>
<p>The original string in the &#8216;message&#8217; field is actually<br />
<code>The price is  â‚¬ 500</code></p>
<p>This error is surprising given that the string is actually in <em>UTF-8</em> encoding and the field in the MySQL table is declared as <em>utf8_unicode_ci</em> type.</p>
<p>The solution that I found it is to call the php function <strong><em>utf8_encode</em></strong> to encode string before inserting into the MySQL table.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snoozingdragon.com/information-technology/programmin/query-error-incorrect-string-value-118.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Outlook has stopped working</title>
		<link>http://www.snoozingdragon.com/information-technology/tips-and-tricks/microsoft-outlook-has-stopped-working-113.html</link>
		<comments>http://www.snoozingdragon.com/information-technology/tips-and-tricks/microsoft-outlook-has-stopped-working-113.html#comments</comments>
		<pubDate>Tue, 22 Feb 2011 03:52:59 +0000</pubDate>
		<dc:creator><![CDATA[yk]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.snoozingdragon.com/?p=113</guid>
		<description><![CDATA[Recently after migrating to Windows 7, I&#8217;ve been encoutering the this message a lot from Outlook 2003. After poking around a bit (like removing and re-adding my mail account, removing and re-adding my personal and archive folders, etc), the only solution that worked for me is to force Outlook to recreate the OST file. For [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Recently after migrating to Windows 7, I&#8217;ve been encoutering the this message a lot from Outlook 2003.</p>
<p>After poking around a bit (like removing and re-adding my mail account, removing and re-adding my personal and archive folders, etc), the only solution that worked for me is to force Outlook to recreate the OST file. For those who are interested the location of the file is at:</p>
<p>Windows 7:<br />
<code>%userprofile%\AppData\Local\Microsoft\Outlook\</code></p>
<p>Windows XP:<br />
<code> %userprofile%\Local Settings\Application Data\Microsoft\Outlook\</code></p>
<p>Just rename all the files with the .ost extension to something else and try to start Outlook again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snoozingdragon.com/information-technology/tips-and-tricks/microsoft-outlook-has-stopped-working-113.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook 2003 crashes on startup</title>
		<link>http://www.snoozingdragon.com/information-technology/tips-and-tricks/outlook-2003-crash-on-startup-11.html</link>
		<comments>http://www.snoozingdragon.com/information-technology/tips-and-tricks/outlook-2003-crash-on-startup-11.html#comments</comments>
		<pubDate>Fri, 18 Apr 2008 03:23:32 +0000</pubDate>
		<dc:creator><![CDATA[yk]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.snoozingdragon.com/uncategorized/outlook-2003-crash-on-startup-11.html</guid>
		<description><![CDATA[This morning Outlook gave me a big scare. Nope, it didn&#8217;t deliver a particularly nasty email, but it crashed as soon as it started. Here&#8217;s a look at the nasty error message: No amount of begging and coaxing would make Outlook start normally, so I started Outlook on Safe Mode and after it managed to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This morning Outlook gave me a big scare. Nope, it didn&#8217;t deliver a particularly nasty email, but it crashed as soon as it started. Here&#8217;s a look at the nasty error message:</p>
<p><a title="Outlook crash screen dump" href="http://www.snoozingdragon.com/wp-content/uploads/2008/04/outlook_crash.bmp"><img src="http://www.snoozingdragon.com/wp-content/uploads/2008/04/outlook_crash.bmp" alt="Outlook crash screen dump" /></a></p>
<p>No amount of begging and coaxing would make Outlook start normally, so I started Outlook on <em>Safe Mode</em> and after it managed to start without error, ended it in hopes that it will fix whatever stuff that is wrong when the program quits. And guess what? It did.</p>
<p>So, for anyone who encounters the above error, the first thing you can do before trying the myriad of troubleshooting suggestions found on the internet, give Outlook a chance to fix itself by starting it in <em>Safe Mode</em>. To start Outlook on <em>Safe Mode</em> go to <em>Start -&gt; RunÂ </em>and type:<br />
<code>outlook /safe</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snoozingdragon.com/information-technology/tips-and-tricks/outlook-2003-crash-on-startup-11.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installating Windows XP drivers for Compaq C749TU</title>
		<link>http://www.snoozingdragon.com/information-technology/tips-and-tricks/installating-windows-xp-drivers-for-compaq-c749tu-7.html</link>
		<comments>http://www.snoozingdragon.com/information-technology/tips-and-tricks/installating-windows-xp-drivers-for-compaq-c749tu-7.html#comments</comments>
		<pubDate>Fri, 21 Mar 2008 10:12:51 +0000</pubDate>
		<dc:creator><![CDATA[yk]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.snoozingdragon.com/uncategorized/installating-windows-xp-drivers-for-compaq-c749tu-7.html</guid>
		<description><![CDATA[I recently purchased a Compaq C749TU via the Citibank Malaysia Shell Card promotion (stated as HP CompaqÂ PC700 Notebook on their promotion). It came with FreeDOS and since I have an unused version of Windows XP, I decided to install on it. Hardware specification: Processor - Intel Celeron M Processor 540 - 1.86Ghz Memory (std/max) - [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I recently purchased a Compaq C749TU via the Citibank Malaysia Shell Card promotion (stated as HP CompaqÂ PC700 Notebook on their promotion). It came with FreeDOS and since I have an unused version of Windows XP, I decided to install on it.<span id="more-7"></span></p>
<p>Hardware specification:<br />
<code>Processor - Intel Celeron M Processor 540 - 1.86Ghz<br />
Memory (std/max) - 512MB 667MHz<br />
Hard Disk Drive - 80GB<br />
Optical Drive - DVD/CDRW Combo Drive<br />
Bluetooth/Wireless network - No<br />
Operating System - FreeDOS<br />
Intel Chipset - IntelÂ® GM965<br />
Graphic Chipset - IntelÂ® Graphics Media Accelerator x3100<br />
Audio - 2 Altec Lansing Stereo Speakers<br />
Fax / Modem speeds - High speed 56K<br />
Network Interface - Integrated 10Mbps, 100Mbps<br />
Input Devices - 101 key compatible, 1 Quick Launch Button and Touch Pad<br />
Other media - 5 in 1 integrated digital media reader slot</code></p>
<p>First hurdle is the lack of SATA harddisk support in Windows XP installation. I burned a new copy the Windows XP cd with SATA drivers integrated in it (you can refer to <a href="http://paparadit.blogspot.com/2007/06/installing-sata-hard-drive-with-windows.html">this blog post</a> on how to do this).</p>
<p>After successfully installed Windows XP, I was horrified to find that there are no Windows XP drivers provided by Compaq (they only officially support Windows Vista). After searching around and trying out solutions, I&#8217;ve compiled a list of drivers that will eliminated all the yellow question marks in the Windows device manager list (Right click on <em>My Computer</em> -&gt; <em>Properties</em> -&gt; <em>Hardware</em> -&gt; <em>Device Manager</em>). Install the following drivers/software in sequence and you should be fine:</p>
<p><strong>Audio driver</strong><br />
Download and install <a href="ftp://ftp.hp.com/pub/softpaq/sp33501-34000/sp33867.exe">Microsoft Universal Audio Architecture Driver</a><br />
Download <a href="http://www.mediafire.com/?dg0cmmkm4y4">Conexant High-Definition Audio Driver</a>. Run to extract the contents to a directory. To install the Conexant High-Defintion Audio Driver, you have to do the following:<br />
1. Click on Start and select Run. Now type devmgmt.msc and press enter.<br />
2. Right click on <em>Audio device on High Definition Audio Bus</em> and click Update driver.<br />
3. Select &#8220;Install from a list or specific location&#8221;<br />
4. Click Next. Then select &#8220;Don&#8217;t search, I will choose the driver to install&#8221;<br />
5. Click Next and then select &#8220;Sound, video and game controller&#8221; from the list.<br />
6. Click Next and then click Have Disk.<br />
7. Then browse to the directory that contains the previously extract files.</p>
<p><strong>Modem driver</strong><br />
Download <a href="ftp://ftp.hp.com/pub/softpaq/sp36001-36500/sp36089.exe">Conexant HDAUDIO Soft Data Fax Modem with SmartCP Driver</a>. Run the program to extract to a temporary folder. Then follow the steps to install <em>Conexant High-Definition Audio Driver</em> to install this driver. This driver is to update <em>Audio device on High Definition Audio Modem</em> (or something like that).</p>
<p><strong>Video Driver</strong><br />
Download and run <a href="http://downloadmirror.intel.com/14388/a08/win2k_xp14311.exe">IntelÂ® Chipset Graphics Driver Software</a>.</p>
<p><strong>Chipset Driver</strong><br />
Download and run <a href="http://downloadmirror.intel.com/14528/a08/infinst_autol.exe">Intel Chipset Installation Utility</a>.</p>
<p><strong>Network Interface Card (LAN)</strong><br />
Download and run <a href="ftp://ftp.hp.com/pub/softpaq/sp30001-30500/sp30156.exe">Realtek RTL8100CL/RTL8110Sb NIC (LAN) Driver</a>.</p>
<p><strong>Input Devices</strong><br />
Download and run <a href="ftp://ftp.hp.com/pub/softpaq/sp38001-38500/sp38171.exe">Quick Launch Button Driver</a>.<br />
Download and run <a href="ftp://ftp.hp.com/pub/softpaq/sp35001-35500/sp35444.exe">Synaptics Touchpad Drivers</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snoozingdragon.com/information-technology/tips-and-tricks/installating-windows-xp-drivers-for-compaq-c749tu-7.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multiple listeners for multiple SID in Oracle database</title>
		<link>http://www.snoozingdragon.com/information-technology/tips-and-tricks/multiple-listeners-for-multiple-sid-in-oracle-database-6.html</link>
		<comments>http://www.snoozingdragon.com/information-technology/tips-and-tricks/multiple-listeners-for-multiple-sid-in-oracle-database-6.html#comments</comments>
		<pubDate>Fri, 21 Mar 2008 09:18:34 +0000</pubDate>
		<dc:creator><![CDATA[yk]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.snoozingdragon.com/information-technology/tips_and_tricks/multiple-listeners-for-multiple-sid-in-oracle-database-6.html</guid>
		<description><![CDATA[Scenario: You have one Oracle database with 3 different SID for different purposes: DR (disaster recovery), UAT (User Acceptance Testing) and SIT (System Integration Testing). You are tasked to configure the Database to open one port for each of the SID to control access. Piece of cake, you will only need to edit two oracle [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Scenario: You have one Oracle database with 3 different SID for different purposes: DR (disaster recovery), UAT (User Acceptance Testing) and SIT (System Integration Testing). You are tasked to configure the Database to open one port for each of the SID to control access. Piece of cake, you will only need to edit two oracle configuration files to achieve it.<span id="more-6"></span></p>
<p>Technical details: The following configuration has been tested on Oracle 10GR2 that was installed on AIX 5.3ML6.</p>
<p>Assumptions: The three SID in the Oracle database are named <em>DRDB</em>, <em>UATDB</em> and <em>SITDB</em>. Host name (machine name) is <em>ORACLEDB01</em> and Global Database name is <em>ORACLEDB</em>. We willl create 3 listeners with the following configuration:<br />
<code>Listener name: LISTENER<br />
Port: 1521 (default listener port)<br />
SID: DRDB<br />
Listener name: LISTENER1<br />
Port: 1522<br />
SID: UATDB<br />
Listener name: LISTENER2<br />
Port: 1523<br />
SID: SITDB<br />
</code></p>
<p>First of all, back up the two files in case we need to restore the original configuration.</p>
<p>The next step is to stop the running listener. Get into your oracle shell (for my case, I need to <code>su - oracle</code>) and stop the activated listener by typing <code>lsnrctl stop</code>.</p>
<p>Now, you will need to located two files with the name <em>tnsnames.ora</em> and <em>listener.ora</em>. If you are using unix like me, you can type in:<br />
<code>find / -name "*.ora"</code><br />
In my case, the relevant files are located at:<br />
<em>/u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora<br />
/u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora</em></p>
<p>Next, edit <em>tnsnames.ora</em> and it should look something like this:<br />
<code># tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora<br />
# Generated by Oracle configuration tools.</code></p>
<p>PRDDB =<br />
(DESCRIPTION =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLEDB01)(PORT = 1521))<br />
(CONNECT_DATA =<br />
(SERVER = DEDICATED)<br />
(SERVICE_NAME = prddb)<br />
)<br />
)</p>
<p>UATDB =<br />
(DESCRIPTION =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLEDB01)(PORT = 1522))<br />
(CONNECT_DATA =<br />
(SERVER = DEDICATED)<br />
(SERVICE_NAME = uatdb)<br />
)<br />
)</p>
<p>SITDB =<br />
(DESCRIPTION =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLEDB01)(PORT = 1523))<br />
(CONNECT_DATA =<br />
(SERVER = DEDICATED)<br />
(SERVICE_NAME = sitdb)<br />
)<br />
)</p>
<p>EXTPROC_CONNECTION_DATA =<br />
(DESCRIPTION =<br />
(ADDRESS_LIST =<br />
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))<br />
)<br />
(CONNECT_DATA =<br />
(SID = PLSExtProc)<br />
(PRESENTATION = RO)<br />
)<br />
)</p>
<p>The next step is to edit <em>listener.ora</em> and it should look something like this:<br />
<code># listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora<br />
# Generated by Oracle configuration tools.</code></p>
<p>SID_LIST_LISTENER =<br />
(SID_LIST =<br />
(SID_DESC =<br />
(SID_NAME = PLSExtProc)<br />
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)<br />
(PROGRAM = extproc)<br />
)<br />
)</p>
<p>LISTENER =<br />
(DESCRIPTION_LIST =<br />
(DESCRIPTION =<br />
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLEDB01)(PORT = 1521))<br />
)<br />
)</p>
<p>SID_LIST_LISTENER1 =<br />
(SID_LIST =<br />
(SID_DESC =<br />
(GLOBAL_DBNAME=ORACLEDB)<br />
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)<br />
(SID_NAME=uatdb)<br />
)<br />
)</p>
<p>LISTENER1 =<br />
(DESCRIPTION_LIST =<br />
(DESCRIPTION =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLEDB01)(PORT = 1522))<br />
)<br />
)</p>
<p>SID_LIST_LISTENER2 =<br />
(SID_LIST =<br />
(SID_DESC =<br />
(GLOBAL_DBNAME=ORACLEDB)<br />
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)<br />
(SID_NAME=sitdb)<br />
)<br />
)</p>
<p>LISTENER2 =<br />
(DESCRIPTION_LIST =<br />
(DESCRIPTION =<br />
(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLEDB01)(PORT = 1523))<br />
)<br />
)</p>
<p>After editing the files, your new listeners are ready for action. If everything is done correctly, you can start each listener on its own by typing:<br />
<code>lsnrctl start listener</code><br />
<code>lsnrctl start listener1</code><br />
<code>lsnrctl start listener2</code><br />
You can stop them individually by typing:<br />
<code>lsnrctl stop listener</code><br />
<code>lsnrctl stop listener1</code><br />
<code>lsnrctl stop listener2</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snoozingdragon.com/information-technology/tips-and-tricks/multiple-listeners-for-multiple-sid-in-oracle-database-6.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Set up rssh with chroot jail on AIX 5.3</title>
		<link>http://www.snoozingdragon.com/information-technology/tips-and-tricks/set-up-rssh-with-chroot-jail-on-aix-53-3.html</link>
		<comments>http://www.snoozingdragon.com/information-technology/tips-and-tricks/set-up-rssh-with-chroot-jail-on-aix-53-3.html#comments</comments>
		<pubDate>Fri, 21 Mar 2008 08:06:40 +0000</pubDate>
		<dc:creator><![CDATA[yk]]></dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://www.snoozingdragon.com/information-technology/tips_and_tricks/set-up-rssh-with-chroot-jail-on-aix-53-3.html</guid>
		<description><![CDATA[Scenario: Your AIX server has OpenSSH installed and sFTP configured. How do you restrict sFTP users from accessing other shells (like ksh, bash, csh, scp, ftp, etc)? How do you prevent them from traversing through your directories and potentially doing all sorts of damage? The answer: Set up rssh with chroot jail. Restricted shell (rssh) [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Scenario: Your AIX server has OpenSSH installed and sFTP configured. How do you restrict sFTP users from accessing other shells (like ksh, bash, csh, scp, ftp, etc)? How do you prevent them from traversing through your directories and potentially doing all sorts of damage?</p>
<p>The answer: Set up rssh with chroot jail. Restricted shell (<a href="http://www.pizzashack.org/rssh/">rssh</a>) is a replacement for the standard shell (in AIX&#8217;s case, ksh) to be used with OpenSSH that lets you restrict shell access to only sftp and scp. It supports chroot jail which is a method to sandbox users and programs in a specific directory.<span id="more-3"></span></p>
<p>How do you set it up? Russell Martin wrote an <a href="http://www.sun.com/bigadmin/content/submitted/chroot_jail_rssh.jsp">excellent article</a> with detailed explanations and instructions on the subject. I recommend that you read the article to understand what we&#8217;re trying to achieve.</p>
<p>Ok, why am I writing this post then? Well, even with the abundance of information from Russell&#8217;s article, it still took me a long time to set it up on an AIX 5.3ML6 server running OpenSSH 4.3p2. So, I&#8217;m writing down everything that I&#8217;ve done just in case someone got stuck like me.</p>
<p><strong>(1) Installing rssh</strong></p>
<ol>
<li>If you do not have gcc or any other compiler installed on your system, head on to <a href="http://www-03.ibm.com/systems/p/os/aix/linux/download.html">IBM AIX Toolbox for Linux Applications download page</a> and grab the <em>gcc 4.0.0(5.3) RPM</em>. To install the gcc rpm, just copy it into your server and issue the command:<br />
<code>rpm --install gcc-4.0.0-1.aix5.3.ppc.rpm</code></li>
<li>Download <em>rssh 2.3.2 source tarball</em> from <a href="http://www.pizzashack.org/rssh/">http://www.pizzashack.org/rssh/</a> and copy it into a temporary directory in your server.</li>
<li>Unzip and untar the archive:<br />
<code>gunzip -d rssh-2.3.2.tar.gz<br />
tar xvf rssh-2.3.2.tar</code></li>
<li>The included <em>INSTALL</em> file provides instructions to configure, compile and install rssh. However, there isn&#8217;t a GNU libc compatible malloc present in AIX 5.3 and this will cause the configuration script to configure the MakeFile errornously (read about this problem <a href="http://wiki.buici.com/wiki/Autoconf_and_RPL_MALLOC">here</a>), so you will have to issue the following command before attempting to follow the instructions:<br />
<code>export ac_cv_func_malloc_0_nonnull=yes </code>Now we can start to run the commands:<br />
<code>./configure<br />
make<br />
su root<br />
make install</code>However, in my case <em>sftp-server</em> is located in the <em>/usr/sbin</em> directory, so for the first command, I have to do this instead:<br />
<code>./configure --with-sftp-server=/usr/sbin/sftp-server</code></li>
</ol>
<p><strong>(2) Creating an user and chroot jail</strong></p>
<ol>
<li>First of all, I&#8217;ll explain how I&#8217;ll be configuring my chroot jail. In my environment, I&#8217;ll be creating a special user called <em>sftpuser</em> for sFTP access. I will &#8220;jail&#8221; the user in the <em>/var/file_transfer</em> directory and the home directory for <em>sftpuser</em> will be <em>/var/file_transfer/sftpuser</em>.So in effect, when <em>sftpuser</em> logs in, he will land in the <em>/var/file_transfer/sftpuser</em> directory of the server but it will appear as <em>/sftpuser</em> directory to him. If he issues a <code>cd /</code> command, he will arrive in the <em>/var/file_transfer</em> directory of the server, but to him, he is already in the <em>root</em> directory.</li>
<li>The first step is to create the user in the system. I&#8217;m using <em>smit</em>, so I&#8217;ll explain using that method. Type in:<br />
<code>smit user</code><br />
Select the option <em>Add a User</em>.<br />
Key in <code>sftpuser</code> as the <em>User NAME</em>.<br />
Key in <code>/var/file_transfer/sftpuser</code> as the <em>HOME directory</em>.<br />
Key in <code>/usr/bin/ksh</code> as the <em>Initial PROGRAM</em> for now.<br />
Then, proceed and create the user.</li>
<li>After creating the user, we need to set a password for it. Type in:<br />
<code>smit user</code><br />
Select the option <em>Change a User&#8217;s Password</em> and set a password for it. After that, try to log in using telnet or SSH and you will be prompted to change the user password.</li>
<li>Now, we have to set the user&#8217;s shell to rssh so that the user will be controlled by it. Type in:<br />
<code>smit user</code><br />
Select the option <em>Change / Show Characteristics of a User</em><br />
Key in <code>sftpuser</code> as the <em>User NAME</em> and proceed.<br />
Key in <code>/usr/bin/rssh</code> as the <em>Initial PROGRAM</em> and proceed to save the changes. Now, we&#8217;re done creating the user in our system.</li>
<li>To set up the chroot jail, I modified the script downloaded from Russell&#8217;s article to cater for AIX 5.3. You can download the script <a title="Chroot jail script" href="http://www.snoozingdragon.com/wp-content/uploads/2007/09/chroot.zip">here</a>. Upload this to any directory on your server and chmod to make it executable:<br />
<code>chmod 755 chroot.sh</code>Before you run the script create the chroot directory first:<br />
<code>cd /var<br />
mkdir file_transfer</code>Then, edit the paths in the script:<br />
<code>CHROOTPATH=/var/file_transfer #defines the path of your chroot directory (the directory where you want to confine users to).<br />
USER_HOME_DIR=sftpuser #defines the path of the user's home relative to the <code>CHROOTPATH</code><br />
USER_NAME=sftpuser #defines the user name<br />
GROUP_NAME=staff #defines the user group<br />
SFTP_PATH=/usr/sbin/sftp-server<br />
SCP_PATH=/usr/bin/scp<br />
RSSH_PATH=/usr/bin/rssh<br />
CHROOT_HELPER_PATH=/usr/local/libexec/rssh_chroot_helper<br />
LDD_PATH=/usr/bin/ldd<br />
KSH_PATH1=/usr/bin/ksh93<br />
KSH_PATH2=/usr/bin/ksh<br />
PWD_PATH1=/bin/pwd<br />
PWD_PATH2=/usr/bin/pwd<br />
LIB_CRYPTO_PATH=/opt/freeware/lib/libcrypto.a<br />
LIB_C_PATH=/usr/lib/libc.a<br />
LIB_CRYPT_PATH=/usr/lib/libcrypt.a</code>After changing the paths, run the script:<br />
<code>./chroot.sh</code></li>
<li>The next step is to edit the rssh configuration file (mine resides is <em>/etc/rssh/rssh.cfg</em>). The comments in the configuration file is pretty self-explanatory. The resulting file should have the following uncommented lines:<br />
<code>logfacility = LOG_USER<br />
allowsftp<br />
umask = 022<br />
chrootpath = "/var/file_transfer"</code></li>
</ol>
<p>Congratulations! You have finished setting up rssh with chroot jail. Now you can sFTP in and see if all works fine.</p>
<p>In you run into any problems like the dreadful <em>Connection Closed</em>, you will have to check the <em>syslog</em> to see what the problem is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snoozingdragon.com/information-technology/tips-and-tricks/set-up-rssh-with-chroot-jail-on-aix-53-3.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
