<?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>LaslowNET &#187; Hack</title>
	<atom:link href="http://laslow.net/category/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://laslow.net</link>
	<description></description>
	<lastBuildDate>Thu, 10 May 2012 20:19:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Nightmare: Pulseaudio, Nvidia HDMI Audio, and CentOS</title>
		<link>http://laslow.net/2012/02/27/nightmare-pulseaudio-nvidia-hdmi-audio-and-centos/</link>
		<comments>http://laslow.net/2012/02/27/nightmare-pulseaudio-nvidia-hdmi-audio-and-centos/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 07:20:22 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Pulseaudio]]></category>
		<category><![CDATA[Rage]]></category>

		<guid isPermaLink="false">http://laslow.net/?p=1379</guid>
		<description><![CDATA[I&#8217;m in the process of converting my home server in to a CentOS SMB server and XBMC combination box. In the process, though, I ran in to a problem where PulseAudio would recognise the HDMI audio capabilities of the video card (after installing the Nvidia binary drivers), but wouldn&#8217;t output any sound. After a lot [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of converting my home server in to a CentOS SMB server and XBMC combination box. In the process, though, I ran in to a problem where PulseAudio would recognise the HDMI audio capabilities of the video card (after installing the Nvidia binary drivers), but wouldn&#8217;t output any sound. After a lot of digging and swearing, I finally fixed it by doing the following:</p>
<p>As a normal user, open a Terminal window and enter <em>alsamixer</em>. Press F6 and then unmute all of the audio channels (do so by selecting them with the arrow keys, and then pressing &#8216;m&#8217;. When done, press ESC to exit.</p>
<p>After this, <em>su -</em> to assume root, and then type <em>aplay -l </em>to get a list of your audio devices. In my case, I&#8217;ve disabled the onboard audio, so the only devices are the Nvidia ones. The output will look something like this:</p>
<blockquote><p>root@wormwood ~]# aplay -l<br />
**** List of PLAYBACK Hardware Devices ****<br />
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0</p></blockquote>
<p>Note that while there are four devices, the first one (which Pulseaudio selects by default) doesn&#8217;t do anything. To get this to work, we need to tell it to use the second device (#7). This isn&#8217;t horribly easy. If you have another sound card, note the device numbers listed for it above &#8211; you&#8217;ll need them in a minute.</p>
<p>Finally we can tell Pulseaudio to actually use the correct devices. Still as root, open up <em>/etc/pulse/default.pa</em> and find these lines:</p>
<blockquote><p>### Automatically load driver modules depending on the hardware available<br />
#.ifexists module-udev-detect.so<br />
#load-module module-udev-detect<br />
#.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack udev support)<br />
#load-module module-detect<br />
#.endif</p></blockquote>
<p>Now, comment them all out as I have done above. This prevents Pulseaudio from trying to be smart. Now, scroll to the end of the file and add the following line (if you have more than one audio device, you will need to add it multiple times with the correct card and device numbers that you gathered from aplay above):</p>
<blockquote><p>load-module module-alsa-sink device=hw:0,7</p></blockquote>
<p>Now simply do a <em>killall pulseaudio</em> and try to play something. You should have audio output over HDMI now!</p>
<p><strong><span style="color: #ff0000;">Edit:</span></strong> Just a bit of follow-up if you&#8217;re having trouble with the sound muting after every reboot. As root, enter the following in a shell:</p>
<blockquote><p>touch /etc/asound.state</p>
<p>chmod 777 /etc/asound.state</p></blockquote>
<p>Now, as a standard user, follow the instructions above to unmute the Nvidia device channels via <em>alsamixer</em>. Once you&#8217;ve confirmed sound is working again, from a shell (still <strong><em>not</em></strong> as root!) type:</p>
<blockquote><p>alsactl store</p></blockquote>
<p>Now go back as root and:</p>
<blockquote><p>chmod 644 /etc/asound.state</p></blockquote>
<p>When you reboot, you shouldn&#8217;t have to unmute through alsamixer anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2012/02/27/nightmare-pulseaudio-nvidia-hdmi-audio-and-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make SEP Manager Console Suck a Little Less</title>
		<link>http://laslow.net/2011/06/27/make-sep-manager-console-suck-a-little-less/</link>
		<comments>http://laslow.net/2011/06/27/make-sep-manager-console-suck-a-little-less/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 18:35:18 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[SEP]]></category>
		<category><![CDATA[Symantec]]></category>

		<guid isPermaLink="false">http://laslow.net/?p=1251</guid>
		<description><![CDATA[My biggest complaint about Symantec End Point is that the manager console is slow. On a dual quad-core server with 16GB of RAM, it simply crawls. Sometimes, even when the system load is basically zero, the console is almost unusable. I did a little digging and found that the manager console is, in fact, written in [...]]]></description>
			<content:encoded><![CDATA[<p>My biggest complaint about Symantec End Point is that the manager console is <em>slow.</em> On a dual quad-core server with 16GB of RAM, it simply crawls. Sometimes, even when the system load is basically zero, the console is almost unusable. I did a little digging and found that the manager console is, in fact, written in Java &#8211;  that explains a lot.</p>
<p>Fortunately, because it&#8217;s written in Java there&#8217;s a little trick you can you to speed things up a little, assuming you have a decent amount of free RAM. The manager console is typically launched through <em>sesm.bat</em>, which is located (in a default install on an x64 server) in <em>&#8220;C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\bin\&#8221;</em>. Open that .bat file in notepad, and you&#8217;ll see this:</p>
<blockquote><p>@start &#8220;SESM&#8221; &#8220;C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\jdk\bin\javaw.exe&#8221; <span style="color: #ff0000;"><strong>-Xms128m</strong></span> -Xmx1024m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=40 -Dscm.console.conf=&#8221;C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\tomcat\etc\conf.properties&#8221; -jar &#8220;C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\tomcat\webapps\scm\clientpkg\scm-ui.jar&#8221;</p></blockquote>
<p>Note the bit that I&#8217;ve highlighted above in red. Boost that up a little (I set it to 512m), save, and then re-open the management console. You should notice a significant difference in how fast the console operates now.</p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2011/06/27/make-sep-manager-console-suck-a-little-less/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HDD Replacement: Acer Aspire One and ZIF Drives</title>
		<link>http://laslow.net/2011/05/27/hdd-replacement-acer-aspire-one-and-zif-drives/</link>
		<comments>http://laslow.net/2011/05/27/hdd-replacement-acer-aspire-one-and-zif-drives/#comments</comments>
		<pubDate>Fri, 27 May 2011 21:01:45 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Acer]]></category>
		<category><![CDATA[Aspire One]]></category>
		<category><![CDATA[ZIF]]></category>

		<guid isPermaLink="false">http://laslow.net/?p=1235</guid>
		<description><![CDATA[I ordered a 30GB 1.8&#8243; ZIF drive to replace the crappy 8GB SSD drive in my old Acer Aspire One netbook. When I got the drive (a Samsung HS030GB) I very quickly discovered that the ZIF ribbon cable that came stock with the netbook didn&#8217;t work with it. The problem, it seems, is that Samsung [...]]]></description>
			<content:encoded><![CDATA[<p>I ordered a 30GB 1.8&#8243; <a href="http://en.wikipedia.org/wiki/Zero_Insertion_Force" target="_blank">ZIF</a> drive to replace the crappy 8GB SSD drive in my old Acer Aspire One netbook. When I got the drive (a Samsung HS030GB) I very quickly discovered that the ZIF ribbon cable that came stock with the netbook didn&#8217;t work with it. The problem, it seems, is that Samsung uses a non-standard ZIF connector that is incompatible with 0.35mm ZIF cables (which are the standard). So, I shaved down one end of the ribbon and promptly broke it. Then, being an idiot, ordered a replacement set of cables on eBay without checking the thickness first (the listing stated they were for Samsung drives, although I should have known better than take that at face value).</p>
<p>I got the new set of cables today and, of course, they were all 0.35mm thick as well. I tried a few techniques to try to make the ends thinner but eventually just ended up with a bunch of butchered ribbons.</p>
<div id="attachment_1236" class="wp-caption aligncenter" style="width: 310px"><a href="http://laslow.net/wp-content/uploads/2011/05/zif.jpg"><img class="size-medium wp-image-1236" title="ZIF Drive and Cable" src="https://laslow.net/wp-content/uploads/2011/05/zif-300x139.jpg" alt="ZIF Drive and Cable" width="300" height="139" /></a><p class="wp-caption-text">Remember kids, always review the specs of the drive and cable *before* ordering!</p></div>
<p>So I&#8217;ve ordered another batch of cables, this time making sure that one end has the correct thickness. Hopefully I&#8217;ll have a working netbook in a few weeks.</p>
<p><strong>Update:</strong> The new ZIF cable came in (ProTip: when ordering ZIF ribon cables, if you need a smaller-than-0.35mm end, look for one where one end is blue (as pictured above), and the other end is white. The white end will be the smaller size)! Surprisingly, it fit, and after making a few modifications to the case (mainly removing the screw mounts for the old SSD) the new drive just dropped right in to place. Xubuntu is now installing, so I finally have a functional netbook again!</p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2011/05/27/hdd-replacement-acer-aspire-one-and-zif-drives/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Shaw Cable Pulls a Rogers; Hijacks NX Records</title>
		<link>http://laslow.net/2011/05/01/shaw-cable-pulls-a-rogers-hijacks-nx-records/</link>
		<comments>http://laslow.net/2011/05/01/shaw-cable-pulls-a-rogers-hijacks-nx-records/#comments</comments>
		<pubDate>Mon, 02 May 2011 05:31:41 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA["It's a Feature"]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Bullshit]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Hijacking]]></category>
		<category><![CDATA[Shaw]]></category>

		<guid isPermaLink="false">http://laslow.net/?p=1213</guid>
		<description><![CDATA[The last time I wrote about NX Domains, it was because I noticed that Rogers wireless was hijacking them on my phone. Now, it appears that Shaw Cable is doing the same. I use OpenDNS, so I&#8217;m used to search pages coming up when I mistype URLs, however that is something I&#8217;d opt&#8217;ed in to. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://laslow.net/wp-content/uploads/2011/05/Shaw.png"><img class="alignright size-full wp-image-1219" title="Shaw Cable" src="https://laslow.net/wp-content/uploads/2011/05/Shaw.png" alt="Shaw Cable" width="154" height="70" /></a>The last time I wrote about <a href="http://en.wikipedia.org/wiki/DNS_hijacking" target="_blank">NX Domains</a>, it was because I noticed that <a href="http://laslow.net/2010/06/07/rogers-wireless-hijacks-wildcard-dns-records/" target="_blank">Rogers wireless was hijacking them on my phone</a>. Now, it appears that <a href="http://www.shaw.ca" target="_blank">Shaw Cable</a> is doing the same.</p>
<p>I use <a href="http://www.opendns.com/" target="_blank">OpenDNS</a>, so I&#8217;m used to search pages coming up when I mistype URLs, however that is something I&#8217;d opt&#8217;ed in to. You can imagine my surprise when, after mistyping a URL, I was directed to this instead:</p>
<blockquote><p><a href="http://assist.shaw.ca/shawcaassist/dnsassist/main/?domain=www.example.com">http://assist.shaw.ca/shawcaassist/dnsassist/main/?domain=www.example.com</a></p></blockquote>
<p>(original URL redacted).</p>
<p>It appears that, even if you aren&#8217;t using Shaw&#8217;s DNS servers they are still checking your DNS requests and, in the case of NX domains (at least &#8211; they could technically do this for any traffic), hijacking the result and forwarding your browser to their page instead.</p>
<p>I&#8217;ve sent a barrage of messages to Shaw&#8217;s PR team on Twitter, but haven&#8217;t had a response yet. I&#8217;ll update this article when (or if) they reply.</p>
<p>For the time being, though, it appears you can opt-out of the &#8216;service&#8217; using this page: <a href="http://nxr.shaw.ca/optout/">http://nxr.shaw.ca/optout/</a></p>
<p><strong>Update:</strong> I&#8217;ve had a reply from Shaw saying &#8220;We do not modify any DNS traffic going to our customers from other sources&#8221;. They&#8217;re currently looking in to the issue apparently, so another update will be in order when I hear back.</p>
<p><strong>Additional Update: </strong>I received a reply from Shaw asking me to do some further troubleshooting, all of which would have been useless (eg, using the &#8216;dig&#8217; and &#8216;nslookup&#8217; commands to confirm my DNS settings and what the NX response was), however as I opted out of the &#8216;service&#8217; I can&#8217;t actually complete the steps as everything is working correctly. Additionally, there doesn&#8217;t appear to be a way to opt back in to the &#8216;service&#8217;, so that&#8217;s also a bust. I guess I won&#8217;t be getting an answer as to what happened. Also, <a href="http://www.reddit.com/r/canada/comments/hanhe/shaw_cable_hijacks_mistyped_domain_names/" target="_blank">I was linked on Reddit Canada</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2011/05/01/shaw-cable-pulls-a-rogers-hijacks-nx-records/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Server 2008 R2 and Windows 7 Client SMB2 Share Refresh Issue</title>
		<link>http://laslow.net/2011/01/31/server-2008-r2-and-windows-7-client-smb2-share-refresh-issue/</link>
		<comments>http://laslow.net/2011/01/31/server-2008-r2-and-windows-7-client-smb2-share-refresh-issue/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 17:58:50 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Server 2008 R2]]></category>
		<category><![CDATA[SMB2]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.laslow.net/?p=1125</guid>
		<description><![CDATA[That&#8217;s one heck of a long post title, but it at least describes the issue. Here&#8217;s the setup: 1x Windows Server 2008 R2 with Hyper-V/AD/File Server roles, and two shared folders. Server has dual onboard NICs, one with full access to the client network below, the other to a separate network to allow the server to be [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s one heck of a long post title, but it at least describes the issue. Here&#8217;s the setup:</p>
<ul>
<li>1x Windows Server 2008 R2 with Hyper-V/AD/File Server roles, and two shared folders. Server has dual onboard NICs, one with full access to the client network below, the other to a separate network to allow the server to be managed remotely (no gateway configured on this NIC).</li>
<li>18x Windows 7 x86 clients</li>
<li>Standard network setup (read: no VLANs, bridging, etc&#8230;. Just one network switch).</li>
</ul>
<p>The previous server used by these clients worked perfectly. However, upon replacing the server with the one above, my users began noticing an odd issue. If they copy one or more files/folders to a share that is visible to all of the computers, the file(s) don&#8217;t immediately show up on <em>all</em> of the computers &#8211; usually 3/4 of the computers will see the file(s). On the 1/4 that don&#8217;t, users either have to wait ~10 minutes before the files will appear, or they can reboot to force a refresh. Simply pressing F5, or right-clicking in the shared folder and choosing &#8216;Refresh&#8217; doesn&#8217;t work &#8211; only waiting or rebooting does.</p>
<p>In terms of a solution, I&#8217;ve seen a number of suggestions, but none seem to work. The server has dual-onboard Broadcom Gigabit NICs, and a number of forum posts have suggested disabling Checksum Offload and Large Send Offload, but this made no difference. Neither did disabling IPv6 on the client and server side. Disabling firewalls on the client and server side made no difference, nor did <a href="http://www.vistaheads.com/forums/microsoft-public-windows-vista-file-management/176210-windows-explorer-doesnt-refresh-folder-shares.html" target="_blank">this post suggesting a few registry settings to change</a>.</p>
<p>What did fix the issue, though, was <a href="http://www.petri.co.il/how-to-disable-smb-2-on-windows-vista-or-server-2008.htm" target="_blank">disabling SMB2</a>. Once all of the clients were connecting using the old SMB protocol the issue disappeared. I have no idea why SMB2 is an issue as I haven&#8217;t take the time to troubleshoot further with SMB2-specific settings, however this at least has things running normally.</p>
<p><strong>TL;DR Version:</strong> If you have clients connecting to a Windows Server 2008 R2 box and the contents of file shares aren&#8217;t refreshing immediately or until reboot, disable SMB2 on the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2011/01/31/server-2008-r2-and-windows-7-client-smb2-share-refresh-issue/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Connect Clients to a New SEP 11.x Server</title>
		<link>http://laslow.net/2011/01/10/connect-clients-to-a-new-sep-11-x-server/</link>
		<comments>http://laslow.net/2011/01/10/connect-clients-to-a-new-sep-11-x-server/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 20:07:42 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA["It's a Feature"]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Batch Files]]></category>
		<category><![CDATA[Login Script]]></category>
		<category><![CDATA[SEP]]></category>
		<category><![CDATA[Symantec]]></category>

		<guid isPermaLink="false">http://www.laslow.net/?p=1095</guid>
		<description><![CDATA[If &#8220;Something Bad&#8221;™ happens to your Symantec Endpoint Protection Manager server and you don&#8217;t have a second to fall back on (or it wasn&#8217;t replicating, or it all went tits-up, etc&#8230;), you may be in a bit of bind when it comes to getting things back up and running. Reinstall the Protection Manager is easy, [...]]]></description>
			<content:encoded><![CDATA[<p>If &#8220;Something Bad&#8221;™ happens to your Symantec Endpoint Protection Manager server and you don&#8217;t have a second to fall back on (or it wasn&#8217;t replicating, or it all went tits-up, etc&#8230;), you may be in a bit of bind when it comes to getting things back up and running. Reinstall the Protection Manager is easy, but getting the clients back? That&#8217;s another story.</p>
<p>When it comes to forcing clients to recognizing the new server, Symantec recommends that you use it&#8217;s &#8220;<a href="http://www.symantec.com/connect/downloads/sylink-replacer" target="_blank">SylinkReplacer</a>&#8221; tool. This, however, is a poor option as you have to have a whole mess of firewall entires setup in advance (such as enabling SMB on all affected computer and creating exceptions for that), or have the firewall turned off completely. In a lot of environments this just isn&#8217;t possible.</p>
<p>As such, I started hunting around for an alternative and came across the aptly named &#8220;SylinkDrop&#8221; tool, located in &#8220;Tools\NoSupport\SylinkDrop&#8221; on the SEP DVD (or in the .zip if you downloaded it from Symantec). This tool is a lot simpler in nature &#8211; it force-stops the SEP services, replaces the Sylink.xml file, and restarts the services. The catch? It only runs locally. Fortunately, it comes with command line options and can run silently!</p>
<p>The solution is simple &#8211; drop the SylinkDrop folder in a network share accessible to the affected clients (in my case, clients have X: mapped to common folder). Copy Sylink.xml from a client computer that is connected to the right server (I uninstalled SEP manually on one client, the reinstalled it and copied file from there) to the the SylinkDrop folder. Then, create a .cmd file (or .bat if you like that kind of thing) with the following:</p>
<blockquote>
<div id="_mcePaste">@ECHO OFF</div>
<div id="_mcePaste">if exist c:\windows\sep-replaced.txt goto :exit</div>
<div id="_mcePaste">REM Replace the Sylink.xml with a new one pointing to the correct server</div>
<div id="_mcePaste">X:\SylinkDrop\SylinkDrop.exe -silent X:\SylinkDrop\SyLink.xml</div>
<div id="_mcePaste">REM Mark the system as having been updated</div>
<div id="_mcePaste">echo 1 &gt; c:\windows\sep-replaced.txt</div>
<div id="_mcePaste">:exit</div>
<div id="_mcePaste">exit</div>
</blockquote>
<div>Then add a line to the login script that points to that batch file. Here&#8217;s what happens:</div>
<div>
<ol>
<li>Client logs in, login script launches the batch script</li>
<li>The batch script checks to see if &#8220;c:\windows\sep-replaced.txt&#8221; exists &#8211; if not, it carries on. If so, it exits the script.</li>
<li>The SylinkDrop tool runs and replaces the Sylink.xml file.</li>
<li>The batch script then creates the &#8221;c:\windows\sep-replaced.txt&#8221; file so that on future logins the batch file will skip running the SylinkDrop tool and exit silently.</li>
</ol>
</div>
<p>That&#8217;s it! As your users reboot their computers and login, the tool will run and the computers will start showing up in the SEP Manager Console. Once all of the computers have been updated, go in and delete the entry from the login script and remove the folder from the share. You&#8217;re done!</p>
<p><strong>Edit: </strong>It&#8217;s worth pointing out as well that you can can login to the SEP Management Console, choose the &#8216;Clients&#8217; tab, and click &#8216;Find Unmanaged Clients&#8217; on the bottom-left. This will let you search by IP-range and do a full install (Windows only).</p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2011/01/10/connect-clients-to-a-new-sep-11-x-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cheat: How to get Custom Routes on Google Maps for Android</title>
		<link>http://laslow.net/2010/12/16/cheat-how-to-get-custom-routes-on-google-maps-for-android/</link>
		<comments>http://laslow.net/2010/12/16/cheat-how-to-get-custom-routes-on-google-maps-for-android/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 18:31:31 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA["It's a Feature"]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Short]]></category>
		<category><![CDATA[Cheat]]></category>
		<category><![CDATA[Maps]]></category>

		<guid isPermaLink="false">http://www.laslow.net/?p=1075</guid>
		<description><![CDATA[One of my few complaints about the Maps app on Android, even the newly released 5.0 version, is that if you use the Directions feature there is no Alternate Route option. There isn&#8217;t even an option to manually re-draw the route, or to enter a second destination like in the web version. So I found [...]]]></description>
			<content:encoded><![CDATA[<p>One of my few complaints about the Maps app on Android, even the newly released 5.0 version, is that if you use the Directions feature there is no Alternate Route option. There isn&#8217;t even an option to manually re-draw the route, or to enter a second destination like in the web version.</p>
<p>So I found myself faced with an issue &#8211; I was about to go on a fairly long trip, however I was planning on taking a route different from the one Google had suggested. While I could use the web version of Google Maps on my phone, I wanted to use the actual app. The solution, as it turns out, is very simple.</p>
<p>The trick is to set everything up on the web version of Maps first. This gets tricky, depending on how sever the changes to the route are. I my case, I only needed to drag one route marker to change the route to go where I wanted it. Here&#8217;s the <a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=FWkb-QId51fh-CmzMMfjtox9UzH3xLTaPeX4Tg%3BFYwCMQMd7EU8-Skj_96ARSKgUzFdFfZKDKAfQQ&amp;q=Kelowna,+British+Columbia,+Canada+to+Edmonton+AB&amp;sll=50.263792,-119.279058&amp;sspn=0.010891,0.033023&amp;g=3105+32+Street,+Vernon,+British+Columbia,+Canada&amp;ie=UTF8&amp;ll=51.727028,-116.466064&amp;spn=5.377163,16.907959&amp;z=7&amp;saddr=Kelowna,+British+Columbia,+Canada&amp;daddr=Edmonton+AB" target="_blank">before route</a>, and <a href="http://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=Kelowna,+British+Columbia,+Canada&amp;daddr=52.79015,-119.2562+to:Edmonton+AB&amp;hl=en&amp;geocode=FWkb-QId51fh-CmzMMfjtox9UzH3xLTaPeX4Tg%3BFYaDJQMdeEvk-Cmn7ciTy6CDUzH9n2-x8YrpdQ%3BFYwCMQMd7EU8-Skj_96ARSKgUzFdFfZKDKAfQQ&amp;mra=dpe&amp;mrcr=0&amp;mrsp=1&amp;sz=7&amp;via=1&amp;sll=51.727028,-116.466064&amp;sspn=5.377163,16.907959&amp;ie=UTF8&amp;z=7" target="_blank">the after</a> (not my real start and destination, just an example).</p>
<p>So the cheat is actually very straight forward &#8211; after finalizing your route in web Maps, copy the link for the map (don&#8217;t use the address bar &#8211; use the Link button in the top-right corner of the map) and paste it in to a URL shortener like <a href="http://is.gd" target="_blank">Is.Gd</a>, then enter that URL on your Android phone. The browser will ask if you want to open the link in Maps or another program, so just choose maps and your custom route will appear, with full directions, right before your eyes.</p>
<p><strong>Edit</strong>: I should clarify that Google Navigation for Android has a &#8216;Recalculate Route&#8217; option, however if you aren&#8217;t planning on using it, or it isn&#8217;t available in your area, this is the solution.</p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2010/12/16/cheat-how-to-get-custom-routes-on-google-maps-for-android/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A PHP-Based Server Monitor</title>
		<link>http://laslow.net/2010/10/22/a-php-based-server-monitor/</link>
		<comments>http://laslow.net/2010/10/22/a-php-based-server-monitor/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 17:46:54 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[php5]]></category>

		<guid isPermaLink="false">http://www.laslow.net/?p=1043</guid>
		<description><![CDATA[The other day I decided that the little &#8216;Network Monitor&#8217; desktop gadget I was using to monitor my few servers just wasn&#8217;t cutting it. Instead, I wanted to make use of a spare iMac and have something a little flashier. A Google search for Server Monitors brought up a plethora of options that were either [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I decided that the little &#8216;Network Monitor&#8217; desktop gadget I was using to monitor my few servers just wasn&#8217;t cutting it. Instead, I wanted to make use of a spare iMac and have something a little flashier. A Google search for Server Monitors brought up a plethora of options that were either horribly ugly, platform specific, or just didn&#8217;t work the way I needed (most required that the target server be running some form of web server, such as IIS or Apache to retrieve headers to see if the server was up &#8211; most of my servers don&#8217;t run those). As such, I decided to write a small script from scratch.</p>
<p>I figured the easiest way to accomplish my goal of a platform-independent monitoring script was to use PHP. After enabling Apache2/PHP5 on my Snow Leopard-running iMac (a topic for another blog post later), I searched through the <a href="http://www.php.net/manual/en/language.functions.php" target="_blank">PHP.net function list</a> until I found <a href="http://php.net/manual/en/function.fsockopen.php" target="_blank">fsockopen()</a>. This function is quite ideal, as it will work with any open port. The first step was to make a quick function to utilize <em>fsockopen</em> and return some testable results:</p>
<blockquote>
<div id="_mcePaste">
<div id="_mcePaste">function checkServer($ip,$port)</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>{</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>$fp = fsockopen($ip,$port,$errno,$errstr,1);</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>if (!$fp)</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>{</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>return &#8216;Down&#8217;;</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>} else {</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>return &#8216;Up&#8217;;</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>}</div>
<div id="_mcePaste"><span style="white-space: pre;"> </span></div>
<div id="_mcePaste"><span style="white-space: pre;"> </span>}</div>
</div>
</blockquote>
<p>I added this to a &lt;?php ?&gt; block in the &lt;head&gt;&lt;/head&gt; of the document &#8211; to call the function and perform the test, I used the following line below:</p>
<blockquote><p>$servername = checkServer(&#8217;192.168.1.100&#8242;,&#8217;53&#8242;);</p></blockquote>
<p>In this example I&#8217;m checking the availability of a DNS server, so I use port 53. When this runs, the $servername is set to either &#8216;Up&#8217; or &#8216;Down&#8217; depending on whether or not a connection can be opened on that port.</p>
<p>The only thing left now was to display this output. I made a fancy table-based page with graphics where each server is a cell and the background changes between green and red depending on the $servername value. However, all you <em>really</em> need is the code below in a &lt;?php ?&gt; block in the body of the page:</p>
<blockquote><p>echo(&#8216;Server <em>Example </em>Status: &#8216;.$servername);</p></blockquote>
<p>Changing <em>Example</em> to the name of your server. If you have more than one server to check, just make another variable, use the checkServer function to give it a value (make sure to change the IP address and use an open port!), and then add another echo line.</p>
<p>That&#8217;s it! To be fancy, you can add a javascript automagic page refresh to &#8211; just change the &lt;body&gt; tag to:</p>
<blockquote><p>&lt;body onLoad=&#8221;Javascript:timedRefresh(30000); display();&#8221;&gt;</p></blockquote>
<p>And put the following in the &lt;head&gt;&lt;/head&gt; section:</p>
<blockquote><p>&lt;script type=&#8221;text/Javascript&#8221;&gt;</p>
<p>&lt;!&#8211;</p>
<p>function timedRefresh(timeoutPeriod) {</p>
<p><span style="white-space: pre;"> </span>setTimeout(&#8220;location.reload(true);&#8221;,timeoutPeriod);</p>
<p>}</p>
<p>//  &#8211;&gt;</p>
<p>&lt;/script&gt;</p></blockquote>
<p>And you&#8217;re done! If the server is up, every 30 seconds your page will refresh and show:</p>
<blockquote><p>Server <em>Example</em> Status: Up</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2010/10/22/a-php-based-server-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2007 OWA/ActiveSync with Two SSL Certificates</title>
		<link>http://laslow.net/2010/07/20/exchange-2007-owaactivesync-with-two-ssl-certificates/</link>
		<comments>http://laslow.net/2010/07/20/exchange-2007-owaactivesync-with-two-ssl-certificates/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 18:12:43 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://www.laslow.net/?p=955</guid>
		<description><![CDATA[Yes, it is possible. It&#8217;s not pretty by any means (a proper Class 2 SSL Certificate is the best way to go), but it can be done. Click Continue Reading for the process. Background I work for a non-profit organisation that&#8217;s primarily funded by the government. As such, we receive only a little funding for [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, it is possible. It&#8217;s not pretty by any means (a proper Class 2 SSL Certificate is the best way to go), but it can be done. Click <em>Continue Reading</em> for the process.</p>
<p><span id="more-955"></span></p>
<p><strong><span style="text-decoration: underline;">Background</span></strong><br />
<span style="font-weight: normal;">I work for a non-profit organisation that&#8217;s primarily funded by the government. As such, we receive only a little funding for &#8216;technical extras&#8217;, and sadly even a cheap Class 2 SSL cert is out of financial reach at this time. The has caused a bit of a problem.</span></p>
<p><span style="font-weight: normal;">We run an Exchange 2007 server on a Windows Server 2003 box with Active Directory in along side the primary and secondary domain controllers. Our internal network was setup (by my predecessor) as <em>foo.local</em>. Our email, on the other hand, is hosted externally (as our ISP does not allow email servers on business accounts &#8211; go figure) on the domain <em>mail.bar.com.</em> Because of <em>foo </em>and <em>bar, </em>a single Class 1 Cert can&#8217;t be used &#8211; and therein lies the problem.</span></p>
<p><span style="font-weight: normal;">When I access OWA (Outlook Web App) internally, I can use the internal name of the mailserver (<em>mail.foo.local</em>), which uses a self-signed Class 1 Server SSL cert by the Windows Server built-in certificate authority.  Of course, when accessed externally, my browser flips out because it doesn&#8217;t recognize my own certificate authority as valid and the name on the cert itself doesn&#8217;t match (<em>mail.foo.local</em> compared to the external domain <em>exchange.bar.com</em>). Although this is technically alright, because I know enough to verify the cert manually, this confuses my users and can potentially lead to man-in-the-middle attacks.</span></p>
<p><strong><span style="text-decoration: underline;">The Solution</span></strong><br />
<span style="font-weight: normal;">IIS only allows one SSL cert per Web Site. Without a Class 2 SSL cert (they allow for multiple domains to be specified) it isn&#8217;t technically possible to have two domains SSL-protected. If I apply a valid Class 1 cert for the external domain, the internal Outlook clients will throw the SSL error instead, which is much more of a problem.</span></p>
<p><span style="font-weight: normal;">Therefore, the solution is two create a second Web Site (with different port assignments, otherwise you need a second NIC and IP address) in IIS and mirror the OWA and ActiveSync Virtual Directories. This is actually easier than it sounds. Note that the following instructions are for IIS on </span><span style="font-weight: normal;"><strong>Windows Server 2003</strong>, and <strong>Exchange 2007</strong>.</span></p>
<ol>
<li>Open IIS, then expand the Web Sites entry.</li>
<li>Right-click on the Web Sites entry and choose &#8220;New&#8221; -&gt; &#8220;Web Site&#8221;.</li>
<li>Choose &#8220;Next&#8221;, then give it a name (and remember it &#8211; I chose &#8220;OWA-External&#8221;), and &#8220;Next&#8221; again.</li>
<li>If you have a second NIC/IP address on the server, specify it. Otherwise, change Port 80 to an unused port (I choose 82), then click &#8220;Next&#8221;.</li>
<li>Choose a new folder to be the root of the website. It&#8217;ll stay empty, so it doesn&#8217;t matter where you put it. I created <em>C:\inetpub2</em>. Click &#8220;Next&#8221; again.</li>
<li>Leave the defaults selected (Read), then click &#8220;Next&#8221; and &#8220;Finish&#8221;.</li>
<li>Right click on the new website (&#8220;OWA-External&#8221; in this example&#8221;) and choose &#8220;Permissions&#8221;.</li>
<li>Add the &#8220;Internet Guest Account&#8221; for your server (typically, <em>DOMAINIUSR_SERVERNAME</em>) and give it Read, Read &amp; Execute, and List permissions.</li>
<li>Click OK and close IIS.</li>
</ol>
<p>Now that the website is setup, we need to tell Exchange to create the Virtual Directories. If you try to manually create them in IIS by mirroring the settings from the existing entries under the Default Web Site, you won&#8217;t be able to access OWA.</p>
<ol>
<li>Open the Exchange Management Shell.</li>
<li>Type <em>Get-OwaVirtualDirectory</em> and press Enter. This will show the existing Virtual Directories.</li>
<li>Now type <em>New-OwaVirtualDirectory -WebSiteName &#8220;OWA-External&#8221;</em> (replacing <em>OWA-External</em> with your website name) and hit Enter. It make take a minute or two to process, depending on the speed/load of your server.</li>
<li>If you don&#8217;t get any errors, type <em>Get-OwaVirtualDirectory</em> again and you should see a new <em>owa</em> entry in the list.</li>
<li>Next is to create a new ActiveSync Virtual Directory in the new site. The command to do that is <em>New-ActiveSyncVirtualDirectory -WebSiteName &#8220;OWA-External&#8221; -ExternalURL &#8220;http://exchange.bar.com/Microsoft-Server-ActiveSync&#8221; </em>(replacing <em>OWA-External</em> and the URL with your own, of course).</li>
</ol>
<p>Now open up the Exchange Management Console. Browse to <em>Server Configuration</em> -&gt; <em>Client Access</em>. Under the <em>Outlook Web Access</em> and <em>Exchange ActiveSync</em>, you should now have two entries each &#8211; one for the original Web Site (usually <em>Default Web Site</em>), then one for the one you just created.</p>
<p>Now you&#8217;re almost done. Back in IIS, open the Properties for the new Web Site and set your SSL port to something other than 443 (unless you have two IP addresses on the server), then install your valid Class 1 SSL cert for your external domain (<em>exchange.bar.com</em>, in this example &#8211; I got my Class 1 cert free from <a href="http://www.startssl.com" target="_blank">www.startssl.com</a>). The only thing left to do now is to port forward. On your router/gateway/firewall/whatever, forward port 443 to your Exchange server&#8217;s IP (or second IP if you&#8217;ve set it up that way) and, if appropriate the correct port. In my case, I forward port 443 to port 444, as well as port 444 to 444. Both are necessary if you&#8217;re using a port other than 443.</p>
<p>Once all this is done, restart IIS on your server and all should be ready. You&#8217;ll now have a valid cert internally and externally!</p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2010/07/20/exchange-2007-owaactivesync-with-two-ssl-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rogers Wireless Hijacks Wildcard DNS Records</title>
		<link>http://laslow.net/2010/06/07/rogers-wireless-hijacks-wildcard-dns-records/</link>
		<comments>http://laslow.net/2010/06/07/rogers-wireless-hijacks-wildcard-dns-records/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 18:14:11 +0000</pubDate>
		<dc:creator>Laslow</dc:creator>
				<category><![CDATA["It's a Feature"]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Rogers]]></category>

		<guid isPermaLink="false">http://www.laslow.net/?p=806</guid>
		<description><![CDATA[Although I can&#8217;t confirm when this happened (it may have happened a while ago and I just never noticed), I was browsing the internet last night on my Google Nexus One and noticed that, when I mistyped http://imdb.com, I was redirected to http://www20.search.rogers.com (which doesn&#8217;t work outside of Rogers&#8217; network) instead of receiving a normal Not Found [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.laslow.net/wp-content/uploads/2010/06/rogers_logo.jpg"><img class="alignright size-full wp-image-809" title="Rogers Logo" src="http://www.laslow.net/wp-content/uploads/2010/06/rogers_logo.jpg" alt="Rogers Logo" width="145" height="101" /></a>Although I can&#8217;t confirm when this happened (it may have happened a while ago and I just never noticed), I was browsing the internet last night on my Google Nexus One and noticed that, when I mistyped <a href="http://imdb.com" target="_blank">http://imdb.com</a>, I was redirected to <a href="http://www20.search.rogers.com" target="_blank">http://www20.search.rogers.com</a> (which doesn&#8217;t work outside of Rogers&#8217; network) instead of receiving a normal <em>Not Found</em> error. This all smacks of the infamous <a href="http://en.wikipedia.org/wiki/Site_Finder" target="_blank">VeriSign Site Finder fiasco</a>.</p>
<p>I&#8217;m no fan of browser redirects in any form, and I&#8217;m even less of a fan of Yahoo which Rogers partners with to, among other things, provide results on their hijacked landing page. But what can you do? It&#8217;s their service, and there&#8217;s no opt-out link on the page.</p>
<p>Well, the answer is to manually opt-out. Unfortunately, you need to have a rooted/jail-broken phone to do this. As stated above, I have a Google Nexus One which runs CyanogenMod, but this should work with any other rooted Android phone and even jail-broken iPhones (although the paths are different &#8212; you&#8217;ll need to alter them as applicable).</p>
<p>To manually opt-out, do the following (assumes Android phone):</p>
<ol>
<li>Open a shell on your phone. You can use ConnectBot, Terminal Emulator, or <em>adb shell</em>.</li>
<li>Assume root (<em>su</em> command).</li>
<li>Remount the system partition in to read/write mode &#8212;  <em>mount -o rw,remount /system</em></li>
<li>Browse to <em>/system/etc</em>.</li>
<li>Use your favourite text editor to open <em>hosts</em>.</li>
<li>Add the following to the bottom of the <em>hosts</em> file &#8212; <em>127.0.0.1 www20.search.rogers.com</em></li>
<li>Save and quit!</li>
</ol>
<p>You&#8217;re done! You&#8217;ve just manually opt&#8217;ed-out of Rogers Wildcard DNS hijack. Now you&#8217;ll just get the normal &#8216;Not Found&#8217; errors, as when Rogers see that the domain you&#8217;ve entered doesn&#8217;t exist and tried to redirect you to their search page, your phone will point that domain to itself and fail as it isn&#8217;t running a webserver.</p>
<p><strong>TL;DR Version: To prevent getting directed to Rogers&#8217; Search Page when you mistype an address, edit your <em>hosts</em> file to point <em>www20.search.rogers.com</em> to the <em>127.0.0.1</em> loopback address.</strong></p>
<p><span style="color: #ff0000;"><strong>Update (05/01/2011): You can now officially opt-out using this link: <a href="http://searchassist.teoma.com/templates/rogers/optout" target="_blank">http://searchassist.teoma.com/templates/rogers/optout</a></strong></span></p>
]]></content:encoded>
			<wfw:commentRss>http://laslow.net/2010/06/07/rogers-wireless-hijacks-wildcard-dns-records/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

