https://www.slackwiki.com/index.php?title=Samba&feed=atom&action=historySamba - Revision history2024-03-28T10:26:57ZRevision history for this page on the wikiMediaWiki 1.40.0https://www.slackwiki.com/index.php?title=Samba&diff=447&oldid=prevNatex: /* Using testparm */2011-01-15T04:52:39Z<p><span dir="auto"><span class="autocomment">Using testparm</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:52, 15 January 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l462">Line 462:</td>
<td colspan="2" class="diff-lineno">Line 462:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre>$ testparm -v</pre></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre>$ testparm -v</pre></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">=</del>=== Using ''smbclient'' <del style="font-weight: bold; text-decoration: none;">=</del>===</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>=== Using ''smbclient'' ===</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><blockquote>smbclient — ftp-like client to access SMB/CIFS resources on servers</blockquote></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><blockquote>smbclient — ftp-like client to access SMB/CIFS resources on servers</blockquote></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l504">Line 504:</td>
<td colspan="2" class="diff-lineno">Line 504:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> KLINGKLANG FILEDEALER</pre></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> KLINGKLANG FILEDEALER</pre></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><blockquote>-U Sets the SMB username or username and password.</blockquote></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><blockquote>-U Sets the SMB username or username and password.</blockquote></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== To Do ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== To Do ==</div></td></tr>
</table>Natexhttps://www.slackwiki.com/index.php?title=Samba&diff=446&oldid=prevNatex: /* Optimizing Samba */2011-01-15T04:47:45Z<p><span dir="auto"><span class="autocomment">Optimizing Samba</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:47, 15 January 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l439">Line 439:</td>
<td colspan="2" class="diff-lineno">Line 439:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>See the man pages for smbd and nmbd for details.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>See the man pages for smbd and nmbd for details.</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">=== Optimizing Samba ===</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Testing and Troubleshooting ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Testing and Troubleshooting ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>Natexhttps://www.slackwiki.com/index.php?title=Samba&diff=445&oldid=prevNatex: /* Using Samba */2011-01-15T04:43:02Z<p><span dir="auto"><span class="autocomment">Using Samba</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:43, 15 January 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l418">Line 418:</td>
<td colspan="2" class="diff-lineno">Line 418:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Using Samba ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Using Samba ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>In this section we will have a look on how to <del style="font-weight: bold; text-decoration: none;">use</del>, start <del style="font-weight: bold; text-decoration: none;">and restart </del>samba</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>In this section we will have a look on how to <ins style="font-weight: bold; text-decoration: none;">restart</ins>, <ins style="font-weight: bold; text-decoration: none;">stop, and </ins>start <ins style="font-weight: bold; text-decoration: none;">the </ins>samba <ins style="font-weight: bold; text-decoration: none;">server.</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=== Starting and Stopping Samba ===</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">In Slackware, the script /etc/rc.d/rc.samba controls the state of the samba server. Below are the three commands you can use (as root).</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">To restart samba use:</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><code>/etc/rc.d/rc.samba restart </code></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">To stop samba use:</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><code>/etc/rc.d/rc.samba stop </code></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">To start samba from a stopped state use:</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><code>/etc/rc.d/rc.samba start </code></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">The rc.samba script described above is merely a convenient wrapper for the /usr/sbin/smbd and /usr/sbin/nmdb commands. For example, you could also start the samba server by using these two commands together:</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><pre>#/usr/sbin/smbd -D</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">#/usr/sbin/nmbd -D</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></pre></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">See the man pages for smbd and nmbd for details.</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Optimizing Samba ===</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Optimizing Samba ===</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>Natexhttps://www.slackwiki.com/index.php?title=Samba&diff=173&oldid=prevErik: Copy from old2009-06-06T23:17:56Z<p>Copy from old</p>
<p><b>New page</b></p><div>[[Category:Tutorials]]<br />
... this is a W.I.P ... will write more the next days, hope this is ok :)<br />
<br />
comments, suggestions, etc. are welcome!<br />
<br />
== Introduction ==<br />
This Tutorial shows you how to configure Samba 3.0.x on Slackware 12.x.<br />
<br />
It should later act as simple and secure as it can be in a heterogen network with Windows systems (a workstation with admin access, guest accounts for the rest [eg. your friends]), a media streaming client (eg. Xbox) and Linux / *nix (Solaris / Mac OS X).<br />
<br />
I wanted to have all necessary parameters for home usage in my smb.conf so i can easily change them and have a mostly secure and stable system. Printing is disabled by default in my config, since i have no need to attach my printer to the server (the printer has its own print server: HP P2015). Also i really have no clue how to use a printer with linux. If someone wants to write something on printing then feel free to do so...<br />
<br />
== Upgrade / Build Samba ==<br />
<br />
If you are here you probably will know what Samba is good for and how it works.<br />
Normally Samba is installed on your system and ready for action and doesn't need to be upgraded.<br />
<br />
=== Upgrade Samba ===<br />
<br />
All upgrades to Samba should be done via the patches directory on your favorite mirror. You should NOT NOT NOT mix -current packages with a non "-current" Slackware. <br />
<br />
=== Building Samba ===<br />
<br />
Hey! Wanna build Samba? Get the source, get the slackbuild, make a package and install it!<br />
<br />
I used the latest build from the 3.0.x fork since this comes with Slackware 12.x.<br />
<br />
You can also try building Samba 3.2.x. If you want a optimized build with a better performance that suits your system, you should consider installing GCC >4.2.4 since it supports better optimizing functions (''-march=native'' - specifying ''-march=native'' implies ''-mtune=native''. This will enable all instruction subsets supported by the local machine (hence the result might not run on different machines).) and use Samba 3.2.x cause it has a better overall performance. Only do this if you know what you are doing!<br />
<br />
* Get the source + SlackBuild, edit it and build the package...<br />
<pre>$ mkdir /tmp/samba<br />
$ cd /tmp/samba<br />
$ wget http://us3.samba.org/samba/ftp/stable/samba-3.0.31.tar.gz<br />
...<br />
$ wget -r -nH ftp://slackware.osuosl.org/pub/slackware/slackware-current/source/n/samba<br />
$ jed samba.SlackBuild<br />
> VERSION=3.0.30<br />
>> VERSION=3.0.31<br />
<br />
> tar xjvf $CWD/samba-$VERSION.tar.bz2<br />
>> tar xfvz $CWD/samba-$VERSION.tar.gz<br />
$ chmod +x samba.SlackBuild<br />
$ ./samba.SlackBuild<br />
$ upgradepkg /tmp/samba-3.0.31-i486-1.tgz</pre><br />
<br />
== Configure Samba ==<br />
<br />
There are a few requirments i had for this config.<br />
* Guest access from Windows without the need for a password<br />
* Guests are only allowed to read and have no ''home directory'' (eg. /home/guest)<br />
* Guests are only allowed to put new files in a given directory<br />
* Make everything secure as it can get with this config<br />
* Users on the system have access to their ''home directory''<br />
* No Printing at all<br />
* Disable NetBios, we only have Windows XP or higher / *nix<br />
* Maybe more?<br />
<br />
=== /etc/samba/smb.conf ===<br />
This is my own ''smb.conf'' as i use it on my system.<br />
<br />
The config file itself should be selfexplaining. <br />
<br />
==== '''smb.conf /w comments''' ====<br />
<pre>#smb.conf - v1.1<br />
#<br />
# Samba-3.0.30 - Slackware 12.x<br />
# e.v.o ( e.v.o [A-T] gmx.net )<br />
#<br />
# ; COMMENT<br />
# #PARAMETER ( name = default value )<br />
# Normally every parameter should have its default value.<br />
# If the parameter is commented out then it is the default value,<br />
# otherwise you should have a look at "man smb.conf"<br />
#<br />
# This config is based on the smb.conf manual page<br />
# and "Using Samba, 3rd Edition" from O'Reilly<br />
#<br />
<br />
# VARIABLE SUBSTITUTIONS<br />
; %U session username<br />
; %G primary group name of %U<br />
; %h the Internet hostname that Samba is running on<br />
; %m the NetBIOS name of the client machine (very useful)<br />
; %L the NetBIOS name of the server<br />
; %M the Internet name of the client machine<br />
; %R the selected protocol level after protocol negotiation<br />
; %d the process id of the current server process<br />
; %a the architecture of the remote machine<br />
; %I the IP address of the client machine<br />
; %i the local IP address to which a client connected<br />
; %T the current date and time<br />
; %D name of the domain or workgroup of the current user<br />
; %w the winbind separator<br />
; %v Samba version number<br />
;<br />
; The following substitutes apply only to some configuration options<br />
; Only those that are used when a connection has been established<br />
;<br />
; %S the name of the current service, if any<br />
; %P the root directory of the current service, if any<br />
; %u username of the current service, if any<br />
; %g primary group name of %u<br />
; %H the home directory of the user given by %u<br />
; %N the name of your NIS home directory server<br />
; %p the path of the service's home directory<br />
<br />
[global]<br />
; Parameters in this section apply to the server as a whole<br />
<br />
; ### USERSHARES ### # Capability for non-root users to <br />
; ==================== # add/modify/delete own share definitions <br />
;<br />
; Controls if usershares can permit guest access<br />
#usershare allow guests =<br />
; Maximum number of user defined shares allowed<br />
#usershare max shares =<br />
; If set only directories owned by the sharing user can be shared<br />
#usershare owner only =<br />
; Directory containing the user defined share definitions<br />
#usershare path =<br />
; Comma-separated list restricting what directories can be shared<br />
#usershare prefix allow list =<br />
; Comma-separated list restricting what directories can be shared<br />
#usershare prefix deny list =<br />
; Pre-existing share used as a template for creating new usershares<br />
#usershare template share =<br />
<br />
; ### NAME MANGLING ### # By default, Samba has the same<br />
; ======================= # semantics as a Windows NT server<br />
;<br />
; Filenames are case sensitive<br />
#case sensitive = auto<br />
; Default case for new filenames<br />
#default case = lower<br />
; New files are created with the case that the client passes<br />
#preserve case = yes<br />
; New files which conform to 8.3 syntax are created upper case<br />
#short preserve case = yes<br />
<br />
; ### PRINTING ###<br />
; ==================<br />
;<br />
; All printers in the printcap will be loaded for browsing by default<br />
load printers = no<br />
; Only applicable if printing is set to cups.<br />
#cups server = ""<br />
; Show the "Add Printer Wizard" Dialog<br />
show add printer wizard = no<br />
; Yes = open, write to and submit spool files on the specified directory<br />
printable = no<br />
<br />
; ===============================<br />
; # - S E T T I N G S - #<br />
; ===============================<br />
<br />
; \-= USER SCRIPTS =-/ # These scripts are used on a PDC or stand-alone <br />
; ==================== # machine to add or delete corresponding unix accounts<br />
<br />
; Script that will be run when a new group is requested<br />
#add group script = /usr/sbin/groupadd %g<br />
; Script that will be run when a machine is added to Samba's domain<br />
#add machine script = /usr/sbin/adduser -s /bin/false -d /dev/null %u -n -g machines -c Machine <br />
; Script which will add a new service definition to smb.conf<br />
#add share command =<br />
; Script which will add a new user<br />
#add user script = /usr/sbin/useradd -m %u<br />
; Script that will be called when a user is added to a group<br />
#add user to group script = /usr/sbin/usermod -G %g %u<br />
; Script which will modify an existing service definition in smb.conf<br />
#change share command =<br />
; Script when a group is requested to be deleted<br />
#delete group script = /usr/sbin/groupdel %g<br />
; Script when a user is removed from a group using the Windows NT domain administration tools<br />
#delete user from group script = /usr/sbin/deluser %u %g<br />
; Script that will be run when managing users with remote RPC (NT) tools<br />
#delete user script = /usr/sbin/userdel -r %u<br />
; Script that will be run under special circumstances<br />
#rename user script = no<br />
; This script sets the primary group in the unix userdatase when an administrator sets the <br />
; primary group from the windows user manager or when fetching a SAM with net rpc vampire<br />
#set primary group script = /usr/sbin/usermod -g '%g' '%u'<br />
; Program that can be used to set UNIX user passwords<br />
#passwd program = /usr/bin/passwd %u<br />
; Controls the "chat" conversation between smbd and the local password changing program<br />
#passwd chat = "*New password:*" %n\r "*New password (again):*" %n\r \ "*Password changed*"<br />
<br />
; \-= PERMISSION MASKS =-/<br />
; ========================<br />
<br />
#inherit owner = no<br />
#inherit permissions = no<br />
<br />
#directory mask = 0755<br />
#directory security mask = 0777<br />
#force create mode = 000<br />
#force directory mode = 000<br />
#force directory security mode = 0<br />
#force security mode = 0<br />
#security mask = 0777<br />
<br />
; \-= USER PARAMETER =-/<br />
; ======================<br />
<br />
; List of users who will be granted administrative privileges on the share<br />
admin users = evo<br />
; This is a list of users that should be allowed to login to this service<br />
valid users = evo guest<br />
; This is a list of users that should not be allowed to login to this service<br />
invalid users = root nobody ftp adm apache bin daemon games gdm haldaemon halt lp mail messagebus mysql news operator pop rpc shutdown smmsp sshd sync uucp<br />
; This is a list of users that are given read-only access to a service<br />
read list = evo guest<br />
; This is a list of users that are given read-write access to a service<br />
write list = evo<br />
<br />
; -= Guest Settings =-<br />
; Username which will be used for access to services which are specified as guest ok<br />
guest account = guest<br />
; Yes for a service, then no password is required to connect to the service<br />
guest ok = no<br />
; Yes for a service, then only guest connections to the service are permitted<br />
guest only = no<br />
<br />
; -= Forced User/Group Settings =-<br />
; UNIX user name that will be assigned as the default user for all users<br />
;force user = guest<br />
; UNIX group name that will be assigned as the default primary group for all users<br />
force group = users<br />
<br />
; -= Map Settings =-<br />
; Specify a file containing a mapping of usernames from the clients to the server<br />
#username map = <br />
;<br />
#map acl inherit = no<br />
#map archive = yes<br />
#map hidden = <br />
#map read only = yes<br />
#map system = no<br />
map to guest = Bad User<br />
<br />
; \-= SHARE PARAMETER =-/<br />
; =======================<br />
<br />
; Lets you "turn off" a service. If available = no, then ALL attempts to connect to the service will fail<br />
available = yes<br />
; Controls whether this share is seen in the list of available shares in a net view and in the browse list<br />
browseable = yes<br />
; Allow or disallow client access to accounts that have null passwords <br />
#null password = no<br />
; If this parameter is yes, then users of a service may not create or modify files in the service's directory<br />
read only = yes<br />
; Setting this parameter to no prevents any file or directory that is a symbolic link from being followed<br />
follow symlinks = no<br />
; This parameter controls whether or not links in the UNIX file system may be followed by the server<br />
wide links = no<br />
<br />
; This parameter specifies the name of a service which will be connected to if the service actually requested cannot be found<br />
#default service = <br />
; This parameter allows you to specify a comma-delimited list of directories that the server should always show as empty<br />
dont descend = /bin,/boot,/dev,/etc,/lib,/opt,/proc,/sbin,/srv,/sys,/tmp,/usr,/var<br />
<br />
; -= Hide Files =-<br />
; This is a boolean parameter that controls whether files starting with a dot appear as hidden files<br />
#hide dot files = yes<br />
; This is a list of files or directories that are not visible but are accessible<br />
#hide files = <br />
; This parameter prevents clients from seeing special files such as sockets, devices and fifo's in directory listings<br />
#hide special files = no<br />
; This parameter prevents clients from seeing the existance of files that cannot be read<br />
#hide unreadable = no<br />
; This parameter prevents clients from seeing the existance of files that cannot be written to<br />
#hide unwriteable files = no<br />
<br />
; \-= WINDOWS PARAMETER =-/<br />
; =========================<br />
<br />
; Specifies the charset that samba will use to print messages to stdout and stderr<br />
#display charset = "LOCALE" or "ASCII" (depending on the system)<br />
; This option specifies which charset Samba should talk to DOS clients<br />
#dos charset = # No default<br />
; Enabling this parameter allows a user who has write access to the file (by whatever means) to modify the permissions<br />
#dos filemode = no<br />
<br />
; \-= NETWORK/CONNECTION PARAMETER =-/<br />
; ====================================<br />
<br />
; This controls what workgroup your server will appear to be in when queried by clients<br />
workgroup = KlingKlang<br />
; This controls what string will show up in the printer comment box in print manager and next to the IPC connection in net view<br />
server string = FileDealer<br />
; This sets the NetBIOS name by which a Samba server is known<br />
netbios name = FileDealer<br />
#netbios aliases = <br />
<br />
; -= Interface Settings =-<br />
; This parameter is a comma, space, or tab delimited set of hosts which are permitted to access a service<br />
hosts allow = 127.0.0.1 192.168.<br />
hosts deny = ALL<br />
<br />
; -= Connection Options =-<br />
; Represents the number of minutes of inactivity before a connection is considered dead and disconnected<br />
#deadtime = 0 <br />
; The value of the parameter (an integer) represents the number of seconds between keepalive packets<br />
#keepalive = 300<br />
; This option allows the number of simultaneous connections to a service<br />
#max connections = 0<br />
; This option allows you to set socket options to be used when talking with the client<br />
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536<br />
<br />
; \-= OTHER PARAMETER =-/<br />
; =======================<br />
<br />
security = user<br />
<br />
; Enabling this parameter will disable netbios support in Samba<br />
disable netbios = yes<br />
; Do a lookup with the DNS server<br />
dns proxy = no<br />
<br />
; -= SMBpasswd Settings =-<br />
; This option allows the administrator to chose which backend will be used for storing user and possibly group information<br />
#passdb backend = smbpasswd:/etc/samba/private/smbpasswd<br />
; This option sets the path to the encrypted smbpasswd file<br />
#smb passwd file = /etc/samba/private/smbpasswd<br />
<br />
; -= Directory Settings =-<br />
; This option specifies the directory where lock files will be placed<br />
#lock directory = /var/lock<br />
; This parameters defines the directory smbd will use for storing such files as smbpasswd and secrets.tdb<br />
#private dir = /etc/samba/private<br />
<br />
; -= Logging Settings =-<br />
; This option allows you to override the name of the Samba log file<br />
log file = /var/log/samba/samba.%m<br />
; This option (an integer in kilobytes) specifies the max size the log file should grow to<br />
max log size = 5000<br />
; Parameter maps how Samba debug messages are logged onto the system<br />
#syslog = 1<br />
; Parameter is set then Samba debug messages are logged into the system syslog only<br />
#syslog only = no<br />
<br />
; Using the following line enables you to customise your configuration on a per machine<br />
; basis. The %m gets replaced with the netbios name of the machine that is connecting.<br />
; Note: Consider carefully the location in the configuration file of<br />
; this line. The included file is read at that point.<br />
#include = /etc/samba/smb.conf.%m<br />
<br />
; ===========================<br />
; # - S H A R E S - #<br />
; ===========================<br />
<br />
[homes]<br />
comment = Eigene Dateien<br />
<br />
guest ok = yes<br />
read only = no<br />
browseable = no<br />
<br />
[printers]<br />
comment = Drucker<br />
path = /var/spool/samba<br />
<br />
browseable = no<br />
available = no<br />
guest ok = no<br />
printable = yes<br />
<br />
[BitHalde]<br />
comment = 3TB<br />
path = /mnt/raid<br />
<br />
guest ok = yes<br />
read only = yes<br />
</pre><br />
<br />
==== smb.conf w/o comments ====<br />
<pre>[global]<br />
workgroup = KLINGKLANG<br />
server string = FileDealer<br />
map to guest = Bad User<br />
guest account = guest<br />
log file = /var/log/samba/samba.%m<br />
disable netbios = Yes<br />
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536<br />
load printers = No<br />
show add printer wizard = No<br />
dns proxy = No<br />
invalid users = root, nobody, ftp, adm, apache, bin, daemon, games, gdm, haldaemon, halt, lp, mail, messagebus, mysql, news, operator, pop, rpc, shutdown, smmsp, sshd, sync, uucp<br />
valid users = evo, guest<br />
admin users = evo<br />
read list = evo, guest<br />
write list = evo<br />
force group = users<br />
hosts allow = 127.0.0.1, 192.168.<br />
hosts deny = ALL<br />
wide links = No<br />
follow symlinks = No<br />
dont descend = /bin,/boot,/dev,/etc,/lib,/opt,/proc,/sbin,/srv,/sys,/tmp,/usr,/var<br />
<br />
[homes]<br />
comment = Eigene Dateien<br />
read only = No<br />
guest ok = Yes<br />
browseable = No<br />
<br />
[printers]<br />
comment = Drucker<br />
path = /var/spool/samba<br />
printable = Yes<br />
browseable = No<br />
available = No<br />
<br />
[BitHalde]<br />
comment = 3TB<br />
path = /mnt/raid<br />
guest ok = Yes<br />
</pre><br />
<br />
== Using Samba ==<br />
<br />
In this section we will have a look on how to use, start and restart samba<br />
<br />
=== Optimizing Samba ===<br />
<br />
== Testing and Troubleshooting ==<br />
<br />
In this section we will have a look on how we test our configuration and what to do if we ran into problems.<br />
<br />
=== Using ''testparm'' ===<br />
<br />
<blockquote>testparm — check an smb.conf configuration file for internal correctness</blockquote><br />
<br />
*: If your done with the setup of your ''smb.conf'' you should run ''testparm''. Do this by simply typing it ;)<br />
<pre>$ testparm<br />
Load smb config files from /etc/samba/smb.conf<br />
Processing section "[homes]"<br />
Processing section "[printers]"<br />
NOTE: Service printers is flagged unavailable.<br />
Processing section "[BitHalde]"<br />
Loaded services file OK.<br />
Server role: ROLE_STANDALONE<br />
Press enter to see a dump of your service definitions</pre><br />
:: Normally this is what the output should look like. By pressing enter you will get a list of all used parameters in smb.conf.<br />
<br />
*: If you wish to have a complete list of all options and how they are set:<br />
<pre>$ testparm -v</pre><br />
<br />
==== Using ''smbclient'' ====<br />
<br />
<blockquote>smbclient — ftp-like client to access SMB/CIFS resources on servers</blockquote><br />
<br />
* Connecting as a guest and list all shares<br />
<pre>$ smbclient -L localhost -N<br />
Domain=[FILEDEALER] OS=[Unix] Server=[Samba 3.0.30]<br />
<br />
Sharename Type Comment<br />
--------- ---- -------<br />
BitHalde Disk 3TB<br />
IPC$ IPC IPC Service (FileDealer)<br />
Domain=[FILEDEALER] OS=[Unix] Server=[Samba 3.0.30]<br />
<br />
Server Comment<br />
--------- -------<br />
<br />
Workgroup Master<br />
--------- -------<br />
KLINGKLANG FILEDEALER</pre><br />
<blockquote>-L ''host'' This option allows you to look at what services are available on a server.<br/><br />
-N Suppresses the normal password prompt. Useful when accessing a service that does not require a password.</blockquote><br />
<br />
* Connecting with a specified username and list all shares<br />
<pre>$ smbclient -L localhost -U evo<br />
Password:<br />
Domain=[FILEDEALER] OS=[Unix] Server=[Samba 3.0.30]<br />
<br />
Sharename Type Comment<br />
--------- ---- -------<br />
BitHalde Disk 3TB<br />
IPC$ IPC IPC Service (FileDealer)<br />
evo Disk Eigene Dateien<br />
Domain=[FILEDEALER] OS=[Unix] Server=[Samba 3.0.30]<br />
<br />
Server Comment<br />
--------- -------<br />
<br />
Workgroup Master<br />
--------- -------<br />
KLINGKLANG FILEDEALER</pre><br />
<blockquote>-U Sets the SMB username or username and password.</blockquote><br />
<br />
<br />
== To Do ==<br />
* alle user eintragen (cat /etc/passwd | cut -d':' -f1 | sort)<br />
* user scripte vervollständigen<br />
* masken richten + upload beim gast/evo gehört root? warum das?<br />
* was ist mit umlauten?<br />
* --> wie starten? rc.samba<br />
* Testmethoden aus dem samba buch einfügen</div>Erik