
<?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>Bryce McDonnell &#124;&#124; Freelance Web Application Developer &#187; iptables</title>
	<atom:link href="http://www.brycemcdonnell.com/skills-and-expert-groups/iptables/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brycemcdonnell.com</link>
	<description>bryce mcdonnell is a freelance web application developer specializing in PHP, Ruby on Rails and MySQL</description>
	<lastBuildDate>Fri, 26 Feb 2010 18:18:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Samba Server Integration</title>
		<link>http://www.brycemcdonnell.com/2009/07/samba-server-integration/</link>
		<comments>http://www.brycemcdonnell.com/2009/07/samba-server-integration/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 23:46:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Stuff I'm Working On]]></category>
		<category><![CDATA[portfolio]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[charity]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[MS]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://blog.thedevranch.net/?p=142</guid>
		<description><![CDATA[I recently returned from a trip to Beirut, Lebanon where I had been doing some humanitarian and mission work. One of my responsibilities was to create a file sharing server for a humanitarian organization.
Given the budget of next to nothing and the relatively small size of the office, I decided it was best to proceed [...]]]></description>
			<content:encoded><![CDATA[<p>I recently returned from a trip to <a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Beirut,+Lebanon&amp;sll=45.517682,-122.90135&amp;sspn=0.009683,0.017445&amp;ie=UTF8&amp;ll=33.870416,35.507813&amp;spn=23.406692,35.727539&amp;t=h&amp;z=5&amp;iwloc=A" target="_blank">Beirut, Lebanon</a> where I had been doing some humanitarian and mission work. One of my responsibilities was to create a file sharing server for a humanitarian organization.</p>
<p>Given the budget of next to nothing and the relatively small size of the office, I decided it was best to proceed with a Linux based Samba server. Although their office is 100% Microsoft (a mix of XP and Vista machines), Linux would be a great light weight solution. The added benefit was we re-purposed an ancient workstation (circa 1996) to run the Samba server so no new hardware was purchased and we prevented another machine from polluting a land fill.</p>
<p><span id="more-142"></span></p>
<p>We created three shared drives for the business.</p>
<ol>
<li>A share <strong>everyone</strong> in the office could access</li>
<li>A share <strong>o</strong><strong>nly the executive</strong> could access</li>
<li>A share for the exclusive purpose of <strong>backing up</strong> everyone&#8217;s workstation</li>
</ol>
<p>I simply installed <a href="http://www.centos.org/" target="_blank">Centos 5.2</a> distribution on the old workstation, created three distinct user accounts and group permissions, enabled the samba service, and locked down access through <strong>iptables </strong>firewall.</p>
<p>Creating a secure, readable, smb.conf file was really important to me. Not only for readability but also because I won&#8217;t be supporting this server after installation. Any other administrator should be able to walk into the office and quickly &amp; clearly see how to make edits for upgrades or changes.</p>
<p>The smb.conf file:</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">#smb.conf
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>global<span style="">&#93;</span></span>
	#set up what the end user would see on their desktop
	<span style="color: #000099;">workgroup</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> H4LSharedFiles</span>
	server string <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> common files for H4L</span>
&nbsp;
	#general user perms
	<span style="color: #000099;">security</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> user</span>
	passdb backend <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> tdbsam</span>
&nbsp;
	#printing support
	load printers <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> no</span>
        <span style="color: #000099;">printing</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> bsd</span>
        printcap name <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /dev/null</span>
        show add printer wizard <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> no</span>
        disable spools <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>AllSharedFiles<span style="">&#93;</span></span>
	<span style="color: #000099;">comment</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Files for everyone to share</span>
	<span style="color: #000099;">path</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /sambashares/allAccess</span>
	<span style="color: #000099;">writeable</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	<span style="color: #000099;">browseable</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	guest ok <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	write list <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> +allemployees</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Backup<span style="">&#93;</span></span>
	<span style="color: #000099;">comment</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Files to back up everyone's computer</span>
	<span style="color: #000099;">path</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /sambashares/backups</span>
	<span style="color: #000099;">writeable</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	<span style="color: #000099;">browseable</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	guest ok <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	write list <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> +allemployees</span>
&nbsp;
<span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>AdminOnly<span style="">&#93;</span></span>
	<span style="color: #000099;">comment</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Access for sensitive files</span>
	<span style="color: #000099;">path</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /sambashares/admins</span>
	<span style="color: #000099;">writeable</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	<span style="color: #000099;">browseable</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> yes</span>
	guest ok <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> no</span>
	write list <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> +administrators</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.brycemcdonnell.com/2009/07/samba-server-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
