<?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>don't feed the seagulls &#187; FreeBSD</title>
	<atom:link href="http://dontfeedtheseagulls.com/category/freebsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://dontfeedtheseagulls.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 15 Feb 2011 03:21:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Change SUEXEC docroot without changing makefiles under FreeBSD</title>
		<link>http://dontfeedtheseagulls.com/2010/07/23/change-suexec-docroot-without-changing-makefiles-under-freebsd/</link>
		<comments>http://dontfeedtheseagulls.com/2010/07/23/change-suexec-docroot-without-changing-makefiles-under-freebsd/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 13:27:33 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[suexec]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=59</guid>
		<description><![CDATA[make WITH_SUEXEC=yes SUEXEC_DOCROOT=&#8217;/foo&#8217; Alternately you can add WITH_SUEXEC=yes SUEXEC_DOCROOT=&#8217;/foo&#8217; to the /etc/make.conf file]]></description>
			<content:encoded><![CDATA[<p>make WITH_SUEXEC=yes SUEXEC_DOCROOT=&#8217;/foo&#8217;</p>
<p>Alternately you can add</p>
<p>WITH_SUEXEC=yes<br />
SUEXEC_DOCROOT=&#8217;/foo&#8217;</p>
<p>to the /etc/make.conf file</p>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2010/07/23/change-suexec-docroot-without-changing-makefiles-under-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using awk to add new files to svn</title>
		<link>http://dontfeedtheseagulls.com/2009/07/17/using-awk-to-add-new-files-to-svn/</link>
		<comments>http://dontfeedtheseagulls.com/2009/07/17/using-awk-to-add-new-files-to-svn/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 20:02:52 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[awk]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=56</guid>
		<description><![CDATA[svn add `svn status &#124; grep "^?" &#124; awk '{print $2 }'` you can also use grep -v to exclude specific files svn add `svn status &#124; grep "^?" &#124; awk '{print $2 }' &#124; grep -v prefs.inc.php`]]></description>
			<content:encoded><![CDATA[<pre>svn add `svn status | grep "^?" | awk '{print $2 }'`</pre>
<p>you can also use grep -v to exclude specific files</p>
<pre>svn add `svn status | grep "^?" | awk '{print $2 }' | grep -v prefs.inc.php`</pre>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/07/17/using-awk-to-add-new-files-to-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively convert all text files in a directory from Windows EOL to Unix with dos2unix</title>
		<link>http://dontfeedtheseagulls.com/2009/04/10/recursively-convert-all-text-files-in-a-directory-from-windows-eol-to-unix-with-dos2unix/</link>
		<comments>http://dontfeedtheseagulls.com/2009/04/10/recursively-convert-all-text-files-in-a-directory-from-windows-eol-to-unix-with-dos2unix/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 21:36:41 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[dos2unix]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=47</guid>
		<description><![CDATA[find . -type f -exec dos2unix {} \;]]></description>
			<content:encoded><![CDATA[<blockquote><pre>find . -type f -exec dos2unix {} \;</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/04/10/recursively-convert-all-text-files-in-a-directory-from-windows-eol-to-unix-with-dos2unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating a RedHat users file to FreeBSD/OpenBSD</title>
		<link>http://dontfeedtheseagulls.com/2009/04/05/migrating-a-redhat-users-file-to-freebsdopenbsd/</link>
		<comments>http://dontfeedtheseagulls.com/2009/04/05/migrating-a-redhat-users-file-to-freebsdopenbsd/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 04:33:20 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=34</guid>
		<description><![CDATA[http://www.openbsd.org/faq/faq9.html#passwd First, figure out if your Linux password file is shadowed or not. If it is, install John the Ripper from packages or ports (security/john) and use the unshadow utility that comes with it to merge your passwd and shadow files into one Sixth Edition-style file. Using your Linux password file, we&#8217;ll call it linux_passwd, [...]]]></description>
			<content:encoded><![CDATA[<p>http://www.openbsd.org/faq/faq9.html#passwd</p>
<p>First, figure out if your Linux password file is shadowed or not.  If it is, install <a href="http://www.openwall.com/john/">John the Ripper</a> from <a href="http://www.openbsd.org/faq/faq15.html">packages or ports</a> (<tt>security/john</tt>) and use the unshadow utility that comes with it to merge your <tt>passwd</tt> and <tt>shadow</tt> files into one Sixth Edition-style file.</p>
<p>Using your Linux password file, we&#8217;ll call it <tt>linux_passwd</tt>, you need to add in ::0:0 between fields four and seven. <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=awk&amp;sektion=1">awk(1)</a> does this for you.</p>
<blockquote>
<pre># <strong>cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", \</strong>
&gt; <strong>$1,$2,$3,$4,$5,$6,$7); }' &gt; new_passwd</strong></pre>
</blockquote>
<p>At this point, you want to edit the <tt>new_passwd</tt> file and remove the root and other system entries that are already present in your OpenBSD password file or aren&#8217;t applicable with OpenBSD (all of them). Also, make sure there are no duplicate usernames or user IDs between <tt>new_passwd</tt> and your OpenBSD box&#8217;s <tt>/etc/passwd</tt>.  The easiest way to do this is to start with a fresh <tt>/etc/passwd</tt></p>
<p>.</p>
<blockquote>
<pre># <strong>cat new_passwd &gt;&gt; /etc/master.passwd</strong>
# <strong>pwd_mkdb -p /etc/master.passwd</strong></pre>
</blockquote>
<p>The last step, <tt>pwd_mkdb</tt> is necessary to rebuild the /etc/spwd.db and /etc/pwd.db files.  It also creates a Sixth Edition-style password file (minus encrypted passwords) at /etc/passwd for programs which use it.  OpenBSD uses a stronger encryption for passwords, blowfish, which is very unlikely to be found on any system which uses full Sixth Edition-style password files.  To switch over to this stronger encryption, simply have the users run &#8216;passwd&#8217; and change their password.  The new password they enter will be encrypted with your default setting (usually blowfish unless you&#8217;ve edited /etc/login.conf).  Or, as <em>root</em>, you can run <tt>passwd <em>username</em></tt>.</p>
<p>Also you will want to copy over the groups file. note again, only copy over groups that do not exist in both.</p>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/04/05/migrating-a-redhat-users-file-to-freebsdopenbsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>convert linux passwd to a FreeBSD one</title>
		<link>http://dontfeedtheseagulls.com/2009/03/31/convert-linux-passwd-to-a-freebsd-one/</link>
		<comments>http://dontfeedtheseagulls.com/2009/03/31/convert-linux-passwd-to-a-freebsd-one/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 20:47:36 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=32</guid>
		<description><![CDATA[cat linux_passwd &#124; awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' &#62; new_passwd]]></description>
			<content:encoded><![CDATA[<pre>cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' &gt; new_passwd</pre>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/03/31/convert-linux-passwd-to-a-freebsd-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic pfctl control</title>
		<link>http://dontfeedtheseagulls.com/2009/03/30/basic-pfctl-control/</link>
		<comments>http://dontfeedtheseagulls.com/2009/03/30/basic-pfctl-control/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 21:13:52 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[pf]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=29</guid>
		<description><![CDATA[# basic pfctl control # == # Related: http://www.OpenBSD.org # Last update: Tue Dec 28, 2004 # == # Note: # this document is only provided as a basic overview # for some common pfctl commands and is by no means # a replacement for the pfctl and pf manual pages. #### General PFCTL Commands [...]]]></description>
			<content:encoded><![CDATA[<div class="snap_preview">
<p># basic pfctl control<br />
# ==<br />
# Related: http://www.OpenBSD.org<br />
# Last update: Tue Dec 28, 2004<br />
# ==<br />
# Note:<br />
# this document is only provided as a basic overview<br />
# for some common pfctl commands and is by no means<br />
# a replacement for the pfctl and pf manual pages.</p>
<p>#### General PFCTL Commands ####<br />
# pfctl -d                   disable packet-filtering<br />
# pfctl -e                   enable packet-filtering<br />
# pfctl -q                   run quiet<br />
# pfctl -v -v                run even more verbose</p>
<p>#### Loading PF Rules ####<br />
# pfctl -f /etc/pf.conf      load /etc/pf.conf<br />
# pfctl -n -f /etc/pf.conf   parse /etc/pf.conf, but dont load it<br />
# pfctl -R -f /etc/pf.conf   load only the FILTER rules<br />
# pfctl -N -f /etc/pf.conf   load only the NAT rules<br />
# pfctl -O -f /etc/pf.conf   load only the OPTION rules</p>
<p>#### Clearing PF Rules &amp; Counters ####<br />
# pfctl -F all               flush ALL<br />
# pfctl -F rules             flush only the RULES<br />
# pfctl -F queue             flush only queue’s<br />
# pfctl -F nat               flush only NAT<br />
# pfctl -F info              flush all stats that are not part of any rule.<br />
# pfctl -z                   clear all counters<br />
# note: flushing rules do not touch any existing stateful connections</p>
<p>#### Output PF Information ####<br />
# pfctl -s rules             show filter information<br />
# pfctl -v -s rules          show filter information for what FILTER rules hit..<br />
# pfctl -vvsr                show filter information as above and prepend rule numbers<br />
# pfctl -v -s nat            show NAT information, for which NAT rules hit..<br />
# pfctl -s nat -i xl1        show NAT information for interface xl1<br />
# pfctl -s queue             show QUEUE information<br />
# pfctl -s label             show LABEL information<br />
# pfctl -s state             show contents of the STATE table<br />
# pfctl -s info              show statistics for state tables and packet normalization<br />
# pfctl -s all               show everything</p>
<p>#### Maintaining PF Tables ####<br />
# pfctl -t addvhosts -T show                  show table addvhosts<br />
# pfctl -vvsTables                            view global information about all tables<br />
# pfctl -t addvhosts -T add 192.168.1.50      add entry to table addvhosts<br />
# pfctl -t addvhosts -T add 192.168.1.0/16    add a network to table addvhosts<br />
# pfctl -t addvhosts -T delete 192.168.1.0/16 delete nework from table addvhosts<br />
# pfctl -t addvhosts -T flush                 remove all entries from table addvhosts<br />
# pfctl -t addvhosts -T kill                  delete table addvhosts entirely<br />
# pfctl -t addvhosts -T replace -f /etc/addvhosts reload table addvhosts on the fly<br />
# pfctl -t addvhosts -T test 192.168.1.40     find ip address 192.168.1.40 in table addvhosts<br />
# pfctl -T load -f /etc/pf.conf               load a new table definition<br />
# pfctl -t addvhosts -T show -v               output stats for each ip address in table addvhosts<br />
# pfctl -t addvhosts -T zero                  reset all counters for table addvhosts</p></div>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/03/30/basic-pfctl-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using rsync over ssh simple command</title>
		<link>http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/</link>
		<comments>http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 12:58:32 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/</guid>
		<description><![CDATA[rsync -avz --exclude "*bak" --exclude "*~" -e ssh remoteuser@remotehost:/remote/dir /this/dir/ arguments used: -a, &#8211;archive This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when &#8211;files-from is specified, in which [...]]]></description>
			<content:encoded><![CDATA[<pre>rsync -avz <a name="rsync"></a>--exclude "*bak" --exclude "*~" -e ssh remoteuser@remotehost:/remote/dir /this/dir/</pre>
<p>arguments used:</p>
<blockquote><p>-a, &#8211;archive<br />
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when &#8211;files-from is specified, in which case -r is not implied.<br />
-v, &#8211;verbose<br />
This option increases the amount of information you are given during the transfer. By default, rsync works silently. A single -v will give you information about what files are being transferred and a brief summary at the end. Two -v flags will give you information on what files are being skipped and slightly more information at the end. More than two -v flags should only be used if you are debugging rsync.<br />
Note that the names of the transferred files that are output are done using a default &#8211;out-format of &#8220;%n%L&#8221;, which tells you just the name of the file and, if the item is a link, where it points. At the single -v level of verbosity, this does not mention when a file gets its attributes changed. If you ask for an itemized list of changed attributes (either &#8211;itemize-changes or adding &#8220;%i&#8221; to the &#8211;out-format setting), the output (on the client) increases to mention all items that are changed in any way. See the &#8211;out-format option for more details.<br />
-z, &#8211;compress<br />
With this option, rsync compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted &#8212; something that is useful over a slow connection.<br />
Note that this option typically achieves better compression ratios than can be achieved by using a compressing remote shell or a compressing transport because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over the connection.<br />
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You must separately specify -H.<br />
-e, &#8211;rsh=COMMAND<br />
This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change hostname in Freebsd</title>
		<link>http://dontfeedtheseagulls.com/2007/08/09/change-hostname-in-freebsd/</link>
		<comments>http://dontfeedtheseagulls.com/2007/08/09/change-hostname-in-freebsd/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 13:00:03 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/2007/08/09/change-hostname-in-freebsd/</guid>
		<description><![CDATA[To change a hostname, do: 1. # hostname newname 2. Edit /etc/hosts 3. Edit /etc/rc.conf To see the changes logoff then log back on. Note: if you have any services such as mysql stop it before doing this command.]]></description>
			<content:encoded><![CDATA[<p>To change a hostname, do:<br />
1. <font color="#990000"># hostname <em>newname</em></font><br />
2. Edit <font color="#000099">/etc/hosts</font><br />
3. Edit <font color="#000099">/etc/rc.conf</font></p>
<p>To see the changes logoff then log back on.</p>
<p>Note: if you have any services such as mysql stop it before doing this command.</p>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2007/08/09/change-hostname-in-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

