| 1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 34. Advanced Configuration Techniques</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="The Official Samba 3.2.x HOWTO and Reference Guide"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="prev" href="largefile.html" title="Chapter 33. Handling Large Directories"><link rel="next" href="migration.html" title="Part IV. Migration and Updating"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 34. Advanced Configuration Techniques</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="largefile.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="migration.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="cfgsmarts"></a>Chapter 34. Advanced Configuration Techniques</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="orgname">Samba Team</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email"><<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>></code></p></div></div></div></div><div><p class="pubdate">June 30, 2005</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="cfgsmarts.html#id2673923">Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="cfgsmarts.html#id2673932">Multiple Server Hosting</a></span></dt><dt><span class="sect2"><a href="cfgsmarts.html#id2674328">Multiple Virtual Server Personalities</a></span></dt><dt><span class="sect2"><a href="cfgsmarts.html#id2675343">Multiple Virtual Server Hosting</a></span></dt></dl></dd></dl></div><p>
|
|---|
| 2 | <a class="indexterm" name="id2673766"></a>
|
|---|
| 3 | <a class="indexterm" name="id2673773"></a>
|
|---|
| 4 | Since the release of the first edition of this book there have been repeated requests to better document
|
|---|
| 5 | configuration techniques that may help a network administrator to get more out of Samba. Some users have asked
|
|---|
| 6 | for documentation regarding the use of the <a class="link" href="smb.conf.5.html#INCLUDE" target="_top">include = file-name</a> parameter.
|
|---|
| 7 | </p><p>
|
|---|
| 8 | <a class="indexterm" name="id2673801"></a>
|
|---|
| 9 | <a class="indexterm" name="id2673808"></a>
|
|---|
| 10 | Commencing around mid-2004 there has been increasing interest in the ability to host multiple Samba servers on
|
|---|
| 11 | one machine. There has also been an interest in the hosting of multiple Samba server personalities on one
|
|---|
| 12 | server.
|
|---|
| 13 | </p><p>
|
|---|
| 14 | <a class="indexterm" name="id2673822"></a>
|
|---|
| 15 | <a class="indexterm" name="id2673829"></a>
|
|---|
| 16 | Feedback from technical reviewers made the inclusion of this chapter a necessity. So, here is an
|
|---|
| 17 | answer the questions that have to date not been adequately addressed. Additional user input is welcome as
|
|---|
| 18 | it will help this chapter to mature. What is presented here is just a small beginning.
|
|---|
| 19 | </p><p>
|
|---|
| 20 | <a class="indexterm" name="id2673844"></a>
|
|---|
| 21 | <a class="indexterm" name="id2673851"></a>
|
|---|
| 22 | <a class="indexterm" name="id2673858"></a>
|
|---|
| 23 | There are a number of ways in which multiple servers can be hosted on a single Samba server. Multiple server
|
|---|
| 24 | hosting makes it possible to host multiple domain controllers on one machine. Each such machine is
|
|---|
| 25 | independent, and each can be stopped or started without affecting another.
|
|---|
| 26 | </p><p>
|
|---|
| 27 | <a class="indexterm" name="id2673873"></a>
|
|---|
| 28 | <a class="indexterm" name="id2673880"></a>
|
|---|
| 29 | <a class="indexterm" name="id2673886"></a>
|
|---|
| 30 | Sometimes it is desirable to host multiple servers, each with its own security mode. For example, a single
|
|---|
| 31 | UNIX/Linux host may be a domain member server (DMS) as well as a generic anonymous print server. In this case,
|
|---|
| 32 | only domain member machines and domain users can access the DMS, but even guest users can access the generic
|
|---|
| 33 | print server. Another example of a situation where it may be beneficial to host a generic (anonymous) server
|
|---|
| 34 | is to host a CDROM server.
|
|---|
| 35 | </p><p>
|
|---|
| 36 | <a class="indexterm" name="id2673904"></a>
|
|---|
| 37 | <a class="indexterm" name="id2673911"></a>
|
|---|
| 38 | Some environments dictate the need to have separate servers, each with their own resources, each of which are
|
|---|
| 39 | accessible only by certain users or groups. This is one of the simple, but highly effective, ways that Samba
|
|---|
| 40 | can replace many physical Windows servers in one Samba installation.
|
|---|
| 41 | </p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2673923"></a>Implementation</h2></div></div></div><p>
|
|---|
| 42 | </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2673932"></a>Multiple Server Hosting</h3></div></div></div><p>
|
|---|
| 43 | <a class="indexterm" name="id2673940"></a>
|
|---|
| 44 | <a class="indexterm" name="id2673947"></a>
|
|---|
| 45 | <a class="indexterm" name="id2673954"></a>
|
|---|
| 46 | <a class="indexterm" name="id2673960"></a>
|
|---|
| 47 | <a class="indexterm" name="id2673967"></a>
|
|---|
| 48 | <a class="indexterm" name="id2673974"></a>
|
|---|
| 49 | <a class="indexterm" name="id2673981"></a>
|
|---|
| 50 | The use of multiple server hosting involves running multiple separate instances of Samba, each with it's own
|
|---|
| 51 | configuration file. This method is complicated by the fact that each instance of <span class="application">nmbd</span>, <span class="application">smbd</span> and <span class="application">winbindd</span>
|
|---|
| 52 | must have write access to entirely separate TDB files. The ability to keep separate the TDB files used by
|
|---|
| 53 | <span class="application">nmbd</span>, <span class="application">smbd</span> and <span class="application">winbindd</span> can be enabled either by recompiling Samba for each server hosted so each has its
|
|---|
| 54 | own default TDB directories, or by configuring these in the <code class="filename">smb.conf</code> file, in which case each instance of
|
|---|
| 55 | <span class="application">nmbd</span>, <span class="application">smbd</span> and <span class="application">winbindd</span> must be told to start up with its own <code class="filename">smb.conf</code> configuration file.
|
|---|
| 56 | </p><p>
|
|---|
| 57 | <a class="indexterm" name="id2674064"></a>
|
|---|
| 58 | <a class="indexterm" name="id2674070"></a>
|
|---|
| 59 | <a class="indexterm" name="id2674077"></a>
|
|---|
| 60 | <a class="indexterm" name="id2674084"></a>
|
|---|
| 61 | Each instance should operate on its own IP address (that independent IP address can be an IP Alias).
|
|---|
| 62 | Each instance of <span class="application">nmbd</span>, <span class="application">smbd</span> and <span class="application">winbindd</span> should listen only on its own IP socket. This can be secured
|
|---|
| 63 | using the <a class="link" href="smb.conf.5.html#SOCKETADDRESS" target="_top">socket address</a> parameter. Each instance of the Samba server will have its
|
|---|
| 64 | own SID also, this means that the servers are discrete and independent of each other.
|
|---|
| 65 | </p><p>
|
|---|
| 66 | <a class="indexterm" name="id2674130"></a>
|
|---|
| 67 | <a class="indexterm" name="id2674137"></a>
|
|---|
| 68 | <a class="indexterm" name="id2674144"></a>
|
|---|
| 69 | <a class="indexterm" name="id2674151"></a>
|
|---|
| 70 | <a class="indexterm" name="id2674158"></a>
|
|---|
| 71 | <a class="indexterm" name="id2674164"></a>
|
|---|
| 72 | <a class="indexterm" name="id2674171"></a>
|
|---|
| 73 | <a class="indexterm" name="id2674178"></a>
|
|---|
| 74 | <a class="indexterm" name="id2674185"></a>
|
|---|
| 75 | The user of multiple server hosting is non-trivial, and requires careful configuration of each aspect of
|
|---|
| 76 | process management and start up. The <code class="filename">smb.conf</code> parameters that must be carefully configured includes:
|
|---|
| 77 | <a class="link" href="smb.conf.5.html#PRIVATEDIR" target="_top">private dir</a>, <a class="link" href="smb.conf.5.html#PIDDIRECTORY" target="_top">pid directory</a>,<a class="link" href="smb.conf.5.html#LOCKDIRECTORY" target="_top">lock directory</a>, <a class="link" href="smb.conf.5.html#INTERFACES" target="_top">interfaces</a>, <a class="link" href="smb.conf.5.html#BINDINTERFACESONLY" target="_top">bind interfaces only</a>, <a class="link" href="smb.conf.5.html#NETBIOSNAME" target="_top">netbios name</a>, <a class="link" href="smb.conf.5.html#WORKGROUP" target="_top">workgroup</a>, <a class="link" href="smb.conf.5.html#SOCKETADDRESS" target="_top">socket address</a>.
|
|---|
| 78 | </p><p>
|
|---|
| 79 | <a class="indexterm" name="id2674297"></a>
|
|---|
| 80 | <a class="indexterm" name="id2674304"></a>
|
|---|
| 81 | <a class="indexterm" name="id2674310"></a>
|
|---|
| 82 | Those who elect to create multiple Samba servers should have the ability to read and follow
|
|---|
| 83 | the Samba source code, and to modify it as needed. This mode of deployment is considered beyond the scope of
|
|---|
| 84 | this book. However, if someone will contribute more comprehensive documentation we will gladly review it, and
|
|---|
| 85 | if it is suitable extend this section of this chapter. Until such documentation becomes available the hosting
|
|---|
| 86 | of multiple samba servers on a single host is considered not supported for Samba-3 by the Samba Team.
|
|---|
| 87 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2674328"></a>Multiple Virtual Server Personalities</h3></div></div></div><p>
|
|---|
| 88 | <a class="indexterm" name="id2674336"></a>
|
|---|
| 89 | <a class="indexterm" name="id2674343"></a>
|
|---|
| 90 | <a class="indexterm" name="id2674350"></a>
|
|---|
| 91 | Samba has the ability to host multiple virtual servers, each of which have their own personality. This is
|
|---|
| 92 | achieved by configuring an <code class="filename">smb.conf</code> file that is common to all personalities hosted. Each server
|
|---|
| 93 | personality is hosted using its own <a class="link" href="smb.conf.5.html#NETBIOSALIAS" target="_top">netbios alias</a> name, and each has its own distinct
|
|---|
| 94 | <a class="link" href="smb.conf.5.html#%5BGLOBAL%5D" target="_top">[global]</a> section. Each server may have its own stanzas for services and meta-services.
|
|---|
| 95 | </p><p>
|
|---|
| 96 | <a class="indexterm" name="id2674398"></a>
|
|---|
| 97 | <a class="indexterm" name="id2674404"></a>
|
|---|
| 98 | <a class="indexterm" name="id2674411"></a>
|
|---|
| 99 | When hosting multiple virtual servers, each with their own personality, each can be in a different workgroup.
|
|---|
| 100 | Only the primary server can be a domain member or a domain controller. The personality is defined by the
|
|---|
| 101 | combination of the <a class="link" href="smb.conf.5.html#SECURITY" target="_top">security</a> mode it is operating in, the <a class="link" href="smb.conf.5.html#NETBIOSALIASES" target="_top">netbios aliases</a> it has, and the <a class="link" href="smb.conf.5.html#WORKGROUP" target="_top">workgroup</a> that is defined for it.
|
|---|
| 102 | </p><p>
|
|---|
| 103 | <a class="indexterm" name="id2674460"></a>
|
|---|
| 104 | <a class="indexterm" name="id2674467"></a>
|
|---|
| 105 | <a class="indexterm" name="id2674474"></a>
|
|---|
| 106 | <a class="indexterm" name="id2674481"></a>
|
|---|
| 107 | <a class="indexterm" name="id2674488"></a>
|
|---|
| 108 | <a class="indexterm" name="id2674495"></a>
|
|---|
| 109 | This configuration style can be used either with NetBIOS names, or using NetBIOS-less SMB over TCP services.
|
|---|
| 110 | If run using NetBIOS mode (the most common method) it is important that the parameter <a class="link" href="smb.conf.5.html#SMBPORTS" target="_top">smb ports = 139</a> should be specified in the primary <code class="filename">smb.conf</code> file. Failure to do this will result
|
|---|
| 111 | in Samba operating over TCP port 445 and problematic operation at best, and at worst only being able to obtain
|
|---|
| 112 | the functionality that is specified in the primary <code class="filename">smb.conf</code> file. The use of NetBIOS over TCP/IP using only
|
|---|
| 113 | TCP port 139 means that the use of the <code class="literal">%L</code> macro is fully enabled. If the <a class="link" href="smb.conf.5.html#SMBPORTS" target="_top">smb ports = 139</a> is not specified (the default is <em class="parameter"><code>445 139</code></em>, or if
|
|---|
| 114 | the value of this parameter is set at <em class="parameter"><code>139 445</code></em> then the <code class="literal">%L</code> macro
|
|---|
| 115 | is not serviceable.
|
|---|
| 116 | </p><p>
|
|---|
| 117 | <a class="indexterm" name="id2674573"></a>
|
|---|
| 118 | <a class="indexterm" name="id2674580"></a>
|
|---|
| 119 | <a class="indexterm" name="id2674587"></a>
|
|---|
| 120 | <a class="indexterm" name="id2674594"></a>
|
|---|
| 121 | It is possible to host multiple servers, each with their own personality, using port 445 (the NetBIOS-less SMB
|
|---|
| 122 | port), in which case the <code class="literal">%i</code> macro can be used to provide separate server identities (by
|
|---|
| 123 | IP Address). Each can have its own <a class="link" href="smb.conf.5.html#SECURITY" target="_top">security</a> mode. It will be necessary to use the
|
|---|
| 124 | <a class="link" href="smb.conf.5.html#INTERFACES" target="_top">interfaces</a>, <a class="link" href="smb.conf.5.html#BINDINTERFACESONLY" target="_top">bind interfaces only</a> and IP aliases in addition to
|
|---|
| 125 | the <a class="link" href="smb.conf.5.html#NETBIOSNAME" target="_top">netbios name</a> parameters to create the virtual servers. This method is considerably
|
|---|
| 126 | more complex than that using NetBIOS names only using TCP port 139.
|
|---|
| 127 | </p><p>
|
|---|
| 128 | <a class="indexterm" name="id2674662"></a>
|
|---|
| 129 | Consider an example environment that consists of a standalone, user-mode security Samba server and a read-only
|
|---|
| 130 | Windows 95 file server that has to be replaced. Instead of replacing the Windows 95 machine with a new PC, it
|
|---|
| 131 | is possible to add this server as a read-only anonymous file server that is hosted on the Samba server. Here
|
|---|
| 132 | are some parameters:
|
|---|
| 133 | </p><p>
|
|---|
| 134 | The Samba server is called <code class="literal">ELASTIC</code>, its workgroup name is <code class="literal">ROBINSNEST</code>.
|
|---|
| 135 | The CDROM server is called <code class="literal">CDSERVER</code> and its workgroup is <code class="literal">ARTSDEPT</code>. A
|
|---|
| 136 | possible implementation is shown here:
|
|---|
| 137 | </p><p>
|
|---|
| 138 | <a class="indexterm" name="id2674706"></a>
|
|---|
| 139 | <a class="indexterm" name="id2674713"></a>
|
|---|
| 140 | <a class="indexterm" name="id2674720"></a>
|
|---|
| 141 | <a class="indexterm" name="id2674726"></a>
|
|---|
| 142 | The <code class="filename">smb.conf</code> file for the master server is shown in <a class="link" href="cfgsmarts.html#elastic" title="Example 34.1. Elastic smb.conf File">Elastic smb.conf File</a>.
|
|---|
| 143 | This file is placed in the <code class="filename">/etc/samba</code> directory. Only the <span class="application">nmbd</span> and the <span class="application">smbd</span> daemons
|
|---|
| 144 | are needed. When started the server will appear in Windows Network Neighborhood as the machine
|
|---|
| 145 | <code class="literal">ELASTIC</code> under the workgroup <code class="literal">ROBINSNEST</code>. It is helpful if the Windows
|
|---|
| 146 | clients that must access this server are also in the workgroup <code class="literal">ROBINSNEST</code> as this will make
|
|---|
| 147 | browsing much more reliable.
|
|---|
| 148 | </p><div class="example"><a name="elastic"></a><p class="title"><b>Example 34.1. Elastic smb.conf File</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td># Global parameters</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2674817"></a><em class="parameter"><code>workgroup = ROBINSNEST</code></em></td></tr><tr><td><a class="indexterm" name="id2674828"></a><em class="parameter"><code>netbios name = ELASTIC</code></em></td></tr><tr><td><a class="indexterm" name="id2674840"></a><em class="parameter"><code>netbios aliases = CDSERVER</code></em></td></tr><tr><td><a class="indexterm" name="id2674852"></a><em class="parameter"><code>smb ports = 139</code></em></td></tr><tr><td><a class="indexterm" name="id2674864"></a><em class="parameter"><code>printcap name = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2674876"></a><em class="parameter"><code>disable spoolss = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2674888"></a><em class="parameter"><code>show add printer wizard = No</code></em></td></tr><tr><td><a class="indexterm" name="id2674900"></a><em class="parameter"><code>printing = cups</code></em></td></tr><tr><td><a class="indexterm" name="id2674911"></a><em class="parameter"><code>include = /etc/samba/smb-%L.conf</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[homes]</code></em></td></tr><tr><td><a class="indexterm" name="id2674932"></a><em class="parameter"><code>comment = Home Directories</code></em></td></tr><tr><td><a class="indexterm" name="id2674944"></a><em class="parameter"><code>valid users = %S</code></em></td></tr><tr><td><a class="indexterm" name="id2674955"></a><em class="parameter"><code>read only = No</code></em></td></tr><tr><td><a class="indexterm" name="id2674967"></a><em class="parameter"><code>browseable = No</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[office]</code></em></td></tr><tr><td><a class="indexterm" name="id2674988"></a><em class="parameter"><code>comment = Data</code></em></td></tr><tr><td><a class="indexterm" name="id2674999"></a><em class="parameter"><code>path = /data</code></em></td></tr><tr><td><a class="indexterm" name="id2675011"></a><em class="parameter"><code>read only = No</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id2675031"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2675043"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2675055"></a><em class="parameter"><code>create mask = 0600</code></em></td></tr><tr><td><a class="indexterm" name="id2675066"></a><em class="parameter"><code>guest ok = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675078"></a><em class="parameter"><code>printable = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675090"></a><em class="parameter"><code>use client driver = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675101"></a><em class="parameter"><code>browseable = No</code></em></td></tr></table></div></div><br class="example-break"><p>
|
|---|
| 149 | <a class="indexterm" name="id2675116"></a>
|
|---|
| 150 | The configuration file for the CDROM server is listed in <a class="link" href="cfgsmarts.html#cdserver" title="Example 34.2. CDROM Server smb-cdserver.conf file">CDROM Server
|
|---|
| 151 | smb-cdserver.conf file</a>. This file is called <code class="filename">smb-cdserver.conf</code> and it should be
|
|---|
| 152 | located in the <code class="filename">/etc/samba</code> directory. Machines that are in the workgroup
|
|---|
| 153 | <code class="literal">ARTSDEPT</code> will be able to browse this server freely.
|
|---|
| 154 | </p><div class="example"><a name="cdserver"></a><p class="title"><b>Example 34.2. CDROM Server smb-cdserver.conf file</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td># Global parameters</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2675182"></a><em class="parameter"><code>workgroup = ARTSDEPT</code></em></td></tr><tr><td><a class="indexterm" name="id2675194"></a><em class="parameter"><code>netbios name = CDSERVER</code></em></td></tr><tr><td><a class="indexterm" name="id2675205"></a><em class="parameter"><code>map to guest = Bad User</code></em></td></tr><tr><td><a class="indexterm" name="id2675217"></a><em class="parameter"><code>guest ok = Yes</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[carousel]</code></em></td></tr><tr><td><a class="indexterm" name="id2675238"></a><em class="parameter"><code>comment = CDROM Share</code></em></td></tr><tr><td><a class="indexterm" name="id2675250"></a><em class="parameter"><code>path = /export/cddata</code></em></td></tr><tr><td><a class="indexterm" name="id2675261"></a><em class="parameter"><code>read only = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675273"></a><em class="parameter"><code>guest ok = Yes</code></em></td></tr></table></div></div><br class="example-break"><p>
|
|---|
| 155 | <a class="indexterm" name="id2675288"></a>
|
|---|
| 156 | <a class="indexterm" name="id2675295"></a>
|
|---|
| 157 | <a class="indexterm" name="id2675302"></a>
|
|---|
| 158 | <a class="indexterm" name="id2675308"></a>
|
|---|
| 159 | The two servers have different resources and are in separate workgroups. The server <code class="literal">ELASTIC</code>
|
|---|
| 160 | can only be accessed by uses who have an appropriate account on the host server. All users will be able to
|
|---|
| 161 | access the CDROM data that is stored in the <code class="filename">/export/cddata</code> directory. File system
|
|---|
| 162 | permissions should set so that the <code class="literal">others</code> user has read-only access to the directory and its
|
|---|
| 163 | contents. The files can be owned by root (any user other than the nobody account).
|
|---|
| 164 | </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2675343"></a>Multiple Virtual Server Hosting</h3></div></div></div><p>
|
|---|
| 165 | <a class="indexterm" name="id2675351"></a>
|
|---|
| 166 | <a class="indexterm" name="id2675358"></a>
|
|---|
| 167 | <a class="indexterm" name="id2675365"></a>
|
|---|
| 168 | In this example, the requirement is for a primary domain controller for the domain called
|
|---|
| 169 | <code class="literal">MIDEARTH</code>. The PDC will be called <code class="literal">MERLIN</code>. An extra machine called
|
|---|
| 170 | <code class="literal">SAURON</code> is required. Each machine will have only its own shares. Both machines belong to the
|
|---|
| 171 | same domain/workgroup.
|
|---|
| 172 | </p><p>
|
|---|
| 173 | <a class="indexterm" name="id2675397"></a>
|
|---|
| 174 | <a class="indexterm" name="id2675404"></a>
|
|---|
| 175 | <a class="indexterm" name="id2675411"></a>
|
|---|
| 176 | The master <code class="filename">smb.conf</code> file is shown in <a class="link" href="cfgsmarts.html#mastersmbc" title="Example 34.3. Master smb.conf File Global Section">the Master smb.conf File Global Section</a>.
|
|---|
| 177 | The two files that specify the share information for each server are shown in <a class="link" href="cfgsmarts.html#merlinsmbc" title="Example 34.4. MERLIN smb-merlin.conf File Share Section">the
|
|---|
| 178 | smb-merlin.conf File Share Section</a>, and <a class="link" href="cfgsmarts.html#sauronsmbc" title="Example 34.5. SAURON smb-sauron.conf File Share Section">the smb-sauron.conf File Share
|
|---|
| 179 | Section</a>. All three files are locate in the <code class="filename">/etc/samba</code> directory.
|
|---|
| 180 | </p><div class="example"><a name="mastersmbc"></a><p class="title"><b>Example 34.3. Master smb.conf File Global Section</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td># Global parameters</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2675486"></a><em class="parameter"><code>workgroup = MIDEARTH</code></em></td></tr><tr><td><a class="indexterm" name="id2675498"></a><em class="parameter"><code>netbios name = MERLIN</code></em></td></tr><tr><td><a class="indexterm" name="id2675510"></a><em class="parameter"><code>netbios aliases = SAURON</code></em></td></tr><tr><td><a class="indexterm" name="id2675521"></a><em class="parameter"><code>passdb backend = tdbsam</code></em></td></tr><tr><td><a class="indexterm" name="id2675533"></a><em class="parameter"><code>smb ports = 139</code></em></td></tr><tr><td><a class="indexterm" name="id2675545"></a><em class="parameter"><code>syslog = 0</code></em></td></tr><tr><td><a class="indexterm" name="id2675556"></a><em class="parameter"><code>printcap name = CUPS</code></em></td></tr><tr><td><a class="indexterm" name="id2675568"></a><em class="parameter"><code>show add printer wizard = No</code></em></td></tr><tr><td><a class="indexterm" name="id2675580"></a><em class="parameter"><code>add user script = /usr/sbin/useradd -m '%u'</code></em></td></tr><tr><td><a class="indexterm" name="id2675592"></a><em class="parameter"><code>delete user script = /usr/sbin/userdel -r '%u'</code></em></td></tr><tr><td><a class="indexterm" name="id2675605"></a><em class="parameter"><code>add group script = /usr/sbin/groupadd '%g'</code></em></td></tr><tr><td><a class="indexterm" name="id2675617"></a><em class="parameter"><code>delete group script = /usr/sbin/groupdel '%g'</code></em></td></tr><tr><td><a class="indexterm" name="id2675629"></a><em class="parameter"><code>add user to group script = /usr/sbin/usermod -G '%g' '%u'</code></em></td></tr><tr><td><a class="indexterm" name="id2675642"></a><em class="parameter"><code>add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody '%u'</code></em></td></tr><tr><td><a class="indexterm" name="id2675654"></a><em class="parameter"><code>logon script = scripts\login.bat</code></em></td></tr><tr><td><a class="indexterm" name="id2675666"></a><em class="parameter"><code>logon path = </code></em></td></tr><tr><td><a class="indexterm" name="id2675678"></a><em class="parameter"><code>logon drive = X:</code></em></td></tr><tr><td><a class="indexterm" name="id2675690"></a><em class="parameter"><code>domain logons = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675701"></a><em class="parameter"><code>preferred master = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675713"></a><em class="parameter"><code>wins support = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675725"></a><em class="parameter"><code>printing = CUPS</code></em></td></tr><tr><td><a class="indexterm" name="id2675737"></a><em class="parameter"><code>include = /etc/samba/smb-%L.conf</code></em></td></tr></table></div></div><br class="example-break"><div class="example"><a name="merlinsmbc"></a><p class="title"><b>Example 34.4. MERLIN smb-merlin.conf File Share Section</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td># Global parameters</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2675777"></a><em class="parameter"><code>workgroup = MIDEARTH</code></em></td></tr><tr><td><a class="indexterm" name="id2675789"></a><em class="parameter"><code>netbios name = MERLIN</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[homes]</code></em></td></tr><tr><td><a class="indexterm" name="id2675810"></a><em class="parameter"><code>comment = Home Directories</code></em></td></tr><tr><td><a class="indexterm" name="id2675822"></a><em class="parameter"><code>valid users = %S</code></em></td></tr><tr><td><a class="indexterm" name="id2675833"></a><em class="parameter"><code>read only = No</code></em></td></tr><tr><td><a class="indexterm" name="id2675845"></a><em class="parameter"><code>browseable = No</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[office]</code></em></td></tr><tr><td><a class="indexterm" name="id2675865"></a><em class="parameter"><code>comment = Data</code></em></td></tr><tr><td><a class="indexterm" name="id2675877"></a><em class="parameter"><code>path = /data</code></em></td></tr><tr><td><a class="indexterm" name="id2675888"></a><em class="parameter"><code>read only = No</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[netlogon]</code></em></td></tr><tr><td><a class="indexterm" name="id2675909"></a><em class="parameter"><code>comment = NETLOGON</code></em></td></tr><tr><td><a class="indexterm" name="id2675921"></a><em class="parameter"><code>path = /var/lib/samba/netlogon</code></em></td></tr><tr><td><a class="indexterm" name="id2675932"></a><em class="parameter"><code>read only = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2675944"></a><em class="parameter"><code>browseable = No</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[printers]</code></em></td></tr><tr><td><a class="indexterm" name="id2675965"></a><em class="parameter"><code>comment = All Printers</code></em></td></tr><tr><td><a class="indexterm" name="id2675976"></a><em class="parameter"><code>path = /var/spool/samba</code></em></td></tr><tr><td><a class="indexterm" name="id2675988"></a><em class="parameter"><code>printable = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2676000"></a><em class="parameter"><code>use client driver = Yes</code></em></td></tr><tr><td><a class="indexterm" name="id2676012"></a><em class="parameter"><code>browseable = No</code></em></td></tr></table></div></div><br class="example-break"><div class="example"><a name="sauronsmbc"></a><p class="title"><b>Example 34.5. SAURON smb-sauron.conf File Share Section</b></p><div class="example-contents"><table class="simplelist" border="0" summary="Simple list"><tr><td># Global parameters</td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[global]</code></em></td></tr><tr><td><a class="indexterm" name="id2676052"></a><em class="parameter"><code>workgroup = MIDEARTH</code></em></td></tr><tr><td><a class="indexterm" name="id2676064"></a><em class="parameter"><code>netbios name = SAURON</code></em></td></tr><tr><td> </td></tr><tr><td><em class="parameter"><code>[www]</code></em></td></tr><tr><td><a class="indexterm" name="id2676084"></a><em class="parameter"><code>comment = Web Pages</code></em></td></tr><tr><td><a class="indexterm" name="id2676096"></a><em class="parameter"><code>path = /srv/www/htdocs</code></em></td></tr><tr><td><a class="indexterm" name="id2676108"></a><em class="parameter"><code>read only = No</code></em></td></tr></table></div></div><br class="example-break"></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="largefile.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="migration.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 33. Handling Large Directories </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Part IV. Migration and Updating</td></tr></table></div></body></html>
|
|---|