<?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>The Stata Things &#187; FreeBSD</title>
	<atom:link href="http://enoriver.net/index.php/category/freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://enoriver.net</link>
	<description>computing for fun and profit</description>
	<lastBuildDate>Mon, 07 May 2012 13:43:02 +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>Goodbye, FreeBSD</title>
		<link>http://enoriver.net/index.php/2011/02/03/goodbye-freebsd/</link>
		<comments>http://enoriver.net/index.php/2011/02/03/goodbye-freebsd/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 03:42:08 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=1469</guid>
		<description><![CDATA[I cut my teeth at open source software on Old Ironsides, a 2000-vintage 1U PIII/1G server that I bought for $35 back in 2007. That machine is now dead. The BIOS started to hang at a variety of points along the way to loading the OS, blaming a bad CPU speed setting. At first I [...]]]></description>
			<content:encoded><![CDATA[<p>I cut my teeth at open source software on Old Ironsides, a 2000-vintage 1U PIII/1G server that I bought for $35 back in 2007. That machine is now dead. The BIOS started to hang at a variety of points along the way to loading the OS, blaming a bad CPU speed setting. At first I thought that it was just a matter of replacing the CMOS battery, but when I opened the case I found the CPU fan hanging from its power lines because the little hook that it should lock onto broke off, no doubt because the plastic has just become that brittle over time. Also, one capacitor is popped -- not oozing, just domed.</p>
<p>Like one of those B-24 bombers that would come back with sunlight showing through the wings where they caught flak, Old Ironsides is a resilient machine. Laying it flat so the fan would sit on top of the CPU by virtue of gravity and replacing the CMOS battery brought it back to life long enough for some thorough data recovery. But it's been drawing a lot of power, about 60-80 Watt, and maintaining the ports and whatnot had become a bit of a chore.</p>
<p>So this accident gave me the excuse to get me a nicer, greener setup: the <a href="http://www.intel.com/products/desktop/motherboards/D510MO/D510MO-overview.htm">Intel D510MO</a> motherboard in an <a href="http://www.in-win.us/products_pccase_series.php?cat_id=1&#038;series_id=47">In-Win BP655</a> case with 2G of DDR2 RAM, a 500GB HD, and a CD-DVD drive, because paying $25 is much more pleasant than trying to install an OS off a USB stick. The lot cost about $260 at <a href="http://www.intrex.com/">Intrex Computers</a> down the road.</p>
<p>Not wanting to throw away all that Unix human capital I accumulated over the past three years, I dug around for a compromise between ease of use and FOSS, and found <a href="http://www.amahi.org/">Amahi</a>, via <a href="http://www.webmonkey.com/2010/02/set_up_a_home_server/">Webmonkey</a>. By the way, do you know how old Webmonkey is? That's where I learned HTML in 1997, at least that old. Many happy returns, whenever its birthday is.</p>
<p>Amahi works. It runs on Fedora 12 for now, but the Fedora 14 edition is in alpha testing and anyway there's nothing wrong that I can think of with Fedora 12, once you do <code>yum -y update</code> on it. Amahi has everything I want, and while VNC did take me some fiddling, it was nothing compared to having to configure every little service by hand like I had to do with FreeBSD. I didn't complain at the time, it was educational, but the novelty wore off right away.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2011/02/03/goodbye-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The zen of UNIX</title>
		<link>http://enoriver.net/index.php/2010/09/29/the-zen-of-unix/</link>
		<comments>http://enoriver.net/index.php/2010/09/29/the-zen-of-unix/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 15:41:51 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=1373</guid>
		<description><![CDATA[My main trouble with UNIX is that I'll go looking for a quick answer, find it, and then somehow still keep digging until I'm utterly stumped, long after I solved the initial problem. Here's one example: On the recommendation of my friend Bálint Érdi, I signed on with Dropbox, and I figured one good use [...]]]></description>
			<content:encoded><![CDATA[<p>My main trouble with UNIX is that I'll go looking for a quick answer, find it, and then somehow still keep digging until I'm utterly stumped, long after I solved the initial problem. Here's one example:</p>
<p>On the recommendation of my friend <a href="http://balinterdi.com/">Bálint Érdi</a>, I signed on with <a href="http://dropbox.com">Dropbox</a>, and I figured one good use of it would be to keep my vimrc files in sync across three virtual Linux computers I'm having to use.</p>
<p>So, I went looking for the originals -- the Vim configuration files on the Linux Mint 8 VM that I am using now. Except I didn't go straight to the VM. I took a detour through Chrome, and typed this in the address box: "where is .vimrc". That got me <a href="http://www.computing.net/answers/linux/vimrc-location/26702.html">here</a>, which is a comment thread that happened six years ago. </p>
<p>Of course, the answer is trivial: <code># locate vimrc</code>. That's UNIX love right there. If you want to find a file, just <code>locate</code> it. If you're the almighty root (#), the computer will fetch it without a fuss. But the more fascinating bit is a little further below, posted by the user Wolfbone:</p>
<blockquote><p>
.foorc = <strong>r</strong>untime <strong>c</strong>onfiguration file for programme "foo" located in user's home directory.</p>
<p>/etc/foorc (if it exists) = global (all users) runtime configuration file for programme "foo", overridden by .foorc, if it exists.</p>
<p>Suggesting to someone who cannot find an 'rc' file that '#locate vimrc' is a useful command is not very helpful.
</p></blockquote>
<p>I had no idea that vimrc was called that in order to respect this [r]untime [c]onfiguration naming convention. I also had no idea that the ~/.foorc files are there to override /etc/foorc files. Sounds like an architecture thing. I am guessing that the common use is that your IT guy will put configuration files in /etc/foorc, and if you like those, fine. If you don't, just make up your own .foorc files and stick them in the home folder. Neat, but it gets even better.</p>
<p>If you run this <code># locate vimrc</code> command, it'll turn up /etc/vimrc.local. If you then <code>cat</code> vimrc you can see that it defers to vimrc.local if it exists. So, there are two available layers of configuration overrides: first is /etc/vimrc.local, then ~/.vimrc, which reigns supreme. What's the use of that? And how is this implemented in FreeBSD? My initial guess was that the FreeBSD convention is that rc is a file extension, as in mail.rc. But then in the /etc folder I also saw things like rc.firewall. And in /usr/local/etc I saw things called ddclient.conf. What's different between files that start with rc., or end with .rc, or end with .conf?</p>
<p>So many questions, so little time. Still, this is better than my experience with Windows, where things either just work (thank you, Windows 7) or they're so arcane that, if I ever attempt them, it's always on guts alone. I have no theory whatsoever of what might go wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2010/09/29/the-zen-of-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note to self: ssh does not like loose home directory permissions</title>
		<link>http://enoriver.net/index.php/2010/08/13/note-to-self-ssh-does-not-like-loose-home-directory-permissions/</link>
		<comments>http://enoriver.net/index.php/2010/08/13/note-to-self-ssh-does-not-like-loose-home-directory-permissions/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 20:42:39 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=1346</guid>
		<description><![CDATA[This really is a note to myself, regarding my FreeBSD setup. I use this section to jot down things that I expect to forget, because I use them rarely. Google is alright, but note-taking won't hurt anything. So here: A couple of days ago PuTTY started to demand password authentication, which it shouldn't, because I [...]]]></description>
			<content:encoded><![CDATA[<p>This really is a note to myself, regarding my FreeBSD setup. I use this section to jot down things that I expect to forget, because I use them rarely. Google is alright, but note-taking won't hurt anything. So here: </p>
<p>A couple of days ago PuTTY started to demand password authentication, which it shouldn't, because I normally log in with a public-private key pair. That was a good excuse to refresh my keys anyway, so I generated a new pair and overwrote the authorized_keys file. I hoped, again and without any basis in reason or logic, that the problem would go away as quietly as it turned up. It did not.</p>
<p>Fiddling with /etc/ssh/sshd_config didn't help either. What did help was fixing the home directory permissions: doing ls -l /usr/home as a super-user showed soon enough that they were drwxrwxr-x, when they should have been drwr-xr-x at a minimum. I can't remember when I changed them or why, but the problem is fixed with chmod 755 /usr/home/<em>username</em>. That this was indeed the fault of loose permissions was confirmed by a quick examination of /var/log/auth.log. The idea to look there came from <a href="http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2007-01/msg01592.html">here</a>. Some further clarifications on ssh, including a sample config file, are available <a href="http://forums.freebsd.org/archive/index.php/t-1508.html">here</a>.</p>
<p>The other thing I learned from /var/log/auth.log is that I am getting hit by a flood of unauthorized login attempts from the weirdest places every day. So far, so good.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2010/08/13/note-to-self-ssh-does-not-like-loose-home-directory-permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New piece in my FreeBSD kit: psearch</title>
		<link>http://enoriver.net/index.php/2010/01/07/new-piece-in-my-freebsd-kit-psearch/</link>
		<comments>http://enoriver.net/index.php/2010/01/07/new-piece-in-my-freebsd-kit-psearch/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 18:58:02 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=1008</guid>
		<description><![CDATA[On December 11, 2009 portaudit turned up a problem in a package called libtool-2.2.6a_1. So, as usual, I figured I'd go to whatever port that is, and do a portupgrade. Unfortunately, whereis libtool turned up no such port. What's the rookie accidental admin to do? Take good notes, for one. While dabbling in an unrelated topic [...]]]></description>
			<content:encoded><![CDATA[<p>On December 11, 2009 <code>portaudit</code> turned up a problem in a package called libtool-2.2.6a_1. So, as usual, I figured I'd go to whatever port that is, and do a <code>portupgrade</code>. Unfortunately, <code>whereis libtool</code> turned up no such port. What's the rookie accidental admin to do?</p>
<p>Take good notes, for one. While dabbling in an unrelated topic -- I was investigating how to enable wake-on-LAN for this machine -- I found <a href="http://forums.freebsd.org/showthread.php?t=6664">a reference</a> to a command I never knew existed: <code>psearch</code>. It's a port and I didn't have it installed, but <code>whereis psearch</code> led me to it quickly enough, and then it was just a matter of <code>make install clean</code>. Now, back to the portaudit problem: <code>psearch libtool</code> found the buggy port immediately: devel/libtool22.</p>
<p>I wasn't sure that this quick note was worth a post, so I left it in the drafts folder. But today's <code>portaudit</code> revealed multiple vulnerabilities in php5. Fixing that is in progress. Meanwhile I thought I'd post this thing after all, so I'll have a quick way to jog my memory next time I go looking for a well-hidden port.</p>
<p>One annoying thing is that I'm still unclear on when to use portupgrade -r, portupgrade -R, or portupgrade -rR. My default is the latter because I find it comforting that these recursive upgrades take care of all sorts of dependencies for me, both up and down stream. But man does it take a long time. That Pentium III is showing its age. It'd be good if I could safely cut some corners. So, dear readers, please comment away. I am curious.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2010/01/07/new-piece-in-my-freebsd-kit-psearch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improv FreeBSD system administration</title>
		<link>http://enoriver.net/index.php/2009/11/12/improv-freebsd-system-administration/</link>
		<comments>http://enoriver.net/index.php/2009/11/12/improv-freebsd-system-administration/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 15:34:37 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[portaudit]]></category>
		<category><![CDATA[portupgrade]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=994</guid>
		<description><![CDATA[One drawback of a system that's giving you very little trouble is that between bouts of fixing whatever does occasionally go wrong you forget what you're supposed to do. We should all be this lucky, but it's still an annoyance. FreeBSD, for example, will sometimes turn up a damaged package or two in response to [...]]]></description>
			<content:encoded><![CDATA[<p>One drawback of a system that's giving you very little trouble is that between bouts of fixing whatever does occasionally go wrong you forget what you're supposed to do. We should all be this lucky, but it's still an annoyance.</p>
<p>FreeBSD, for example, will sometimes turn up a damaged package or two in response to <code>#portaudit</code>. The procedure for that, according to the <a href="http://www.freebsd.org/doc/en/books/handbook/ports-using.html">relevant chunk</a> of the FreeBSD Handbook is that you <em>only need</em> <code>#portsnap extract</code> when you run <code>#portsnap fetch</code> <em>for the first time</em>. After that, you already have a ports tree on your system, and all you need is <code>#portsnap update</code>.</p>
<p>Had I remembered that, I wouldn't be sitting here writing this post while my ports tree is rebuilding itself for no good reason. On the same topic (of things to remember): according to the same FreeBSD Handbook, I should run <code>#pkgdb -F</code> once in a while, pretty much before every <code>#portupgrade</code>. An overview of what that does is <a href="http://www.math.colostate.edu/~reinholz/freebsd/pkgdb_F.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/11/12/improv-freebsd-system-administration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download code from books with wget</title>
		<link>http://enoriver.net/index.php/2009/10/30/download-code-from-books-with-wget/</link>
		<comments>http://enoriver.net/index.php/2009/10/30/download-code-from-books-with-wget/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 16:51:31 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=986</guid>
		<description><![CDATA[The books I'm reading these days come with examples of code, saved on associated web sites. Sometimes that code is neatly packaged into a zip archive or tarball, with every piece of code sitting in a directory named after the chapter it was referenced in. But other times these web sites have the code sitting [...]]]></description>
			<content:encoded><![CDATA[<p>The books I'm reading these days come with examples of code, saved on associated web sites. Sometimes that code is neatly packaged into a zip archive or tarball, with every piece of code sitting in a directory named after the chapter it was referenced in. But other times these web sites have the code sitting in directories that you're expected to browse by hand. One example is <a href="http://sobell.com/UB2/code/">here</a>.</p>
<p>Suppose you don't want to do that. Suppose you just want to get the code all in the same directory structure on your local machine, and only the code, not the associated html files that make it render in a browser. In that situation, you can do this:<br />
<code><br />
wget -r -np -nH -R "*.html*" http://www.sobell.com/UB2/code/<br />
</code><br />
Recursive downloads with wget are discouraged because they hit the web server hard with a fast succession of requests. But I think the example above is a case of polite wget use: it only downloads what the original host of the code intended to make available for downloading. The <em>-r</em> part means "recursive". The <em>-np</em> part means "but not upwards". The <em>-nH</em> part means "and do not visit any hosts referenced here". Finally, the <em>-R "*.html*"</em> part means "and I don't want any file with .html in it".</p>
<p>As it turns out, wget can do a lot of things, so its man page is rather long. I googled around for a more concise reference, and I found <a href="http://www.informatik.uni-hamburg.de/RZ/software/www/wget/wget_4.html">this</a>. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/10/30/download-code-from-books-with-wget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backing up your data</title>
		<link>http://enoriver.net/index.php/2009/09/14/backing-up-your-data/</link>
		<comments>http://enoriver.net/index.php/2009/09/14/backing-up-your-data/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 06:03:36 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=923</guid>
		<description><![CDATA[Microsoft makes this free utility called SyncToy. I don't know if it will come standard with Windows 7, but it probably should. It provides a very elegant way to back up your data to an external hard drive or to a Samba share. You can even schedule it to run regularly, say right after you're [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft makes this free utility called <a href="http://www.microsoft.com/downloads/details.aspx?familyid=c26efa36-98e0-4ee9-a7c5-98d0592d8c52&amp;displaylang=en">SyncToy</a>. I don't know if it will come standard with Windows 7, but it probably should. It provides a very elegant way to back up your data to an external hard drive or to a Samba share. You can even schedule it to run regularly, say right after you're done scanning for viruses every night. You do have an automatic nightly scan, right? Instructions for scheduling SyncToy are here: <a href="http://tweakhound.com/xp/backup/1.htm">XP</a> and <a href="http://tweakhound.com/vista/backup/synctoy.htm">Vista</a>.</p>
<p>The UNIX equivalent to this would be <a href="http://www.samba.org/rsync/">rsync</a>. Cygwin comes with it. In FreeBSD you can install it from ports:</p>
<pre><code>
portsnap fetch update
whereis rsync
cd /usr/ports/net/rsync
make install
</code></pre>
<p>Then, assuming that you have ssh access with a key pair to your server, all you need to do is this:</p>
<pre><code>
rsync -avzu [username]@example.com:[yourfolder] /cygdrive/g/[yourlocalmirror]
</code></pre>
<p>A simple <code>ls /cygdrive</code> in Cygwin will tell you what letter corresponds to your external hard drive. In my case it's g. I back up this web site to a WD MyBook with rsync. My wife uses SyncToy to back up her Vista notebook to her Samba share on our FreeBSD home server.</p>
<p>Now: if you do not have ssh access to your UNIX server yet, see my earlier notes for setting up OpenSSH on FreeBSD, or buy <a href="http://nostarch.com/freebsdserver.htm">the book</a>. For Linux, see <a href="http://www.trueblade.com/knowledge/using-rsync-and-cygwin-to-sync-files-from-a-linux-server-to-a-windows-notebook-pc">here</a>. If rsync fails on the first run with some cryptic message that includes "error in rsync protocol data stream (code 12)" just check the file permissions.  That fixed it for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/09/14/backing-up-your-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion: UNIX server, Windows XP client</title>
		<link>http://enoriver.net/index.php/2009/08/20/subversion-unix-server-windows-xp-client/</link>
		<comments>http://enoriver.net/index.php/2009/08/20/subversion-unix-server-windows-xp-client/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 05:44:39 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=890</guid>
		<description><![CDATA[It took me long enough to figure this out to be worth documenting. If you use Windows, you can use TortoiseSVN with a local repository, installed by default on C:\svn. But you can also use TortoiseSVN to connect to a remote UNIX repository. They hook up through PuTTY, and the protocol is svn+ssh://. There are [...]]]></description>
			<content:encoded><![CDATA[<p>It took me long enough to figure this out to be worth documenting. If you use Windows, you can use <a href="http://tortoisesvn.net/">TortoiseSVN</a> with a local repository, installed by default on C:\svn. But you can also use TortoiseSVN to connect to a remote UNIX repository. They hook up through PuTTY, and the protocol is svn+ssh://.</p>
<p>There are several pieces to this. Let's say your UNIX machine runs FreeBSD. If so, you're in luck. You can install OpenSSH using instructions from <a href="http://www.freebsd.org/doc/en/books/handbook/openssh.html">here</a> or <a href="http://nostarch.com/freebsdserver.htm">here</a>. Then you can install Subversion. Instructions for that are <a href="http://enoriver.net/index.php/2009/03/01/ive-got-subversion/">right here</a>. Now you need to get TortoiseSVN to talk to it from your Windows machine. Instructions for that are <a href="http://tortoisesvn.net/ssh_howto">here</a>.</p>
<p>Now here's what didn't work, and how I fixed it: as soon as I had everything in place, I went to the first random Windows Explorer entry and right-clicked it so I'd get to the TortoiseSVN menu, then Repo-browser. I was anxious to browse this:</p>
<p><code>svn+ssh://gabi@192.168.10.2/usr/home/svn/repos</code></p>
<p>But I was out of luck. By default, TortoiseSVN uses TortoisePlink to connect to a UNIX box. This simply is a version of <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">Plink</a> that will not open a command line, because you don't need one. Normally, this works. For me it didn't. First, it kept inviting me over and over again to enter my user name. This is a known problem and it has a <a href="http://tortoisesvn.net/node/35">solution</a>, but I did not like it. Then I tried to set PuTTY as the ssh client (as explained further down below), but then my connection to the server would close immediately, as if the ssh daemon had rejected my credentials.</p>
<p>So, first I logged into the FreeBSD with PuTTY to make sure that my key worked. Then I opened Cygwin and ran</p>
<p><code>svn list svn+ssh://gabi@192.168.10.2/usr/home/svn/repos</code></p>
<p>This was to make sure that I actually did have access to the Subversion server through the svn+ssh:// protocol. When this returned the list of directories I had added yesterday from the Ubuntu box, I knew that all was well, and the trouble was contained to TortoiseSVN.</p>
<p>It was actually contained to the PuTTY default settings. TortoisePlink can establish a PuTTY session if the default settings contain the path to the private key. If you just installed PuTTY and established a named SSH connection that works (as explained <a href="http://tortoisesvn.net/ssh_howto">here</a>), then you know that you have a working key and you know where it is, but your default settings are still pristine. Let's call this named SSH connection MyConnection and let's suppose that you also saved an "Auto-login username" to go with it (that's in Connection -&gt; Data; refer back to <a href="http://tortoisesvn.net/ssh_howto">the instructions</a> if needed).</p>
<p>Now "Load" the Default Settings just to make sure that all the boxes are cleared. Then in the left pane navigate to SSH, then to Auth. Then, in the "Private key for authentication" text box, browse to where you stored your .ppk file. Next, "Save" your Default Settings. They're now as empty as before, with the one exception of the path to the .ppk file. This worked for me. I was able to browse my existing repository both via</p>
<p><code><code>svn+ssh://gabi@192.168.10.2/usr/home/svn/repos</code></code></p>
<p>and via</p>
<p><code>svn+ssh://MyConnection/usr/home/svn/repos</code></p>
<p>Finally, to ensure that TortoiseSVN uses its own TortoisePlink as a ssh client, find the Settings entry at the bottom of the TortoiseSVN menu in Windows Explorer. Then go to the Network tab, and check that the "ssh client" box is empty. This, by the way, is where you could set the ssh client to PuTTY instead, if you wanted to, but that did not work for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/08/20/subversion-unix-server-windows-xp-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Baby steps with Subversion</title>
		<link>http://enoriver.net/index.php/2009/08/19/baby-steps-with-subversion/</link>
		<comments>http://enoriver.net/index.php/2009/08/19/baby-steps-with-subversion/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 15:39:06 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=881</guid>
		<description><![CDATA[I set up a Subversion server on the FreeBSD box a while back, then didn't do much with it until this past weekend, when Software Carpentry mentioned it. I installed SmartSVN on the Ubuntu box and declared a new repository with a svn+ssh:// protocol. I figured it would make sense, since I connect to the [...]]]></description>
			<content:encoded><![CDATA[<p>I set up a Subversion server on the FreeBSD box <a href="http://enoriver.net/index.php/2009/03/01/ive-got-subversion/">a while back</a>, then didn't do much with it until this past weekend, when Software Carpentry <a href="http://software-carpentry.org/version.html">mentioned it</a>.</p>
<p>I installed SmartSVN on the Ubuntu box and declared a new repository with a svn+ssh:// protocol. I figured it would make sense, since I connect to the server through a ssh tunnel with authentication key files. I was right. SmartSVN connected to the server without a hitch. Then I tried svn://, http:// and https://. None of them worked. The latter two require some extra module (WebDAV?) enabled in the Apache server. I don't know much about any of it, so I figured I'd just stick with svn+ssh:// and be done with it.</p>
<p>Then my first commit attempt promptly failed, with a message that a certain lock file could not be opened.</p>
<p>That looked like a file permissions issue to me. In FreeBSD, the /etc/group file lists the group names, ID's and members. I had a group named svn present already, so I added my name to the member list and saved over. Now whatever that group's permissions needed to be, I was going to be in on them.</p>
<p>Then, as root, I did this:<br />
<code><br />
chown -R gabi:svn /usr/home/svn/repos<br />
</code><br />
OK, so now I own the files in any sub-directories of the repository, and the group permissions will apply to the svn group. I set them like so:<br />
<code><br />
chmod 775 /usr/home/svn/repos/hooks<br />
chmod 775 /usr/home/svn/repos/locks<br />
chmod 775 /usr/home/svn/repos/db<br />
</code><br />
It worked. I could commit a folder with some example text file in it. Then I changed it and updated it, and then I made a different working copy and caused a conflict, so I would have something to resolve. All of that worked as advertised. There are a few things left to do, like branching, tagging, merging, and reverse and forward integration. I'll write more as I go through the learning process, but before I close this post I have to mention <a href="http://betterexplained.com/articles/a-visual-guide-to-version-control/">this neat little post</a>. It's a better introduction to how version control works and why it's done than even Chapter 1 in the <a href="http://books.google.com/books?id=tMpR77ZeHhMC&amp;dq=version+control+with+subversion&amp;printsec=frontcover&amp;source=bn&amp;hl=en&amp;ei=v7CqSZW0BdKgtwee8IjgDw&amp;sa=X&amp;oi=book_result&amp;resnum=5&amp;ct=result#v=onepage&amp;q=&amp;f=false">Subversion book</a>, which is great, so that's saying something. Better explained, indeed. I'd never heard of them. All hail Google, again.</p>
<p>And now my Stata code can go under proper version control. Life's good.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/08/19/baby-steps-with-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up NFS: FreeBSD server, Ubuntu client</title>
		<link>http://enoriver.net/index.php/2009/05/19/setting-up-nfs-freebsd-server-ubuntu-client/</link>
		<comments>http://enoriver.net/index.php/2009/05/19/setting-up-nfs-freebsd-server-ubuntu-client/#comments</comments>
		<pubDate>Tue, 19 May 2009 17:21:34 +0000</pubDate>
		<dc:creator>Gabi Huiber</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[NFS]]></category>

		<guid isPermaLink="false">http://enoriver.net/?p=709</guid>
		<description><![CDATA[I set up Samba a while back, and that turned out to be a great way to get stuff I used to keep on separate Windows computers all in one place on the FreeBSD box, as readily accessible as if they were still on the original local hard drives. Now I'd like to do the [...]]]></description>
			<content:encoded><![CDATA[<p>I set up Samba a while back, and that turned out to be a great way to get stuff I used to keep on separate Windows computers all in one place on the FreeBSD box, as readily accessible as if they were still on the original local hard drives. Now I'd like to do the same with a couple of Ubuntu boxes I set up around the house. For that, I will need NFS.</p>
<p>As in Samba's case, there are some changes to be made to the server, and some to the client. I want to share files across all the computers on my home network. The usual wild card for multiple client computers is [network gateway IP]/[mask]. I use my own network gateway IP, 192.168.10.0, as an example. Different router makers use different numbers after the 192.168 part. The mask is 255.255.255.0.</p>
<p>There are four main steps to setting up NFS on the server side. First you enable packet filtering, then you edit three system files: /etc/exports, /etc/hosts.allow, and /etc/rc.conf.</p>
<p>The first step, enabling packet filtering, has three sub-steps of its own, detailed below.</p>
<p>First, you write an /etc/pf.conf file. I wrote mine using Ian Robinson's instructions posted <a href="http://forums.bsdnexus.com/viewtopic.php?id=2046">here</a>:<br />
<code><br />
# my /etc/pf.conf file<br />
# /24 in 192.168.10.0/24 is equal to saying the netmask is 255.255.255.0<br />
# 1. define macros for local network NIC and IP address<br />
nic_1 = "fxp0"<br />
lan = "192.168.10.0/24"<br />
# 2. write pf commands to pass all traffic to and from local network<br />
# the macros from above are used and are prefixed with a "$"<br />
pass in on $nic_1 from $lan to any keep state<br />
pass out on $nic_1 from $lan to any keep state<br />
</code><br />
Second, you edit /etc/rc.conf with this line:<br />
<code><br />
pf_enable="YES"<br />
</code><br />
Third, you start the pf daemon:<br />
<code><br />
/etc/rc.d/pf start<br />
</code><br />
You can check that your packet filtering rules are live:<br />
<code><br />
pfctl -sr<br />
</code><br />
If you already had packet filtering, and instead of writing an /etc/pf.conf file from scratch you just had to edit your existing one, then you will skip the two steps above and instead activate your new rules like so:<br />
<code><br />
pfctl -nf /etc/rc.conf // this is to check the edited file for problems<br />
pfctl -f /etc/rc.conf  // to activate the new rules, remove the -n flag<br />
</code><br />
That's it for packet filtering. Next, write your /etc/exports file. I wanted to make my server home directory /usr/home/gabi available to the root user of any client computer on my home network. So, my /etc/exports file looks like this:<br />
<code><br />
/usr/home/gabi -network 192.168.10 -mask 255.255.255.0<br />
</code><br />
There is an extra option you could add at the end of the line above. You can direct the root user of the client server to adopt the server privileges of any user registered there, based on that user's ID number (known as UID in the manual's parlance). For example, typing -maproot=1001 at the end of the line will give the root user on the client computer the privileges of the user identified on the server by the UID 1001. This is useful, for example, if you want to grant the remote user specific server privileges. By default, FreeBSD is conservative: not using a -maproot instruction will map the remote user to <code>nobody:nobody</code>. As you might have guessed, this guy can't do much. We'll get back to this part later.</p>
<p>Moving on to step 3: adjust the /etc/hosts.allow settings. This amounts to letting a few daemons loose on the local network and restricting them everywhere else:</p>
<p><code><br />
rpcbind : 192.168.10.0/255.255.255.0 : allow<br />
rpcbind : ALL : deny<br />
portmap : 192.168.10.0/255.255.255.0 : allow<br />
portmap : ALL : deny<br />
mountd : 192.168.10.0/255.255.255.0 : allow<br />
mountd : ALL : deny<br />
statd : 192.168.10.0/255.255.255.0 : allow<br />
statd : ALL : deny<br />
</code><br />
The fourth and final step is to edit /etc/rc.conf to enable these daemons:<br />
<code><br />
rpcbind_enable="YES"<br />
nfs_server_enable="YES"<br />
mountd_flags="-r"<br />
rpc_lockd_enable="YES"<br />
rpc_statd_enable="YES"<br />
</code></p>
<p>On the client computer things are easier. Ubuntu comes with the wonderful Synaptic Package Manager (in Gnome, find it in the System/Administration menu). Search for the string "nfs" and mark the packages "nfs-common" and "portmap" for installation. Synaptic will suggest some dependencies and ask for permission to install some other packages as well. Let it.</p>
<p>That's all. Now in a terminal window on the client you can set up a mount point, e.g.<br />
<code><br />
$ mkdir ~/from_server<br />
</code><br />
And then you can mount any of the server directories listed in your /etc/exports file onto it, like so:<br />
<code><br />
$ sudo mount your_server_IP:/your/remote/directory /home/you/from_server<br />
</code></p>
<p>Note that Ubuntu, by default, does not come with a root user. Instead, the user who installs the Ubuntu OS is granted some administrative privileges that make him/her a kind of quasi-root. This is to make Ubuntu systems safe for beginner UNIX-ers. The -maproot=UID directive can work with that. Leaving the /etc/exports file without a -maproot=UID instruction showed the content of my /usr/home/gabi folder on the FreeBSD server in the /home/gabi/from_server mount point on the client computer but the files were read-only. On the other hand, adding "-maproot=UID" to the last line of the /etc/exports file on the server did what I wanted: the Ubuntu user gabi received the same rights to the /home/gabi/from_server folder on the client as the FreeBSD user gabi had to the /usr/home/gabi folder on the server. In other words, I now can read/write/navigate my server home directory as if it were on my client computer.</p>
]]></content:encoded>
			<wfw:commentRss>http://enoriver.net/index.php/2009/05/19/setting-up-nfs-freebsd-server-ubuntu-client/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

