<?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>Vitriol and Routing Tables &#187; Tutorials/How-To</title>
	<atom:link href="http://www.raptorized.com/tags/english/work/tutorialshow-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raptorized.com</link>
	<description>Tales from the OSI layer 3</description>
	<lastBuildDate>Wed, 08 Sep 2010 02:34:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Access administrative shares on Server 2008/Vista</title>
		<link>http://www.raptorized.com/2008/08/19/access-administrative-shares-on-server-2008vista/</link>
		<comments>http://www.raptorized.com/2008/08/19/access-administrative-shares-on-server-2008vista/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 21:27:33 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=182</guid>
		<description><![CDATA[Quick windows tip again, if you find yourself unable to access the administrative shares (\\machine\c$, tasks, etc) on a Windows Server 2008 or Vista computer with UAC enabled, using the credentials of a local administrator &#8212; don&#8217;t panic. This is actually intended. Turns out local administrators cannot elevate their privileges over the network, with UAC [...]]]></description>
			<content:encoded><![CDATA[<p>Quick windows tip again, if you find yourself unable to access the administrative shares (\\machine\c$, tasks, etc) on a Windows Server 2008 or Vista computer with UAC enabled, using the credentials of a local administrator &#8212; don&#8217;t panic. This is actually intended.</p>

<p>Turns out local administrators cannot elevate their privileges over the network, with UAC enabled.</p>

<p><strong>Note that this doesn&#8217;t affect users in the Domain Admins group!</strong></p>

<p>Now, you could do the dumb &#8220;neowin poweruser&#8221; thing and turn UAC off, or you could change this particular behavior in the registry. Navigate to:</p>

<p><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System</code></p>

<p>And add a new DWORD named <strong>LocalAccountTokenFilterPolicy</strong> with a value of <strong>1</strong>, and then reboot. It all should work.</p>

<p>Again, users with Domain Admin privileges are unaffected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2008/08/19/access-administrative-shares-on-server-2008vista/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xapian Python Bindings (Win32) 1.0.6 Released</title>
		<link>http://www.raptorized.com/2008/03/25/xapian-python-bindings-win32-106-released/</link>
		<comments>http://www.raptorized.com/2008/03/25/xapian-python-bindings-win32-106-released/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 15:30:47 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xapian]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/2008/03/25/xapian-python-bindings-win32-106-released/</guid>
		<description><![CDATA[I have compiled version 1.0.6 of Xapian for Windows, and I have built and packaged the Python Bindings for your convenience. You can find the new version here. Questions, comments or Mirrors are welcome, as usual UPDATE: Charlie Hull informs me that he has coerced my hacked-up Distutils file into SVN Head, which means there&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I have compiled version 1.0.6 of Xapian for Windows, and I have built and packaged the Python Bindings for your convenience.</p>

<p>You can find the new version <a href="http://www.raptorized.com/xapian-python-win32/">here</a>.</p>

<p>Questions, comments or Mirrors are welcome, as usual <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>UPDATE: Charlie Hull informs me that he has coerced my hacked-up Distutils file into SVN Head, which means there&#8217;s a good chance my packaging environnement will be integrated into mainline Xapian, or into the Lemur Consulting makefiles. Either way, this means one can build binaries a lot faster, which is great. <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2008/03/25/xapian-python-bindings-win32-106-released/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Mounting LVM Volumes inside a VMWare Disk Image</title>
		<link>http://www.raptorized.com/2007/09/07/mounting-lvm-volumes-inside-a-vmware-disk-image/</link>
		<comments>http://www.raptorized.com/2007/09/07/mounting-lvm-volumes-inside-a-vmware-disk-image/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 17:18:52 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[cleverhack]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[madshellskills]]></category>
		<category><![CDATA[stupidty]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=138</guid>
		<description><![CDATA[So, the situation is this. I&#8217;m sitting remotely at a client site, and suddendly, due to some sleep-deprived slip-up, ended up erasing part of the configuration for their local server. Being the kind of guy to plan things through before taking action (usually), I had previously made a test set-up with all the configs in [...]]]></description>
			<content:encoded><![CDATA[<p>So, the situation is this. I&#8217;m sitting remotely at a client site, and suddendly, due to some sleep-deprived slip-up, ended up erasing part of the configuration for their local server.</p>

<p>Being the kind of guy to plan things through before taking action (usually), I had previously made a test set-up with all the configs in vmware on my local workstation at home, before heading over and installing them. So I pop open my laptop, fire up the Cisco VPN Client, connect over there, leapfrog some routers in between and land on my workstation. Turns out I hadn&#8217;t left the vm running, so I can&#8217;t access it from the shell by SSH&#8217;ing in.</p>

<p>&#8220;Hey, no problem!&#8221; I thought. &#8220;I&#8217;ll just mount the disk images with vmware-mount.pl, fetch the configuration files, send them over with a convulted mess of ssh-within-ssh-within-ssh and unix pipes to my laptop! Piece of cake!&#8221;</p>

<p>But then something hits me. The Virtual Disk Image (vmdk) file had LVM Volumes as partitions. Which I can&#8217;t directly mount from my Ubuntu workstation. Usually, you can get away with issuing the following:</p>

<p><code>$ sudo /opt/vmware/bin/vmware-mount.pl /path/to/disk-image.vmdk patition_number -t ext3 /mnt/mountpoint</code></p>

<p>But to much of my dismay, partition 2 on this particular disk image is an LVM Volume, so it can&#8217;t be directly mounted. I has to be mapped and a bunch things has to be done before I can get to the data. I&#8217;m not even sure I have LVM support on the Ubuntu machine at the moment.</p>

<p>Curses. Unless I fuck around with it to make it work. Which I did. Read on for the details.</p>

<p><span id="more-138"></span></p>

<p>So, I light up a cigarette and get to work. I first issue the command described above, regardless of the outcome. vmware-mount.pl works by firing up part of vmware, accessing the disk, and then feeds the data through a Network Block Device (/dev/nb0), which, in turn, is then mounted wherever you specify.</p>

<p>The output is optimistic.</p>

<blockquote>
<pre>
--------------------------------------------
VMware for Linux - Virtual Hard Disk Mounter
Version: 1.0 build-45731
Copyright 1998 VMware, Inc.  All rights reserved. -- VMware Confidential
--------------------------------------------

It has been reported that this program does not work correctly with 2.4+ Linux 
kernels in some cases, and you are currently running such a kernel. Do you 
really want to continue? [N] y

No Network Block Device detected.

There is no Network Block Device defined on this machine. This script is about 
to create the /dev/nb0 Network Block Device. Continue? [Y] 

Creating the /dev/nb0 Network Block Device

No Network Block Device driver detected.

Trying to load the Network Block Device driver kernel module... Success.

Client: The partition is now mapped on the /dev/nb0 Network Block Device.
mount: unknown filesystem type 'LVM2_member'

If you know the filesystem of the partition you want to mount, you can provide 
it using the -t command line option. Since you haven't done so, this script is 
going to try to determine the filesystem of the partition based on the partition
type and id.

Unable to retrieve the filesystem of the partition (the partition type is BIOS 
and the partition Id is 8E). Please file an incident with VMware at 
http://www.vmware.com/forms/Incident_Login.cfm by copying this error message.
</pre>
</blockquote>

<p>So here I think, &#8220;I&#8217;m pretty fucked. I&#8217;ll have to hack vmware-mount.pl, and god knows vmware&#8217;s Perl scripts are complex.&#8221;</p>

<p>So, out of the blue, I try again. But then I notice the vmware disk image is locked. And /dev/nb0 is <strong>still present.</strong> So my vmware Disk Image is still attached to the network block device! Great!</p>

<p>So, I ignore the error messages, and install LVM support on my ubuntu box.</p>

<p><code>
$ sudo apt-get install lvm2
</code><code></code></p>

<p>Note: On Ubuntu Feisty, according to bug <a href="https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/96802">#96802</a>, the lvm package has some packaging errors. You'll end up getting the error message "no program found for your current version of LVM" if you try to issue any of the LVM management commands. Long story short, issue the following to fix it:</p>

<blockquote>
$ sudo ln -s /lib/lvm-200 /lib/lvm-0
</blockquote>

<p>Next step, detect and mount the LVM volume you just added <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>Step 1: Load LVM kernel modules:</p>

<p><code>$ sudo modprobe dm-mod</code></p>

<p>Step 2: Detect new LVM Physical Volumes</p>

<p><code>$ sudo vgscan</code></p>

<p><em>It should appear as /dev/nb0. You may safely ignore errors about other devices.
The last line should be: <strong>Found volume group "VolGroup00" using metadata type lvm2</strong>, or something similar.</em></p>

<p>Step 3: Activate the newly found vgroup</p>

<p><code>$ sudo vgchange -ay VolGroup00</code></p>

<p>(Substitute "VolGroup00" appropriately if you named your Volume Group differently)</p>

<p>Step 4: Display available volumes and mount them as necessary</p>

<p><code>$ sudo lvdisplay</code></p>

<p>Step 5: Mount logical Volume needed:</p>

<p><code>$ sudo mount -t ext3 /dev/VolGroup00/LogVol00 /mnt/lvm1 -o ro</code></p>

<p>Step 6: SUCCESS! (Profit)</p>

<p>I can now access my RHEL5 Disk from my Ubuntu machine. Now, time to go back to the convulted mess of ssh-within-ssh-within-ssh-and-unix-pipes, but that's a story for another day.</p>

<p>Also, an important note, I have no idea how to unmount that volume. Well, I know how to unmount the LVM volume, but I have no idea how to get rid of /dev/nb0 without a reboot. Also, do note that this may make your machine majorly unstable. I had to call a friend to walk over to my place and reboot my workstation because it hung while reading files. But in the end, it worked.</p>

<p>I hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2007/09/07/mounting-lvm-volumes-inside-a-vmware-disk-image/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Courier imap and vpopmail on Debian</title>
		<link>http://www.raptorized.com/2007/05/20/courier-imap-and-vpopmail-on-debian/</link>
		<comments>http://www.raptorized.com/2007/05/20/courier-imap-and-vpopmail-on-debian/#comments</comments>
		<pubDate>Mon, 21 May 2007 03:30:06 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[epenis]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[madshellskills]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=112</guid>
		<description><![CDATA[Hi everyone. Sorry for the lack of updates, I&#8217;ve been fairly busy &#8212; I&#8217;m migrating all of my servers to a single, brand new Dell Poweredge 2900 server. I have a couple of great tutorials regarding Xen coming up soon, I&#8217;m sure at least someone will find them useful &#8212; I found the Xen documentation [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone. Sorry for the lack of updates, I&#8217;ve been fairly busy &#8212; I&#8217;m migrating all of my servers to a single, brand new Dell Poweredge 2900 server. I have a couple of great tutorials regarding Xen coming up soon, I&#8217;m sure at least someone will find them useful &#8212; I found the Xen documentation to be really scarce.</p>

<p>So, right now, I&#8217;m migrating my qmail, vpopmail, courier, clamav and friends set-up from Gentoo to Debian, on a new virtual machine. I followed the basic steps from here:</p>

<p><a href="http://wiki.debian.iuculano.it/quick_howto">http://wiki.debian.iuculano.it/quick_howto</a></p>

<p>This gent was nice enough to provide the required qmail packages and patches. Only problem came when I tried to make courier work with vpopmail &#8212; turns out the official debian courier-imap packages don&#8217;t support vchkpw, which is the authentication mechanism for vpopmail. Fortunately, I managed to hack it in an almost clean way, that doesn&#8217;t involve building it yourself from tarball. </p>

<p>Read on for the jazz.</p>

<p><span id="more-112"></span></p>

<p>So, first of all, fetch the courier-authlib source. You should first make sure that your <em>/etc/apt/sources.list</em> file contains the &#8220;deb-src&#8221; lines for everything. <em>apt-get update</em> if necessary.</p>

<p>So, step one, create a folder to hold the sources and debian packages, and cd into it.</p>

<pre><code>mkdir -p /usr/src/deb-source; cd  /usr/src/deb-source</code></pre>

<p>Step two, fetch the sources.</p>

<pre><code>apt-get source courier-authlib</code></pre>

<p>Once that is done, you must install the tools and libraries courier might need to be built. This sounds scary, but is actually a breeze under Debian.</p>

<pre><code>apt-get build-dep courier-authlib</code></pre>

<p>This should bring in a few things like build-essential, if you don&#8217;t have a compiler on the machine yet.</p>

<p>Next, cd&#8217; into the source folder, and into the debian package files.</p>

<pre><code>cd courier-authlib-0.58/debian</code></pre>

<p>Now you&#8217;re sitting where all the package specifications are configured, and the sweet thing is, you can hack them to your heart&#8217;s content. First of all, we need to edit the file named <strong>control</strong>.</p>

<pre><code>vi control</code></pre>

<p>Add the following at the end of the file to create a description for vchkpw.</p>

<pre><code>
Package: courier-authlib-vchkpw
Architecture: any
Depends: ${shlibs:Depends}, courier-authlib (>= ${RELUP})
Description: External authentication support for Vpopmail.
 This package contains vpopmail support for courier-authlib.
</code></pre>

<p>Next, we must create a list of files for the package.</p>

<pre><code>echo "/usr/lib/courier-authlib/libauthvchkpw.so*" > courier-authlib-vchkpw.files</code></pre>

<p>Failure to do this could lead to the following message during build:</p>

<blockquote>
/usr/src/deb-source/courier-authlib-0.58/debian/tmp/usr/lib/courier-authlib/libauthvchkpw.so.0.0.0
/usr/src/deb-source/courier-authlib-0.58/debian/tmp/usr/lib/courier-authlib/libauthvchkpw.so.0
/usr/src/deb-source/courier-authlib-0.58/debian/tmp/usr/lib/courier-authlib/libauthvchkpw.so
File(s) found not belonging to any package, please contact maintainer
make: *** [install] Error 1
</blockquote>

<p>Next step, altering the build parameters to include vpopmail support. That&#8217;s fairly easy. Just edit the file <strong>rules</strong>.</p>

<pre><code>
vi rules
</code></pre>

<p>Scroll down to the part where COMMON_CONFOPTS is defined, near line 35. Change the line where it says:</p>

<blockquote>
&#8211;without-authvchkpw \
</blockquote>

<p>so that it now reads:</p>

<blockquote>
&#8211;with-authvchkpw \
</blockquote>

<p>Once that is done, save the file, and you&#8217;re now ready to build the new and improved package:</p>

<pre><code>
# cd ..
# dpkg-buildpackage
</code></pre>
And go fetch some coffee. The courier builds are always pretty nasty, and configure can take a while. During compilation, I spotted this with my hawk eyes:

<pre><code>
Compiling authvchkpw.c
authvchkpw.c: In function 'callback_vchkpw':
authvchkpw.c:46: warning: value computed is not used
authvchkpw.c: In function 'auth_vchkpw_changepass':
authvchkpw.c:142: warning: passing argument 1 of 'parse_email' discards qualifiers from pointer target type
Compiling authvchkpwlib.c
</code></pre>

<p>This confirmed that support was indeed being included this time.</p>

<p>Once the build is done, simply install the required package.</p>

<pre><code>
# cd ..
# ls -lah *.deb
courier-authdaemon_0.58-4_amd64.deb     courier-authlib-pipe_0.58-4_amd64.deb
courier-authlib_0.58-4_amd64.deb        courier-authlib-postgresql_0.58-4_amd64.deb
courier-authlib-dev_0.58-4_amd64.deb    courier-authlib-userdb_0.58-4_amd64.deb
courier-authlib-ldap_0.58-4_amd64.deb   courier-authlib-vchkpw_0.58-4_amd64.deb
courier-authlib-mysql_0.58-4_amd64.deb
# dpkg -i courier-authlib-vchkpw_0.58-4_amd64.deb
Selecting previously deselected package courier-authlib-vchkpw.
(Reading database ...
27234 files and directories currently installed.)
Unpacking courier-authlib-vchkpw (from courier-authlib-vchkpw_0.58-4_amd64.deb) ...
Setting up courier-authlib-vchkpw (0.58-4) ...
#
</code></pre>

<p>And we're done.</p>

<p>Now all that is left is just to edit /etc/courier/authdaemonrc where it specifies the authentication modules to include our newly created one:</p>

<p><code>authmodulelist="authvchkpw"</code></p>

<p>And voilà. That wasn't so hard, was it?</p>

<p>I hope someone finds the following guide useful <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2007/05/20/courier-imap-and-vpopmail-on-debian/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Windows Tip: Remote Console with remote.exe</title>
		<link>http://www.raptorized.com/2006/11/29/windows-tip-remote-console-with-remoteexe/</link>
		<comments>http://www.raptorized.com/2006/11/29/windows-tip-remote-console-with-remoteexe/#comments</comments>
		<pubDate>Wed, 29 Nov 2006 15:23:30 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=95</guid>
		<description><![CDATA[EDIT &#8211; 2008-03-03: Actually, screw this shady use of the remote debugger. Use psexec like a man instead, and enjoy the power of WMI. This is nifty. Not something to scream about while tearing your clothes off in a moment of raw ardency, but still, I find it relatively useful. You perhaps already know how [...]]]></description>
			<content:encoded><![CDATA[<p><strong>EDIT &#8211; 2008-03-03:</strong> <em>Actually, screw this shady use of the remote debugger. Use <a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx">psexec like a man instead</a>, and enjoy the power of WMI.</em></p>

<p>This is nifty. Not something to scream about while tearing your clothes off in a moment of raw ardency, but still, I find it relatively useful.</p>

<p>You perhaps already know how <a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx">Windows Debugging Tools</a> such as <strong>WinDbg</strong> can output to a serial or network console, but I found out this concept can be extended to basically any console application that doesn&#8217;t really mess around with the terminal. See it as a mix between <strong>netcat</strong> and <strong>screen</strong>.</p>

<p>You just need &#8220;<strong>remote.exe</strong>&#8221; that comes with the Windows Debugging Tools. I personally use it to launch <a href="http://www.adobe.com/products/jrun/">Macromedia JRun4</a> in a console on a development server at one of my client sites to debug their web application remotely. That way I can see the log in my local console instead of toggling between the server and Terminal Services. Read on for an overview of how it works.
<span id="more-95"></span></p>

<p><strong>Syntax</strong></p>

<p>It&#8217;s fairly easy to grasp, if you keep in mind that parameters <strong>must</strong> be passed in a specific order.</p>

<p>A real-life, live example would be the following:</p>

<p><code>remote.exe /S "jrun.exe start devserver" jrun-console /U admin /U gauthiera</code></p>

<p><strong>/S</strong> specifies the command to run, followed by the session name.
In this particular case, it will run &#8220;jrun.exe start devserver&#8221; and name the session &#8220;jrun-console&#8221;.</p>

<p><strong>/U</strong> will specify which users are able to access the session. I heard it doesn&#8217;t work unless you&#8217;re part of a Domain. I have yet to verify this. You can repeat the parameter as many times as necessary. Ensure, however, that the user running <em>remote.exe</em> is in there. Hence, in my example &#8220;admin&#8221; and &#8220;gauthiera&#8221; being the user who ran the command on the server and the client that is allowed to connect, respectively.</p>

<p><strong>Client</strong></p>

<p>On the client side, issuing</p>

<p><code>remote.exe /C devserver jrun-console</code></p>

<p>will connect to the listening server. I just issued the server name, followed by the session name.</p>

<p>You can also make sessions visibles or invisible, query them, and all sorts of other things. More details can be found in the application help. Just issue <strong>remote.exe /?</strong>, as usual.</p>

<p>It just comes in handy, sometimes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/11/29/windows-tip-remote-console-with-remoteexe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Windows Tip: Active Directory MMC as Admin</title>
		<link>http://www.raptorized.com/2006/11/24/quick-windows-tip-active-directory-mmc-as-admin/</link>
		<comments>http://www.raptorized.com/2006/11/24/quick-windows-tip-active-directory-mmc-as-admin/#comments</comments>
		<pubDate>Fri, 24 Nov 2006 14:36:02 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=94</guid>
		<description><![CDATA[That title is way longer than it should be. Anyways, I just like to administer Active Directory Users and Computers from my workstation, on which I am logged on as a plain user. To run the Active Directory Users and Computers with Administrator rights, you can use some runas.exe magic. Just create a shortcut to [...]]]></description>
			<content:encoded><![CDATA[<p>That title is way longer than it should be. Anyways, I just like to administer Active Directory Users and Computers from my workstation, on which I am logged on as a plain user.</p>

<p>To run the Active Directory Users and Computers with Administrator rights, you can use some <strong>runas.exe</strong> magic. Just create a shortcut to the following target:</p>

<p><code>
C:\WINDOWS\system32\runas.exe /USER:DOMAIN\adminuser "mmc dsa.msc"
</code></p>

<p>Of course, just change <em>DOMAIN\adminuser</em> to whatever applies.</p>

<p>It works fine for my purposes. The trick is just knowing the name of that particular mmc snap-in.
That&#8217;s pretty basic knowledge, but I&#8217;ve been asked three times this week about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/11/24/quick-windows-tip-active-directory-mmc-as-admin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bypass WGA for downloads (From Mac and Linux too!)</title>
		<link>http://www.raptorized.com/2006/09/06/bypass-wga-for-downloads-from-mac-and-linux-too/</link>
		<comments>http://www.raptorized.com/2006/09/06/bypass-wga-for-downloads-from-mac-and-linux-too/#comments</comments>
		<pubDate>Wed, 06 Sep 2006 12:20:47 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=86</guid>
		<description><![CDATA[Some clever folks over at ghacks.net found a neat way to download to your heart&#8217;s content from microsoft while bypassing the silly WGA (Windows Genuine Advantage) check. Simply put, all you need is the mgadiag.exe tool and the URL you wish to download from. I tested it and it does work. It goes something like [...]]]></description>
			<content:encoded><![CDATA[<p>Some clever folks over at <a href="http://www.ghacks.net">ghacks.net</a> found a neat way to download to your heart&#8217;s content from microsoft while bypassing the silly WGA (Windows Genuine Advantage) check.</p>

<p>Simply put, all you need is the <a href="http://download.microsoft.com/download/5/3/3/533A40BE-936B-4267-B043-2F04233A78A6/MGADiag.exe">mgadiag.exe</a> tool and the URL you wish to download from.</p>

<p>I tested it and it does work. It goes something like this:</p>

<ul>
    <li>Run mgadiag.exe</li>
    <li>Look for the Download Center Code, and write it down (ex: 8KLVDJ6)</li>
    <li>Go to the URL you want to download from</li>
    <li>append <tt>&#038;Hash=8KLVDJ6</tt> to the URL (replace the value with your own)</li>
    <li>Enjoy your download.</li>
</ul>

<p>The important part is that it works in Wine. And in the recently released CrossOver Office for Mac OS. See screenshot below.</p>

<p><a class="imagelink" href="http://www.raptorized.com/wp-content/uploads/2006/09/image-1.png" title="WGA on OS X"><img id="image85" src="http://www.raptorized.com/wp-content/uploads/2006/09/image-1.thumbnail.png" alt="WGA on OS X" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/09/06/bypass-wga-for-downloads-from-mac-and-linux-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharing, Syncing and editing iCal over WebDAV</title>
		<link>http://www.raptorized.com/2006/08/16/sharing-syncing-and-editing-ical-over-webdav/</link>
		<comments>http://www.raptorized.com/2006/08/16/sharing-syncing-and-editing-ical-over-webdav/#comments</comments>
		<pubDate>Wed, 16 Aug 2006 13:54:11 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=72</guid>
		<description><![CDATA[iCal. Such a nice calendering application that is, and a pioneer in the vastly used ics calendar format. Is it the ultimate calendar ever? Well, almost. What drove me insane was that, while you can publish your calendars to a WebDAV server for others to see and subscribe to, you cannot edit the calendars that [...]]]></description>
			<content:encoded><![CDATA[<p>iCal. Such a nice calendering application that is, and a pioneer in the vastly used ics calendar format. Is it the ultimate calendar ever? Well, almost.</p>

<p>What drove me insane was that, while you can <em>publish</em> your calendars to a WebDAV server for others to see and subscribe to, you <strong>cannot</strong> edit the calendars that are published &#8212; unless you have a .mac account. While I sincerly hope this will be in Leopard, I&#8217;m not holding my breath.</p>

<p>You see, I run Linux on my desktop at home, and Mac OS X on my laptop, for work. I just wanted to find a simple way to share my calendar between the two machines, and to <strong>be able to edit them</strong> on any machine.</p>

<p>And it just so happens I just have the solution.
<span id="more-72"></span></p>

<h2>Configuring the WebDAV server</h2>

<p>Now, vast amounts of documentation can be found on the subject of setting up the WebDAV server. I&#8217;m not going to insult those who already worked on the problem by needlessly rewriting the instructions here. However, I will give you pointers.</p>

<ul>
<li><a href="http://www.serverwatch.com/tutorials/article.php/2176771">Enabling WebDAV on Apache [serverwatch.com]</a>
</li><li><a href="http://www.gregwestin.com/webdav_for_ical.php">WebDAV on OS X With iCal [gregwestin.com]</a>
</li><li><a href="http://www.icalx.com/">iCal Exchange (Free ics hosting)</a>
</li><li><a href="http://www.box.net/">Free WebDAV Hosting [box.net]</a>
</li></ul>

<p>So you could go ahead and setup your WebDAV server on *nix or OS X using the two first links, or you could just get free WebDAV hosting using the two others. Any will do.</p>

<p>For the sake of completeness, I will add my own WebDAV configuration below, on Gentoo Linux with Apache 2.
I just installed mod_dav on apache2, and added the following configuration to <em>/etc/apache/modules.d/10_mod_dav.conf</em>:</p>

<pre><code>
&lt;IfModule mod_dav.c>
  DAVLockDB /var/lock/mod_dav/Dav_Lock
  Alias /ical /var/dav/davroot
  DavMinTimeout 600
        &lt;Directory /var/dav/davroot>
                Dav On
                Options +Indexes
                AllowOverride None
                AuthType Digest
                AuthName "ical-webdav"
                AuthDigestFile /var/dav/htpasswd.digest
                Require valid-user
                Order allow,deny
                Allow from All
        &lt;/Directory>
&lt;/IfModule>
</code></pre>

<p>Of course, I just then added a user using <strong>htdigest</strong>. You could use &#8220;AuthType Basic&#8221; if you don&#8217;t use mod_digest.</p>

<p>I tested the WebDAV functionality using the OS X &#8220;Connect to server&#8221; Function. Just enter the path to your webdav location.</p>

<p><img id="image73" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-11.png" alt="connect_to_webdav" /></p>

<p>I was prompted for authentication. Upon submitting my credentials, the drive was mounted on the desktop.</p>

<p><img id="image74" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-12.png" alt="connected_webdav" /></p>

<p>You should test to see if you can write files to the WebDAV folder. Once that&#8217;s done, we can move on the beef of this article.</p>

<h2>Setting up iCal</h2>

<p>You should take care of iCal first. First thing first, go ahead and share your calendar via iCal, as usual. Enter your WebDAV server information.</p>

<p><img id="image75" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-13.png" alt="ical_sharing" /></p>

<p>Once all is published and well, according to the little icon next to your calendar (<img id="image76" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-15.png" alt="ical_sharing_widget" />), you have successfully published your calendar in a perfect <strong>read only fashion</strong>.</p>

<h2>Making iCal Sync from the server</h2>

<p>This is the sweet part, the core of this article. Now, we want iCal to also <em>download</em> the changes from the server. For this purpose, you must find out the Path of your <em>corestorage.ics</em> file for that calendar. Go have a look in ~/Libary/Application Support/iCal/Sources/, right now. (That being the &#8220;Library&#8221; folder from your <strong>Home Directory</strong>).</p>

<p><img id="image78" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-17.png" alt="ical_files" /></p>

<p>You should see some folder(s) with ugly names, one per Calendar you have. There&#8217;s no easy step to this, but you have to find out which is which. You can judge either by creation dates, or by opening the .ics file in your favorite text editor to see if you recognize some of the contents. Of course, if you only have <em>one</em> calendar, things are simplified, you will just have one folder, and one file.</p>

<p>In any case, write down the <strong>absolute path</strong> to the folder containing the ics file, it&#8217;s important. For instance, in my case, it turns out to be:</p>

<p>/Users/supernaut/Library/Application Support/iCal/Sources/2FBCA21F-80E0-44FD-B47A-ED34AE652010.calendar</p>

<h2>ical_sync.sh</h2>

<p>I have then written two scripts that take care of downloading, comparing and synchronizing your calendars from the WebDAV server.
You will need the following utilities installed, most are available from <a href="http://fink.sourceforge.net">Fink</a>.</p>

<ul>
    <li>wget
    </li><li>md5sum
</li></ul>

<p>Download and place the <a href="http://alex.underwares.org/projects/scripts/ical_sync.sh">following script</a> somewhere on your system. I created a folder named &#8220;bin&#8221; in my home directory and placed it there.</p>

<p>Next, edit the script and change the variables to match your situation, eg:</p>

<pre><code>
ICALPATH="/you/core/ics/folder"
WEBDAV="http://www.yourserver.com/path/to/dav/folder/calendar.ics"
LOGIN="yourlogin"
PASSWORD="yourpassword"

WGET="/sw/bin/wget"
MD5SUM="/sw/bin/md5sum"
</code></pre>

<p><em>Remember! The value for $ICALPATH is actually the one you wrote down earlier. Don&#8217;t worry if you mess it up, the script will warn you.</em></p>

<p>Once that&#8217;s done, run it in terminal. It should tell you if ANYTHING goes wrong and back off. I made it extra careful, it would suck to wreck your calendar because the server is down or answers strange things.</p>

<p>This will indeed download and update your calendar on your Mac from the WebDAV server. But how will you make this happen automagically? Well, I have taken care of that too.</p>

<h2>Working the Applescript magic</h2>

<p>Turns out I have written a second script, this time, an applescript one. You can download the source <a href="http://alex.underwares.org/projects/scripts/ical_wrapper.applescript">over there</a>.</p>

<p>Open it or paste it in Script Editor. You should then change the line</p>

<p><code>    do shell script "bash /Users/supernaut/bin/ical_sync.sh"</code></p>

<p>to match the location of the ical_sync.sh script and then hit &#8220;compile&#8221;.</p>

<p>Once that&#8217;s done, just save it somewhere, but make sure you save it:</p>

<ul>
<li>As an <strong>Application</strong>
</li><li>Make sure the startup screen is <strong>unchecked</strong>
</li></ul>

<p><img id="image79" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-18.png" alt="script_save" /></p>

<p>Once that&#8217;s done, simply replace the iCal icon in your dock by this script. You can add a pretty icon to it to make it more bearable.</p>

<p><img id="image80" src="http://www.raptorized.com/wp-content/uploads/2006/08/dock.png" alt="dock screenshot" /></p>

<p>Everytime you click on iCal then, it will sync up the calendar from the server, and tell if you if anything goes wrong. It will then proceed to launch the real iCal for you.</p>

<p>The AppleScript will show a dialog box if, say, the network is down, or something went wrong. For example:</p>

<p><img id="image81" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-20.png" alt="ical crapped out screenshot" /></p>

<p>You can then take action. As a precaution, in the event that it wasn&#8217;t what you wanted to do, the script will ask you if you still want to launch iCal.</p>

<p><img id="image82" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-21.png" alt="ical notice" /></p>

<p>I made it that way because, sometimes, you might want to look at your calendar without being connected to the internet. Makes sense, right?</p>

<p>Now, onwards to other Calendaring software.</p>

<h2> Configuring Other Calendars</h2>

<p>Nearly any other Calendaring software will not only fetch the lastest ics file from a webdav server, but will also <em>write it back</em> on change, or upon instruction to do so. This means, no problems whatsoever.</p>

<p>I use Korganizer in conjunction with Kontact on my KDE based desktop. Evolution and Sunbird could most likely do this as well.</p>

<p>I just added a calendar for a web source, and configured it with my WebDAV information:</p>

<p><img id="image77" src="http://www.raptorized.com/wp-content/uploads/2006/08/image-16.png" alt="kontact_korganizer_webdav" /></p>

<p><tt>Please excuse the craptacular quality of the screenshot. It was taken while forwarding X11 to my Mac over an SSH tunnel, and as such, fonts are screwy.</tt></p>

<p>Then, it just worked out of the box. No problem whatsoever.</p>

<h2>In conclusion</h2>

<p>This is somewhat of a cheap and dirty hack, but it works fairly well. I&#8217;ve been using it for three weeks and it&#8217;s a dream.
I sincerely hope that this has been somewhat useful to at least someone <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>Drop me a comment if you liked it, or if you have problems. Feel free to ask, really.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/08/16/sharing-syncing-and-editing-ical-over-webdav/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Apache hangs on Digest Secret generation</title>
		<link>http://www.raptorized.com/2006/08/11/apache-hangs-on-digest-secret-generation/</link>
		<comments>http://www.raptorized.com/2006/08/11/apache-hangs-on-digest-secret-generation/#comments</comments>
		<pubDate>Fri, 11 Aug 2006 15:24:47 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=70</guid>
		<description><![CDATA[I have a machine on my network that is very special. It&#8217;s a rather old Quad Xeon, an HP LH4 that I scavenged out of the proverbial dumpster of a buisness that didn&#8217;t want it anymore. In fact, they were about to trash six of them. I decided it was a crime to shitcan such [...]]]></description>
			<content:encoded><![CDATA[<p>I have a machine on my network that is very special. It&#8217;s a rather old Quad Xeon, an HP LH4 that I scavenged out of the proverbial dumpster of a buisness that didn&#8217;t want it anymore. In fact, they were about to trash <strong>six of them.</strong></p>

<p>I decided it was a crime to shitcan such beautiful machines, so with the help of my friend Mike <em>&#8220;I mangle french words&#8221;</em> Le Blanc, we drove there, armed with a large truck and patience. Carrying them down the three stories with no elevator was an interesting experience. I scavenged lots and lots of interesting hardware there.</p>

<p>But i&#8217;m getting ahead of myself here. The point is, lots of screwy things start occuring when you have a Quad SMP machine, such a timers and clock drift. I started having a lot of problems with Apache recently&#8230; once in a blue moon, on restart, it would spawn a single process with no PID file, and hang there. Checking out error_log pointed out that apache would apparently hang while generating the Secret seed for Digest authentication (mod_digest). Disabling mod_digest would have worked, but sadly, I use it. This could be found in error_log:</p>

<pre>
<code>
[notice] Digest: generating secret for digest authentication ...
[notice] Digest: done
[notice] Apache configured -- resuming normal operations
[notice] caught SIGTERM, shutting down
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[notice] Digest: generating secret for digest authentication ...
</code>
</pre>

<p>Fortunately, I cobbled up a fix. <strong>Updated! Read on for a more elegant fix.</strong>
<span id="more-70"></span></p>

<p>So it hangs while generating the secret for digest authentication. My gut feeling was that it had to do with the system running out of entropy (random data, that is). Probably waits for <em>apr_generate_random_bytes()</em> to complete but that never happens. I immediatly checked out the kernel for available entropy from /dev/random and friends.</p>

<pre>
<code>
# cat /proc/sys/kernel/random/entropy_avail
16
</code>
</pre>

<p>Now, I have no clue why, but entropy ran out (not quite, but close). Probably another whacky quad SMP issue. I&#8217;m starting to drive the Gentoo devs and maintainers crazy with my strange hardware.</p>

<p><strong>Note: Before proceeding, please read the updated section below.</strong></p>

<p>So, to remedy it, I fetched and installed <strong>rngd</strong> from the <strong>rng-tools</strong> package in Gentoo Portage. Check out your distro&#8217;s package repository for it or something similar. This tool allegedy gathers random data from I/O transactions and hardware stuff around. I compiled it, installed it and launched it. The Gentoo way:</p>

<pre><code>
# emerge -va rng-tools
# rc-update add rngd default &#038;&#038; /etc/init.d/rngd start
</code></pre>

<p>Once that was taken care of, I checked the available entropy by querying the kernel once again.</p>

<pre><code>
# cat /proc/sys/kernel/random/entropy_avail
6854
</code></pre>

<p>That&#8217;s much better. To my surpise, Apache finished loading instantly the split second rngd started up. Schweet.
Sounds like that fixes the problem. <strike>I have no idea why it occurs right now, but this works around it elegantly.</strike></p>

<p><strong>UPDATE!</strong>
I figured out what the greasy poop was going on. Installing rngd will gather entropy using /dev/urandom if no hardware RNG is found by default. I didn&#8217;t pay much attention to that detail at the time. However, you will notice that when installing the Apache Portable Runtime on Gentoo (dev-libs/apr) the use flag <em>urandom</em> is available. Using <em>euse</em> (from gentoolkit) to get info about it returns the following:</p>

<pre><code>
valkyrie ~ # euse -i urandom
global use flags (searching: urandom)
************************************************************
no matching entries found

local use flags (searching: urandom)
************************************************************
[-    ] urandom (dev-libs/apr):
Use /dev/urandom instead of /dev/random
</code></pre>

<p>This will make apache fetch randomness from /dev/urandom directly, therefore giving the same result as rng-tools. The proper solution would be to <strong>just re-emerge <em>dev-libs/apr</em> with the <em>urandom</em> use flag enabled.</strong></p>

<p>I tried it and it works beautifully, and looks a lot more elegant to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2006/08/11/apache-hangs-on-digest-secret-generation/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Subversion: On fixing &#8220;can&#8217;t recode string&#8221;&#8230;</title>
		<link>http://www.raptorized.com/2005/11/16/subversion-on-fixing-cant-recode-string/</link>
		<comments>http://www.raptorized.com/2005/11/16/subversion-on-fixing-cant-recode-string/#comments</comments>
		<pubDate>Wed, 16 Nov 2005 18:43:02 +0000</pubDate>
		<dc:creator>mr_daemon</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Tutorials/How-To]]></category>
		<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.raptorized.com/?p=51</guid>
		<description><![CDATA[Well, I recently set up a subversion system where I work, on Windows. Clients are using Tortoise SVN, and everything works beautifully. However this morning, I checked out the trunk on my Mac OS X powered Powerbook, and the lawnmower hit a brick the split second svn tried to checkout a folder with accented characters [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I recently set up a subversion system where I work, on Windows. Clients are using Tortoise SVN, and everything works beautifully. However this morning, I checked out the trunk on my Mac OS X powered Powerbook, and the lawnmower hit a brick the split second svn tried to checkout a folder with accented characters (In french, for instance. Could have been german umlauts).</p>

<p>svn: Can&#8217;t recode string</p>

<p>Well, this was a matter of changing the encoding used by my system locale to match the one of the repository, which was done by editing the file <em>.profile</em> in my home directory (I use bash as a default shell, which is the default on OS X 10.3 and above, as opposed to csh) and added the following:</p>

<pre>
<code>
export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"
</code>
</pre>

<p>This basically had the effect of setting up the locale to UTF8, which swallowed the file without problems. I just though I&#8217;d post it there because it was useful &#8212; I didn&#8217;t really google around to check out if that solution was already out there, but I will mirror it on <a href="http://www.underwares.org/zcgi/contents">underwares.org</a> anyways.</p>

<p>Hope this helps someone, somehow. <img src='http://www.raptorized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.raptorized.com/2005/11/16/subversion-on-fixing-cant-recode-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
