<?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>vincentkong.com &#187; Samba</title>
	<atom:link href="http://www.vincentkong.com/tag/samba/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vincentkong.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 25 Dec 2011 01:35:03 +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>Samba on Ubuntu Quickstart Guide</title>
		<link>http://www.vincentkong.com/2008/01/samba-on-ubuntu-quickstart-guide</link>
		<comments>http://www.vincentkong.com/2008/01/samba-on-ubuntu-quickstart-guide#comments</comments>
		<pubDate>Wed, 23 Jan 2008 16:26:20 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Samba]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://wordpress.vincentkong.com/?p=111</guid>
		<description><![CDATA[Installing Samba for Ubuntu To install Samba from the command line: $ sudo apt-get install samba Configuring Samba The configuration file for Samba is located in /etc/samba/smb.conf. A simple configuration is listed below: [global] # Change this to the workgroup &#8230; <a href="http://www.vincentkong.com/2008/01/samba-on-ubuntu-quickstart-guide">Continue reading <span class="meta-nav">&#8594;</span></a>


Related posts:<ol><li><a href='http://www.vincentkong.com/2008/01/firestarter-on-ubuntu-quickstart-guide' rel='bookmark' title='Firestarter on Ubuntu Quickstart Guide'>Firestarter on Ubuntu Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2007/05/mysql-for-ubuntu-quickstart-guide' rel='bookmark' title='MySQL for Ubuntu Quickstart Guide'>MySQL for Ubuntu Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2007/05/apache-for-ubuntu-quickstart-guide' rel='bookmark' title='Apache for Ubuntu Quickstart Guide'>Apache for Ubuntu Quickstart Guide</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>Installing Samba for Ubuntu</strong></p>
<p>To install Samba from the command line:</p>
<p><code>$ sudo apt-get install samba</code></p>
<p><strong>Configuring Samba</strong></p>
<p>The configuration file for Samba is located in <code>/etc/samba/smb.conf</code>. A simple configuration is listed below:</p>
<p><code>[global]<br />
# Change this to the workgroup name your Samba server will be part of<br />
workgroup = WORKGROUP<br />
# server string is the equivalent of the NT Description field<br />
server string = %h server (Samba, Ubuntu) </code></p>
<p><code># This will require a Unix account in this server for every user accessing the server.<br />
security = user<br />
# The Unix account smbd uses this parameter when a connection is allowed guest access.<br />
guest account = nobody<br />
# Determine whether a failed authentication request should be treated as the guest user and allowed access.<br />
# Use the guest account if the username is unknown to Samba's list of accounts.<br />
map to guest = bad user<br />
</code></p>
<p><code># Enable the default home directory shares.<br />
# This will share each user's home directory as \\server\username<br />
[homes]<br />
comment = Home Directories<br />
# Make sure that only "username" can connect to \\server\username<br />
valid user = %S<br />
# By default, the home directories are exported read-only. Change next<br />
# parameter to 'yes' if you want to be able to write to them.<br />
writable = yes<br />
# File creation mask is set to 0700 for security reasons. If you want to<br />
# create files with group=rw permissions, set next parameter to 0775.<br />
create mask = 0600<br />
# Directory creation mask is set to 0700 for security reasons. If you want to<br />
# create dirs. with group=rw permissions, set next parameter to 0775.<br />
directory mask = 0700 </code></p>
<p><code># Here is one file share named <tt>[public]</tt>, which makes the /tmp directory available for users<br />
[public]<br />
# Specifies whether a user mapped to the guest account is allowed access to this share.<br />
guest ok = yes<br />
# Automatically maps the user to the guest account for access to this share.<br />
guest only = yes<br />
path = /tmp<br />
read only = no </code></p>
<p><strong>Configuring Samba Authentication</strong></p>
<p><code>$ sudo smbpasswd -a &lt;username&gt;<br />
Password:<br />
New SMB password:<br />
Retype new SMB password: </code></p>
<p>The first password is for the <code>sudo</code> application, and the second two are for the Samba password for the <code>&lt;username&gt;</code>.</p>
<p><strong>Configuring Firestarter Firewall</strong></p>
<p>If you have a firewall on the same server as Samba the the rules will need to change to in order for Samba to work.</p>
<p>For Firestarter:</p>
<ol>
<li>System -&gt; Administration -&gt; Firestarter</li>
<li>Click on the &#8220;Policy&#8221; tab</li>
<li>Click on the &#8220;Allow service&#8221; table</li>
<li>Click on the &#8220;Policy&#8221; menu -&gt; &#8220;Add Rule&#8221;</li>
<li>Under the &#8220;Name&#8221; dropdown, select &#8220;Samba (SMB)&#8221; and ports 137-139, and 445 will be populated</li>
<li>If you want to restrict to only allow computers to your local network then add 192.168.x.x/24 to the &#8220;IP, host or network&#8221; textbox</li>
<li>Click the &#8220;Add&#8221; button to add the policy to Firestarter</li>
<li>Click on the &#8220;Edit&#8221; menu -&gt; &#8220;Preferences&#8221;</li>
<li>Expand &#8220;Firewall&#8221; -&gt; &#8220;Advanced Options&#8221;</li>
<li>Under the &#8220;Broadcast traffic&#8221; section, uncheck the &#8220;Block broadcasts from external network&#8221; checkbox</li>
</ol>
<p><strong>Reinstalling Samba</strong></p>
<p>When attempting to reinstall Samba after it it has been uninstalled will result in an error.</p>
<p><code>$ apt-get remove --purge samba<br />
Removing samba ...<br />
* Stopping Samba daemons...<br />
...done.<br />
Purging configuration files for samba ...<br />
Removing configuration file /etc/default/samba...<br />
Removing configuration file /etc/default/samba... </code></p>
<p><code>$ apt-get install samba<br />
Setting up samba (3.0.22-1ubuntu3.3) ...<br />
* Starting Samba daemons...<br />
...fail!<br />
invoke-rc.d: initscript samba, action "start" failed.</code></p>
<p>The reason is because during the uninstallation the <code>/etc/samba/smb.conf</code> file has also been deleted which is required by the <code>samba-common</code> package. To resolve this problem the <code>samba-common</code> package must be resintalled before installing the <code>samba</code> package again.</p>


<p>Related posts:<ol><li><a href='http://www.vincentkong.com/2008/01/firestarter-on-ubuntu-quickstart-guide' rel='bookmark' title='Firestarter on Ubuntu Quickstart Guide'>Firestarter on Ubuntu Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2007/05/mysql-for-ubuntu-quickstart-guide' rel='bookmark' title='MySQL for Ubuntu Quickstart Guide'>MySQL for Ubuntu Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2007/05/apache-for-ubuntu-quickstart-guide' rel='bookmark' title='Apache for Ubuntu Quickstart Guide'>Apache for Ubuntu Quickstart Guide</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vincentkong.com/2008/01/samba-on-ubuntu-quickstart-guide/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

