<?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>Who... What... Where... &#187; How to</title>
	<atom:link href="http://www.yeltuor.com/articles/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yeltuor.com</link>
	<description>General things I find interesting</description>
	<lastBuildDate>Sun, 02 Aug 2009 09:58:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SVCHOST High CPU Usage Issue</title>
		<link>http://www.yeltuor.com/articles/how-to/svchost-high-cpu-usage-issue/</link>
		<comments>http://www.yeltuor.com/articles/how-to/svchost-high-cpu-usage-issue/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 22:18:01 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Automatic Updates]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=75</guid>
		<description><![CDATA[There are a number of threads in the Microsoft Windows Update Newsgroup and around other well known sites regarding the infamous SVCHOST Issue!
The main issue that people are reporting is the high CPU usage from the process SVCHOST.exe, generally fluctuating between 20 and 85 percent CPU usage, in some cases using all of the CPU [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p align="left">There are a number of threads in the Microsoft Windows Update Newsgroup and around other well known sites regarding the infamous SVCHOST Issue!</p>
<p align="left">The main issue that people are reporting is the high CPU usage from the process <em>SVCHOST.exe</em>, generally fluctuating between 20 and 85 percent CPU usage, in some cases using all of the CPU cycles and leaving the computer un-usable.<!--break --></p>
<p align="left">The cause of this is the Automatic Update service during its detection process; this is where the client PC either checks in to the local WSUS server or accesses the Windows Update site and determines which MS updates are required from the update catalogue.</p>
<p align="left"><em>All of this information is very good&#8230;</em> I hear you say, however where is the fix!</p>
<p align="left">Ok, after much web crawling and some testing, below is the method I have used for my clients which has proved sucessfull:</p>
<ol>
<li>
Firstly stop the Automatic Update service either through services.msc or with the command line <em>net stop &#8220;Automatic Updates&#8221;. </em>This will ensure the update process is as quick as possible.</li>
<li>
Next apply the first of two patches; an update to the Windows Update Agent, the current version is 2.0, this patch updates it to version 3.0 which is pushed out via WSUS v3.0:</p>
<ul>
<li>
<a title="WUA 3.0 - x86" href="http://download.windowsupdate.com/v7/windowsupdate/redist/standalone/WindowsUpdateAgent30-x86.exe">Windows Update Agent 3.0 &#8211; x86</a>
</li>
<li>
<a title="WUA 3.0 - x64" href="http://download.windowsupdate.com/v7/windowsupdate/redist/standalone/WindowsUpdateAgent30-x64.exe">Windows Update Agent 3.0 &#8211; x64</a>
</li>
<li>
<a title="WUA 3.0 - ia64" href="http://download.windowsupdate.com/v7/windowsupdate/redist/standalone/WindowsUpdateAgent30-ia64.exe">Windows Update Agent 3.0 &#8211; ia64</a>
</li>
</ul>
</li>
<li>Apply the hotfix for this issue, originally stated in <a title="KB916089" href="http://support.microsoft.com/kb/916089/">KB916089</a> and then superseded by <a title="KB927891" href="http://support.microsoft.com/kb/927891">KB927891</a> which provides an update for the Msi31.dll (exact name depends on operating version) with basically a more efficient detection algorithm in place:
<ul>
<li>
<a title="KB927891 - x86" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7A81B0CD-A0B9-497E-8A89-404327772E5A">Hotfix KB927891 &#8211; x86</a>
</li>
<li>
<a title="KB927891 - x64" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=ECF96769-BEB6-4F7F-AC92-5BAEFB5632A3">Hotfix KB927891 &#8211; x64</a>
</li>
</ul>
</li>
<li>
Finally reboot the client PC and start the Automatic Update service if it is not set to start automatically.
</li>
</ol>
<div>I hope this solution is effective for everyone who reads this article as it was for me, and there are only one statement to make; <em>Thanks again MS&#8230; another fine mess you have gotten us into.. however at least you are keeping us in our jobs!</em></div>
</div>

	Tags: <a href="http://www.yeltuor.com/articles/tag/automatic-updates/" title="Automatic Updates" rel="tag">Automatic Updates</a>, <a href="http://www.yeltuor.com/articles/tag/windows/" title="Windows" rel="tag">Windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/svchost-high-cpu-usage-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a Custom Windows Service</title>
		<link>http://www.yeltuor.com/articles/how-to/create-a-custom-windows-service/</link>
		<comments>http://www.yeltuor.com/articles/how-to/create-a-custom-windows-service/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 22:12:59 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Services]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=72</guid>
		<description><![CDATA[This article describes how to create a service on either Windows NT, 2000 or XP (untested on Vista). The service can run any application required and can be configured as any other service on the system can.
This information has been extracted from the Microsoft article KB137890, and requires two programs that can be found in [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p>This article describes how to create a service on either Windows NT, 2000 or XP (untested on Vista). The service can run any application required and can be configured as any other service on the system can.</p>
<p>This information has been extracted from the Microsoft article KB137890, and requires two programs that can be found in the Windows NT resource kit (or <a title="srvany.zip" href="http://www.yeltuor.com/s/files/srvany.zip" target="_blank">here</a>)</p>
<ul>
<li>SRVANY.EXE &#8211; Allows any application to run as a service</li>
<li>INSTSRV.EXE &#8211; Creates the system service</li>
</ul>
<h3>Create the service</h3>
<p>Use the INSTSRV.EXE application to create the system service, it requires two parameters; the first is the name of the service you want to create, the second is always the path to the SRVANY.EXE application.</p>
<blockquote><p>INSTSRV.EXE Notepad c:\SRVANY.EXE</p></blockquote>
<h3>Set the application as a service</h3>
<p>Next edit the registry and enter the path to the application that is required to run as a service. The location is the registry depends on the name of the service that was defined above; in this case <em>Notepad</em></p>
<blockquote><p>Run <em>regedit.exe</em></p>
<p>Navigate to HKLM\SYSTEM\CurrentControlSet\Services\Notepad</p>
<p>Create a new key called <em>Parameters</em></p>
<p>Under the new key create a new string value called <em>Application</em> and set its value to the path of the application <em>c:\WINDOWS\NOTEPAD.EXE</em></p></blockquote>
<p>Once created this service can be managed through the services mmc to set its startup type, recovery response etc.</p>
<p>To make this process easier, the following code can be placed into a batch file and run (with the correct parameters) to create the service and congfiure the registry. It assumes that INSTSRV.EXE is already in a search path and that SRVANY.EXE is located in the root of the C drive.</p>
<blockquote><p>@echo off</p>
<p>rem #################################<br />
rem ## This batch file created a new system service ##<br />
rem ## ensure the correct parameters are usedÂ Â Â Â Â Â         ##<br />
rem #################################</p>
<p>rem Parameter 1 should be the name of the service<br />
rem Parameter 2 should be the path to the executable</p>
<p>echo Creating Service<br />
INSTSRV.EXE %1 c:\SRVANY.EXE</p>
<p>echo Creating Registry Keys<br />
reg add &#8220;HKLM\SYSTEM\CurrentControlSet\Services\%1\Parameters&#8221;<br />
reg add &#8220;HKLM\SYSTEM\CurrentControlSet\Services\%1\Parameters&#8221; /v Application /d %2</p></blockquote>
</div>

	Tags: <a href="http://www.yeltuor.com/articles/tag/services/" title="Services" rel="tag">Services</a>, <a href="http://www.yeltuor.com/articles/tag/windows/" title="Windows" rel="tag">Windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/create-a-custom-windows-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows CLI &#8211; Tasklist</title>
		<link>http://www.yeltuor.com/articles/how-to/windows-cli-tasklist/</link>
		<comments>http://www.yeltuor.com/articles/how-to/windows-cli-tasklist/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 22:09:31 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Services]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=70</guid>
		<description><![CDATA[The command line tool tasklist without any switches will simply display the local currently running processes and if the /S parameter is used process&#8217;s running on a remote machine can be queried.
Now all of this isn&#8217;t really worth writing about you might say, however one switch that I found useful was the command tasklist /svc [...]]]></description>
			<content:encoded><![CDATA[<p>The command line tool <em>tasklist</em> without any switches will simply display the local currently running processes and if the <em>/S</em> parameter is used process&#8217;s running on a remote machine can be queried.</p>
<p>Now all of this isn&#8217;t really worth writing about you might say, however one switch that I found useful was the command <em>tasklist /svc</em> ; this will display a list of all running processes along with any related services attached to that process.</p>

	Tags: <a href="http://www.yeltuor.com/articles/tag/cli/" title="CLI" rel="tag">CLI</a>, <a href="http://www.yeltuor.com/articles/tag/services/" title="Services" rel="tag">Services</a>, <a href="http://www.yeltuor.com/articles/tag/windows/" title="Windows" rel="tag">Windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/windows-cli-tasklist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Email Advanced</title>
		<link>http://www.yeltuor.com/articles/how-to/php-email-advanced/</link>
		<comments>http://www.yeltuor.com/articles/how-to/php-email-advanced/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 22:48:10 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=63</guid>
		<description><![CDATA[For a simple introduction to the mail() function see the  PHP_Advanced article. This article describes some of the more advanced features  that can be achieved through the mail function.

Assign Names to email addresses
When receiving an email you will notice that the To field often  contains a name rather than the email address [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p>For a simple introduction to the <strong>mail()</strong> function see the  PHP_Advanced article. This article describes some of the more advanced features  that can be achieved through the <em>mail</em> function.</p>
<p><a title="Assign_Names_to_email_addresses" name="Assign_Names_to_email_addresses"></a></p>
<h3>Assign Names to email addresses</h3>
<p>When receiving an email you will notice that the <em>To</em> field often  contains a name rather than the email address it was send to.</p>
<blockquote><p>&lt;HTML&gt;<br />
&lt;BODY&gt;<br />
&lt;?PHP<br />
mail(&#8216;bob@email.com&#8217;, &#8216;Test email&#8217;,<br />
&#8216;This is a test email&#8217;,<br />
&#8220;To: Bob Jones &lt;bob@email.com&gt;\n&#8221; .<br />
&#8220;From: Jane Jones &lt;jane@email.com&gt;\n&#8221; .<br />
&#8220;cc: Another Person &lt;another@email.com&gt;\n&#8221; .<br />
&#8220;Bcc: Yet Another &lt;more@email.com\n&gt;&#8221;);<br />
?&gt;<br />
&lt;/BODY&gt;<br />
&lt;/HTML&gt;</p></blockquote>
<p><a title="HTML_Emails" name="HTML_Emails"></a></p>
<h3>HTML Emails</h3>
<p>The next stage is sending HTML email messages, this allows for standard HTML  tags to be used when composing the message content. When sending a message in  HTML it must be declared that is it HTML in the header of the email, this is  done through both the <em>Content-type:</em> and <em>MIME-Version headers&#8217;:</em></p>
<blockquote><p>&lt;HTML&gt;<br />
&lt;BODY&gt;<br />
&lt;?PHP<br />
mail(&#8216;bob@email.com&#8217;, &#8216;Test email&#8217;,<br />
&#8216;&lt;html&gt;&lt;body&gt;&lt;b&gt;Hello! World&lt;/b&gt; \n &lt;i&gt;this is a test email&lt;/i&gt;&lt;/body&gt;&lt;/html&gt;&#8217;,<br />
&#8220;MIME-Version: 1.0\n&#8221; .<br />
&#8220;Content-type: text/html; charset=iso-8859-1&#8243;);<br />
?&gt;<br />
&lt;/BODY&gt;<br />
&lt;/HTML&gt;</p></blockquote>
<p>The <em>MIME-Version</em> (<strong>M</strong>ulitpurpose  <strong>I</strong>nternet <strong>M</strong>ail <strong>E</strong>xtensions)  header indicates that the email follows the internet standards, following that  the <em>Content-type</em> header can declare the format being used;  <em>text/html;</em> followed by the <a class="external text" title="Character-sets" rel="nofollow" href="http://www.iana.org/assignments/character-sets" target="_blank">character set</a> being used <em>charset=iso-8859-1</em></p>
<p><a title="Mixed_Format_Emails" name="Mixed_Format_Emails"></a></p>
<h3>Mixed Format Emails</h3>
<p>Although the majority of email clients support HTML email messages, there are  some that don&#8217;t. The mixed format ensures that the email clients that do support  it see the HTML formatted message, where as the ones that don&#8217;t see a plain text  version.</p>
<p>The technique involved is to actually send two versions of the message and  rely on the email client to read and understand <em>Content-Type:  multipart/alternative;</em> header which will make the client only display the  supported version.</p>
<blockquote><p>*** PHP code not fully completed yet ***</p></blockquote>
<p><a title="Emailing_Attachments" name="Emailing_Attachments"></a></p>
<h3>Emailing Attachments</h3>
<p>Emailing file Attachments work in the same way that mixed format email  messages do. The header <em>Content-Type: multipart/mixed;</em> is used and the  message split into two parts; one the message and the other the file  attachment(s).</p>
<p>This is more complicated than previous email examples, all the steps required  are explained below. The examples assume that the email details including the  file to be emailed have been submitted to the PHP page from another page.</p>
<blockquote><p>$to      = $_POST['to'];<br />
$from    = $_POST['from'];<br />
$subject = $_POST['subject'];<br />
$message = $_POST['message'];</p></blockquote>
<p><a title="Attributes_of_the_file_attachment" name="Attributes_of_the_file_attachment"></a></p>
<h4>Attributes of the file attachment</h4>
<p>The first stage is to extract the required attributed from the file that has  been passed. The file details in PHP are stored in an array named  <em>$_FILES</em> which are extracted to variables.</p>
<blockquote><p>// example: /tmp/phpfile12345 &#8211; tmp file name and loc where uploaded<br />
$file_loc  = $_FILES['fileatt']['tmp_name'];<br />
// example: text/text &#8211; will vary depending on file type<br />
$file_type = $_FILES['fileatt']['type'];<br />
// example: mywork.txt &#8211; always the name of the file<br />
$file_name = $_FILES['fileatt']['name'];</p></blockquote>
<p><a title="Extract_data_from_file_attachment" name="Extract_data_from_file_attachment"></a></p>
<h4>Extract data from file attachment</h4>
<p>The data within the file is required to be placed into a variable then used  Base64 encoding to convert (possible) binary data into text. The <a class="external text" title="PHP function is_uploaded_file" rel="nofollow" href="http://uk.php.net/is_uploaded_file" target="_blank">is_uploaded_file</a> function is  used to ensure that the file <em>was</em> in fact uploaded by an http get  command, this helps to ensure no malicious activity.</p>
<blockquote><p>if (is_uploaded_file($file_loc)) {<br />
// Read the file in &#8216;rb&#8217; read binary<br />
$file = fopen($file_loc,&#8217;rb&#8217;);<br />
$filedata = fread( $file <em>(comma)</em> filesize ($file_loc));<br />
// Base64 encode the file data<br />
$filedata = chunk_split(base64_encode($filedata));</p></blockquote>
<p>The data is now in a format that is ready to be emailed, the next stage is  producing the standard mail parameters.</p>
<p><a title="Producing_mail_function" name="Producing_mail_function"></a></p>
<h4>Producing mail function</h4>
<p>The basic mail parameters are set in the same manor, the diffrences come in  the <em>header</em> and <em>message</em> parameters</p>
<p>The header parameter contains the <em>MIME</em> version, the  <em>Content-Type: multipart/mixed;</em> declares that there will be an  attachment, finally the boundary string (containing random text) is used as a  marker to split the message into the two sections.</p>
<blockquote><p>&#8220;\nMIME-Version: 1.0\n&#8221; .<br />
&#8220;Content-Type: multipart/mixed;\n&#8221; .<br />
&#8221; boundary=\&#8221;==Multipart_Boundary_x45985365x\&#8221;";</p></blockquote>
<p>The message section starts with a declaration which MIME compatible email  clients will not show, next is the Multipart Boundary string denoting the  beginning of the first section. Following this the usual header information is  declared, following by the desired message text.</p>
<blockquote><p>&#8220;This is a multi-part message in MIME format. you should not see this\n\n&#8221; .<br />
&#8220;&#8211;==Multipart_Boundary_x45985365x\n&#8221; .<br />
&#8220;Content-Type: text/plain; charset=\&#8221;iso-8859-1\&#8221;\n&#8221; .<br />
&#8220;Content-Transfer-Encoding: 7bit\n\n&#8221; .<br />
&#8220;This is the message contents, there should be a file attached to this message&#8221;</p></blockquote>
<p>After the text of the message, the next part is the message attachment which  follows the same format as above.</p>
<blockquote><p>&#8220;&#8211;==Multipart_Boundary_x45985365x\n&#8221; .<br />
&#8220;Content-Type: {$file_type};\n&#8221; .<br />
&#8221; name=\&#8221;{$file_} \n&#8221; .<br />
&#8220;Content-Disposition: attachment;\n&#8221; .<br />
&#8221; filename=\&#8221;{$file_name}\&#8221;\n&#8221; .<br />
&#8220;Content-Transfer-Encoding: base64\n\n&#8221; .<br />
$filedata . &#8220;\n\n&#8221; .<br />
&#8220;&#8211;==Multipart_Boundary_x45985365x&#8211;\n&#8221;;</p></blockquote>
<p>Then message should always have the message boundary string followed by  <strong>&#8211;</strong> to signify the end.</p>
<p>To see the fully working source code, please see <a class="external text" title="PHP Email Code" rel="nofollow" href="http://www.yeltuor.com/s/files/PHP_Mail.rar">here</a></p>
<p>For more information on different MIME types see <a class="external text" title="MIMe types" rel="nofollow" href="http://www.ietf.org/rfc/rfc2045.txt" target="_blank">here</a><br />
Many thanks to the tutorials where this information came from, <a class="external text" title="w3schools" rel="nofollow" href="http://www.w3schools.com/php/default.asp" target="_blank">W3Schools</a> &amp; <a class="external text" title="PHP Net" rel="nofollow" href="http://uk.php.net/manual/en/introduction.php" target="_blank">PHP</a> &amp; <a class="external text" title="Sitepoint" rel="nofollow" href="http://www.sitepoint.com/article/advanced-email-php" target="_blank">sitepoint</a></div>

	Tags: <a href="http://www.yeltuor.com/articles/tag/email/" title="Email" rel="tag">Email</a>, <a href="http://www.yeltuor.com/articles/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.yeltuor.com/articles/tag/web/" title="Web" rel="tag">Web</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/php-email-advanced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dropbear SSH Server &amp; Client</title>
		<link>http://www.yeltuor.com/articles/how-to/dropbear-ssh-server-client/</link>
		<comments>http://www.yeltuor.com/articles/how-to/dropbear-ssh-server-client/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 22:11:39 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=38</guid>
		<description><![CDATA[The Dropbear SSH server and client supports industry standard SSH1 and SSH2 protocols and is available for various Linux distributions. Version 0.45 compiled for Debian PPC can be found here, this is what I have used as the SSH server for my Buffalo TeraStation.
The first step is to copy the files to the TeraStation, then [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p>The <a title="Dropbear" href="http://matt.ucc.asn.au/dropbear/dropbear.html" target="_blank">Dropbear</a> SSH server and client supports industry standard SSH1 and SSH2 protocols and is available for various Linux distributions. Version 0.45 compiled for Debian PPC can be found <a title="Dropbear v0.45" href="http://www.yeltuor.com/s/files/dropbear.tgz" target="_blank">here</a>, this is what I have used as the SSH server for my Buffalo TeraStation.</p>
<p>The first step is to copy the files to the TeraStation, then extract them using the tar command</p>
<blockquote><p>root@HD-HTGL113:/# cd /</p>
<p>root@HD-HTGL113:/# tar -xzf /mnt/array1/share/dropbear.tgz</p></blockquote>
<p>The next step is optional, however in the interest of security recommended! This is to generate a new SSL public and private key for the server to use. Before we can do this the old keys need to be deleted</p>
<blockquote><p>root@HD-HTGL113:/# rm /etc/dropbear/dropbear_rsa_host_key</p>
<p>root@HD-HTGL113:/# rm /etc/dropbear/dropbear_dss_host_key</p>
<p>root@HD-HTGL113:/# dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key</p>
<p>root@HD-HTGL113:/# dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key</p></blockquote>
<p>The final step is to reboot the TeraStation, during startup the Dropbear SSH daemon will start. A recommended free SSH client to use is <a title="PuTTy SSH Client" href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/" target="_blank">PuTTy</a></div>

	Tags: <a href="http://www.yeltuor.com/articles/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.yeltuor.com/articles/tag/ssh/" title="SSH" rel="tag">SSH</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/dropbear-ssh-server-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cygwin</title>
		<link>http://www.yeltuor.com/articles/how-to/cygwin/</link>
		<comments>http://www.yeltuor.com/articles/how-to/cygwin/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 22:08:09 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=35</guid>
		<description><![CDATA[Cygwin is a Windows program that emulates a Linux like environment for your Windows PC, it is easy to install and provides modular approach to adding tools to the environment. The key to Cygwin working is the cygwin1.dll that gets installed, it provides a Linux API emulation layer for the applications that are specifically compiled [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p>Cygwin is a Windows program that emulates a Linux like environment for your Windows PC, it is easy to install and provides modular approach to adding tools to the environment. The key to Cygwin working is the <em>cygwin1.dll</em> that gets installed, it provides a Linux API emulation layer for the applications that are specifically compiled for the Cygwin environment.</p>
<p>For more in-depth information into how the Cygwin application works see <a title="Cygwin Home" href="http://www.cygwin.com/" target="_blank">Cygwin</a></p>
<p>This article some key setup tips and how to configure what I find one the the most useful aspects; the SSH server with Cygwin.</p>
<h3>Cygwin Tools in Windows Command Prompt</h3>
<p>All of the default tools provided with Cygwin are very useful, however I did find my self trying to use Windows tools whilst in Cygwin and Linux tools whilst in Windows!</p>
<p>To solve this simply add the Cygwin <em>bin</em> folder (C:\cygwin\bin) into your Windows <em>Path</em> environment variable and there you go. From a command prompt you can use both the <em>dir </em>or <em>ls </em>commands depending on your mood.</p>
<blockquote><p>Right Click on <em>My Computer </em>then select <em>Properties</em></p>
<p>Choose <em>Advanced </em>then <em>Environment Variables</em></p>
<p>Under <em>System variables </em>edit the variable <em>Path </em>and add the Cygwin bin folder,<br />
i.e. <em>;c:\cygwin\bin</em></p></blockquote>
<h3>Setting-up SSH Access</h3>
<p>When accessing you Windows PC remotely, it only supports full GUI access or unencrypted Telnet traffic. With Cygwin you can install the <a title="OpenSSH" href="http://www.openssh.com/">OpenSSH </a>server which is an open source SSH connectivity tool supporting various well known featured including both SSH1 and SSH2 protocols.</p>
<p>The implementation below explains how to setup OpenSSH through Cygwin which will run a service on your Windows PC called <em>CYGWIN sshd</em></p>
<h4>Re-requisites required</h4>
<p>When authenticating to your PC via SSH it will use the existing Windows user accounts to authenticate, the user account that you want to use must have a password set.<br />
Ensure that Cygwin is installed along with the package called <em>openssh</em></p>
<h4>Add Environment Variables</h4>
<blockquote><p>Right Click on <em>My Computer</em> then select <em>Properties</em></p>
<p>Choose <em>Advanced</em> then <em>Environment Variables</em></p>
<p>Under <em>System variables</em> click <em>New</em> with the name of <em>CYGWIN</em> and a value of <em>ntsec</em></p>
<p>Under <em>System variables</em> edit the variable <em>Path</em> and add the Cygwin bin folder, i.e. <em>;c:\cygwin\bin</em> <strong>NB</strong> do not do this part again if you have already in the previous post.</p></blockquote>
<h4>SSH Host config</h4>
<p>Open a Cgywin console and run command</p>
<blockquote><p>ssh-host-config</p></blockquote>
<p>When prompted, answer the following:</p>
<blockquote><p><em>Privilege Separation</em> answer <em>yes</em></p>
<p><em>Create local user sshd</em> answer <em>yes</em></p>
<p>I<em>nstall SSHD as a service</em> answer <em>yes</em></p>
<p><em>CYGWIN=</em> answer <em>ntsec </em></p></blockquote>
<p><strong>NB</strong>: The <em>ntesc</em> answer tells Cygwin to authenticate using the local Windows accounts<br />
<strong><br />
</strong></p>
<h4>Start the SSH service to allow connections</h4>
<p>The Windows service will default to start automatically every-time Windows starts, to start the service manually run one of the two commands</p>
<blockquote><p>net start sshd<br />
or<br />
cygrunsrv &#8211;start sshd</p></blockquote>
<h4>Synchronise local Windows user information with Cygwin</h4>
<p>Run the two commands from within Cygwin</p>
<blockquote><p>mkpasswd &#8211;local &gt; /etc/passwd</p>
<p>mkpasswd &#8211;group &gt; /etc/group</p></blockquote>
<h4>Testing SSH Works</h4>
<p>Use a SSH client such as <a title="PuTTy" href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/" target="_blank">PuTTy</a> and then connect to <em>localhost</em> on port 22 (SSH Port)<br />
Alternatively use the Cygwin SSH client:</p>
<blockquote><p>cygwin# SSH user@localhost</p></blockquote>
<p><strong>NB</strong>: The port used by OpenSSH can be changed in the file <em>c:\cygwin\ssh-host-config</em> under <em>port_number</em>. After changing the port number you must re-start the <em>CYGWIN sshd </em>serivce for changes to come into effect.</div>

	Tags: <a href="http://www.yeltuor.com/articles/tag/ssh/" title="SSH" rel="tag">SSH</a>, <a href="http://www.yeltuor.com/articles/tag/windows/" title="Windows" rel="tag">Windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/cygwin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic DNS (DYDNS) &#8211; dme_update</title>
		<link>http://www.yeltuor.com/articles/how-to/dynamic-dns-dydns-dme_update/</link>
		<comments>http://www.yeltuor.com/articles/how-to/dynamic-dns-dydns-dme_update/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 22:04:45 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[DYDNS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=31</guid>
		<description><![CDATA[Dynamic DNS is a system that allows for a DNS entry, commonly internet facing to be updated in real-time. This enables a connection to be established to a Dynamic IP Address (generally issued by an ISP) via a DNS name.
One implementation of this is DME Update which uses a simple Perl script to get the [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p>Dynamic DNS is a system that allows for a DNS entry, commonly internet facing to be updated in real-time. This enables a connection to be established to a Dynamic IP Address (generally issued by an ISP) via a DNS name.</p>
<p>One implementation of this is <a title="DME Update" href="http://www.smood.com/dme_update/" target="_blank">DME Update</a> which uses a simple Perl script to get the current external IP address and forms a URL which is used to update the DNS provider <a title="DNS Made Easy" href="http://www.dnsmadeeasy.com/" target="_blank">DNS Made Easy</a></p>
<p>My use for this has been through my Buffalo TeraStation which runs a cut down version of Linux and has the DME Update script running as a cron job. This allows me to always be able reach it without remembering an IP address.</p>
<p>The implementation for this is relatively simply, the requirements are:</p>
<ul>
<li>wget &#8211; A well known command line HTTP retrieval program</li>
<li>Perl installed (exact version and pm files are unknown)</li>
<li>The dme_update script and config files which are <a title="DMS update (Dynamic DNS )" href="http://www.yeltuor.com/s/files/DynamicDNS.tgz">here</a></li>
</ul>
<p>First of all edit the <em>config.pl</em> file and set the <em>$nic </em>variable to the name of the network interface that should be doing the lookup, also set the <em>$getip_ext </em>variable to either <em>0</em> to use the IP address of the NIC, or <em>1</em> to use the external webpage quoted.</p>
<p>The next stage is to provide the DNS record details that need to be updated on DNS Made Easy, this should be placed in the <em>records</em> folder in a file with the following information</p>
<blockquote><p><span class="fixedwidth">username<br />
password<br />
DNS Made Easy record ID<br />
current record IP address</span></p></blockquote>
<p>An example is:</p>
<blockquote><p><span class="fixedwidth">myUsername<br />
myPassword<br />
1234567<br />
22.22.22.1</span></p></blockquote>
<p>To update the DNS record run the following:</p>
<blockquote><p>perl /etc/cron.d/dyDNS/dme_update -r myRecordFile</p></blockquote>
<p>I&#8217;m sure there are many more implementations avaliable and for many different DNS providers, however this appealed to me due to the simplicity. The end result from the Perl scirpt is a formatted URL which either updates the DNS entry if required, or does nothing. Example URL is:</p>
<blockquote><p>http://www.dnsmadeeasy.com/servlet/updateip?username=myUsername&amp;password=myPassword&amp;id=1234567&amp;ip=22.22.22.2</p></blockquote>
</div>

	Tags: <a href="http://www.yeltuor.com/articles/tag/dns/" title="DNS" rel="tag">DNS</a>, <a href="http://www.yeltuor.com/articles/tag/dydns/" title="DYDNS" rel="tag">DYDNS</a>, <a href="http://www.yeltuor.com/articles/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.yeltuor.com/articles/tag/perl/" title="Perl" rel="tag">Perl</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/dynamic-dns-dydns-dme_update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Additional AD User Account Information</title>
		<link>http://www.yeltuor.com/articles/how-to/additional-ad-user-account-information/</link>
		<comments>http://www.yeltuor.com/articles/how-to/additional-ad-user-account-information/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 21:54:55 +0000</pubDate>
		<dc:creator>shane</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[User]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.yeltuor.com/?p=27</guid>
		<description><![CDATA[There is a lot of information that Active Directory stores in its database that is not necessarily available through common tools such as Active Directory Users and Computers MMC.
With the Active Directory Users and Computers MMC installed, and by using part of Microsoft&#8217;s Account Lockout and Management Tool, extra user account information can be made [...]]]></description>
			<content:encoded><![CDATA[<p>There is a lot of information that Active Directory stores in its database that is not necessarily available through common tools such as <em>Active Directory Users and Computers</em> MMC.</p>
<p>With the Active Directory Users and Computers MMC installed, and by using part of Microsoft&#8217;s <a title="MS Account Lockout and Management Tools" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7AF2E69C-91F3-4E63-8629-B999ADDE0B9E&amp;displaylang=en" target="_blank">Account Lockout and Management Tool</a>, extra user account information can be made accessible, this includes:</p>
<ul>
<li>Password last set time</li>
<li>Password expiry time</li>
<li>SID and GUID</li>
<li>Last Logon \ Logoff \ Bad Password time</li>
<li>Logon \ Bad Password count</li>
</ul>
<p><strong>NB:</strong> The last logon and logoff attributes within a Windows 2000 domain are <em>not</em> replicated between domain controllers&#8230; therefore not accurate. However this has been fixed with AD 2003 by adding another attribute into the schema called lastLogonTimestamp which <em>is </em>replicated.</p>
<p>The first step is to get the acctinfo.dll available from the above tool or here.</p>
<p>Next, copy the file to C:\WINDOWS\SYSTEM32 then run the command</p>
<blockquote><p><em>regsvr32 C:\WINDOWS\SYSTEM32\acctinfo.dll</em></p></blockquote>
<p>This will register the dll, when opening the Users and Computers console you will notice another tab called <em>Additional Account Info</em>. This is where the extra information is displayed.</p>

	Tags: <a href="http://www.yeltuor.com/articles/tag/active-directory/" title="Active Directory" rel="tag">Active Directory</a>, <a href="http://www.yeltuor.com/articles/tag/user/" title="User" rel="tag">User</a>, <a href="http://www.yeltuor.com/articles/tag/windows/" title="Windows" rel="tag">Windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.yeltuor.com/articles/how-to/additional-ad-user-account-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
