summaryrefslogtreecommitdiff
path: root/docs/htmldocs/Samba3-HOWTO/samba-bdc.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/htmldocs/Samba3-HOWTO/samba-bdc.html')
-rw-r--r--docs/htmldocs/Samba3-HOWTO/samba-bdc.html557
1 files changed, 0 insertions, 557 deletions
diff --git a/docs/htmldocs/Samba3-HOWTO/samba-bdc.html b/docs/htmldocs/Samba3-HOWTO/samba-bdc.html
deleted file mode 100644
index 07bc9b5482..0000000000
--- a/docs/htmldocs/Samba3-HOWTO/samba-bdc.html
+++ /dev/null
@@ -1,557 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. Backup Domain Control</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The Official Samba 3.5.x HOWTO and Reference Guide"><link rel="up" href="type.html" title="Part II. Server Configuration Basics"><link rel="prev" href="samba-pdc.html" title="Chapter 4. Domain Control"><link rel="next" href="domain-member.html" title="Chapter 6. Domain Membership"></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 5. Backup Domain Control</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="samba-pdc.html">Prev</a> </td><th width="60%" align="center">Part II. Server Configuration Basics</th><td width="20%" align="right"> <a accesskey="n" href="domain-member.html">Next</a></td></tr></table><hr></div><div class="chapter" title="Chapter 5. Backup Domain Control"><div class="titlepage"><div><div><h2 class="title"><a name="samba-bdc"></a>Chapter 5. Backup Domain Control</h2></div><div><div class="author"><h3 class="author"><span class="firstname">John</span> <span class="othername">H.</span> <span class="surname">Terpstra</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:jht@samba.org">jht@samba.org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Volker</span> <span class="surname">Lendecke</span></h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:Volker.Lendecke@SerNet.DE">Volker.Lendecke@SerNet.DE</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Guenther</span> <span class="surname">Deschner</span></h3><span class="contrib">LDAP updates</span> <div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:gd@samba.org">gd@samba.org</a>&gt;</code></p></div></div></div></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="samba-bdc.html#id336899">Features and Benefits</a></span></dt><dt><span class="sect1"><a href="samba-bdc.html#id337275">Essential Background Information</a></span></dt><dd><dl><dt><span class="sect2"><a href="samba-bdc.html#id337339">MS Windows NT4-style Domain Control</a></span></dt><dt><span class="sect2"><a href="samba-bdc.html#id337967">LDAP Configuration Notes</a></span></dt><dt><span class="sect2"><a href="samba-bdc.html#id338300">Active Directory Domain Control</a></span></dt><dt><span class="sect2"><a href="samba-bdc.html#id338354">What Qualifies a Domain Controller on the Network?</a></span></dt><dt><span class="sect2"><a href="samba-bdc.html#id338437">How Does a Workstation find its Domain Controller?</a></span></dt></dl></dd><dt><span class="sect1"><a href="samba-bdc.html#id338595">Backup Domain Controller Configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="samba-bdc.html#id339066">Example Configuration</a></span></dt></dl></dd><dt><span class="sect1"><a href="samba-bdc.html#id339500">Common Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="samba-bdc.html#id339540">Machine Accounts Keep Expiring</a></span></dt><dt><span class="sect2"><a href="samba-bdc.html#id339588">Can Samba Be a Backup Domain Controller to an NT4 PDC?</a></span></dt><dt><span class="sect2"><a href="samba-bdc.html#id339639">How Do I Replicate the smbpasswd File?</a></span></dt><dt><span class="sect2"><a href="samba-bdc.html#id339736">Can I Do This All with LDAP?</a></span></dt></dl></dd></dl></div><p>
-Before you continue reading this section, please make sure that you are comfortable
-with configuring a Samba domain controller as described in <a class="link" href="samba-pdc.html" title="Chapter 4. Domain Control">Domain Control</a>.
-</p><div class="sect1" title="Features and Benefits"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id336899"></a>Features and Benefits</h2></div></div></div><p>
-This is one of the most difficult chapters to summarize. It does not matter what we say here, for someone will
-still draw conclusions and/or approach the Samba Team with expectations that are either not yet capable of
-being delivered or that can be achieved far more effectively using a totally different approach. In the event
-that you should have a persistent concern that is not addressed in this book, please email <a class="ulink" href="mailto:jht@samba.org" target="_top">John H. Terpstra</a> clearly setting out your requirements and/or question, and
-we will do our best to provide a solution.
-</p><p>
-<a class="indexterm" name="id336921"></a>
-<a class="indexterm" name="id336930"></a>
-<a class="indexterm" name="id336936"></a>
-<a class="indexterm" name="id336943"></a>
-<a class="indexterm" name="id336952"></a>
-Samba-3 can act as a Backup Domain Controller (BDC) to another Samba Primary Domain Controller (PDC). A
-Samba-3 PDC can operate with an LDAP account backend. The LDAP backend can be either a common master LDAP
-server or a slave server. The use of a slave LDAP server has the benefit that when the master is down, clients
-may still be able to log onto the network. This effectively gives Samba a high degree of scalability and is
-an effective solution for large organizations. If you use an LDAP slave server for a PDC, you will need to
-ensure the master's continued availability if the slave finds its master down at the wrong time,
-you will have stability and operational problems.
-</p><p>
-<a class="indexterm" name="id336971"></a>
-<a class="indexterm" name="id336980"></a>
-<a class="indexterm" name="id336989"></a>
-<a class="indexterm" name="id336998"></a>
-While it is possible to run a Samba-3 BDC with a non-LDAP backend, that backend must allow some form of
-"two-way" propagation of changes from the BDC to the master. At this time only LDAP delivers the capability
-to propagate identity database changes from the BDC to the PDC. The BDC can use a slave LDAP server, while it
-is preferable for the PDC to use as its primary an LDAP master server.
-</p><p>
-<a class="indexterm" name="id337011"></a>
-<a class="indexterm" name="id337020"></a>
-<a class="indexterm" name="id337030"></a>
-<a class="indexterm" name="id337041"></a>
-<a class="indexterm" name="id337048"></a>
-<a class="indexterm" name="id337054"></a>
-<a class="indexterm" name="id337061"></a>
-The use of a non-LDAP backend SAM database is particularly problematic because domain member
-servers and workstations periodically change the Machine Trust Account password. The new
-password is then stored only locally. This means that in the absence of a centrally stored
-accounts database (such as that provided with an LDAP-based solution) if Samba-3 is running
-as a BDC, the BDC instance of the domain member trust account password will not reach the
-PDC (master) copy of the SAM. If the PDC SAM is then replicated to BDCs, this results in
-overwriting the SAM that contains the updated (changed) trust account password with resulting
-breakage of the domain trust.
-</p><p>
-<a class="indexterm" name="id337077"></a>
-<a class="indexterm" name="id337086"></a>
-<a class="indexterm" name="id337095"></a>
-<a class="indexterm" name="id337104"></a>
-Considering the number of comments and questions raised concerning how to configure a BDC,
-let's consider each possible option and look at the pros and cons for each possible solution.
-<a class="link" href="samba-bdc.html#pdc-bdc-table" title="Table 5.1. Domain Backend Account Distribution Options">The Domain Backend Account Distribution Options table below</a> lists
-possible design configurations for a PDC/BDC infrastructure.
-</p><div class="table"><a name="pdc-bdc-table"></a><p class="title"><b>Table 5.1. Domain Backend Account Distribution Options</b></p><div class="table-contents"><table summary="Domain Backend Account Distribution Options" border="1"><colgroup><col align="center"><col align="center"><col align="left"></colgroup><thead><tr><th align="center">PDC Backend</th><th align="center">BDC Backend</th><th align="left">Notes/Discussion</th></tr></thead><tbody><tr><td align="center"><p>Master LDAP Server</p></td><td align="center"><p>Slave LDAP Server</p></td><td align="left"><p>The optimal solution that provides high integrity. The SAM will be
- replicated to a common master LDAP server.</p></td></tr><tr><td align="center"><p>Single Central LDAP Server</p></td><td align="center"><p>Single Central LDAP Server</p></td><td align="left"><p>
- A workable solution without failover ability. This is a usable solution, but not optimal.
- </p></td></tr><tr><td align="center"><p>tdbsam</p></td><td align="center"><p>tdbsam + <code class="literal">net rpc vampire</code></p></td><td align="left"><p>
- Does not work with Samba-3.0; Samba does not implement the
- server-side protocols required.
- </p></td></tr><tr><td align="center"><p>tdbsam</p></td><td align="center"><p>tdbsam + <code class="literal">rsync</code></p></td><td align="left"><p>
- Do not use this configuration.
- Does not work because the TDB files are live and data may not
- have been flushed to disk. Furthermore, this will cause
- domain trust breakdown.
- </p></td></tr><tr><td align="center"><p>smbpasswd file</p></td><td align="center"><p>smbpasswd file</p></td><td align="left"><p>
- Do not use this configuration.
- Not an elegant solution due to the delays in synchronization
- and also suffers
- from the issue of domain trust breakdown.
- </p></td></tr></tbody></table></div></div><br class="table-break"></div><div class="sect1" title="Essential Background Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id337275"></a>Essential Background Information</h2></div></div></div><p>
-<a class="indexterm" name="id337283"></a>
-<a class="indexterm" name="id337290"></a>
-<a class="indexterm" name="id337297"></a>
-<a class="indexterm" name="id337303"></a>
-A domain controller is a machine that is able to answer logon requests from network
-workstations. Microsoft LanManager and IBM LanServer were two early products that
-provided this capability. The technology has become known as the LanMan Netlogon service.
-</p><p>
-<a class="indexterm" name="id337316"></a>
-<a class="indexterm" name="id337327"></a>
-When MS Windows NT3.10 was first released, it supported a new style of Domain Control
-and with it a new form of the network logon service that has extended functionality.
-This service became known as the NT NetLogon Service. The nature of this service has
-changed with the evolution of MS Windows NT and today provides a complex array of
-services that are implemented over an intricate spectrum of technologies.
-</p><div class="sect2" title="MS Windows NT4-style Domain Control"><div class="titlepage"><div><div><h3 class="title"><a name="id337339"></a>MS Windows NT4-style Domain Control</h3></div></div></div><p>
-<a class="indexterm" name="id337347"></a>
-<a class="indexterm" name="id337353"></a>
-<a class="indexterm" name="id337360"></a>
-<a class="indexterm" name="id337367"></a>
-<a class="indexterm" name="id337374"></a>
-<a class="indexterm" name="id337380"></a>
-<a class="indexterm" name="id337389"></a>
-Whenever a user logs into a Windows NT4/200x/XP Professional workstation,
-the workstation connects to a domain controller (authentication server) to validate that
-the username and password the user entered are valid. If the information entered
-does not match account information that has been stored in the domain
-control database (the SAM, or Security Account Manager database), a set of error
-codes is returned to the workstation that has made the authentication request.
-</p><p>
-<a class="indexterm" name="id337406"></a>
-<a class="indexterm" name="id337412"></a>
-<a class="indexterm" name="id337419"></a>
-<a class="indexterm" name="id337426"></a>
-<a class="indexterm" name="id337433"></a>
-When the username/password pair has been validated, the domain controller
-(authentication server) will respond with full enumeration of the account information
-that has been stored regarding that user in the user and machine accounts database
-for that domain. This information contains a complete network access profile for
-the user but excludes any information that is particular to the user's desktop profile,
-or for that matter it excludes all desktop profiles for groups that the user may
-belong to. It does include password time limits, password uniqueness controls,
-network access time limits, account validity information, machine names from which the
-user may access the network, and much more. All this information was stored in the SAM
-in all versions of MS Windows NT (3.10, 3.50, 3.51, 4.0).
-</p><p>
-<a class="indexterm" name="id337457"></a>
-<a class="indexterm" name="id337466"></a>
-<a class="indexterm" name="id337472"></a>
-<a class="indexterm" name="id337479"></a>
-<a class="indexterm" name="id337486"></a>
-The account information (user and machine) on domain controllers is stored in two files,
-one containing the security information and the other the SAM. These are stored in files
-by the same name in the <code class="filename">%SystemRoot%\System32\config</code> directory.
-This normally translates to the path <code class="filename">C:\WinNT\System32\config</code>. These
-are the files that are involved in replication of the SAM database where BDCs are present
-on the network.
-</p><p>
-There are two situations in which it is desirable to install BDCs:
-</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
- <a class="indexterm" name="id337518"></a>
- <a class="indexterm" name="id337524"></a>
- On the local network that the PDC is on, if there are many
- workstations and/or where the PDC is generally very busy. In this case the BDCs
- will pick up network logon requests and help to add robustness to network services.
- </p></li><li class="listitem"><p>
- <a class="indexterm" name="id337537"></a>
- At each remote site, to reduce wide-area network traffic and to add stability to
- remote network operations. The design of the network, and the strategic placement of
- BDCs, together with an implementation that localizes as much of network to client
- interchange as possible, will help to minimize wide-area network bandwidth needs
- (and thus costs).
- </p></li></ul></div><p>
-<a class="indexterm" name="id337554"></a>
-<a class="indexterm" name="id337560"></a>
-<a class="indexterm" name="id337567"></a>
-<a class="indexterm" name="id337574"></a>
-<a class="indexterm" name="id337580"></a>
-The interoperation of a PDC and its BDCs in a true Windows NT4 environment is worth
-mentioning here. The PDC contains the master copy of the SAM. In the event that an
-administrator makes a change to the user account database while physically present
-on the local network that has the PDC, the change will likely be made directly to
-the PDC instance of the master copy of the SAM. In the event that this update may
-be performed in a branch office, the change will likely be stored in a delta file
-on the local BDC. The BDC will then send a trigger to the PDC to commence the process
-of SAM synchronization. The PDC will then request the delta from the BDC and apply
-it to the master SAM. The PDC will then contact all the BDCs in the domain and
-trigger them to obtain the update and then apply that to their own copy of the SAM.
-</p><p>
-<a class="indexterm" name="id337597"></a>
-<a class="indexterm" name="id337606"></a>
-<a class="indexterm" name="id337615"></a>
-<a class="indexterm" name="id337622"></a>
-Samba-3 cannot participate in true SAM replication and is therefore not able to
-employ precisely the same protocols used by MS Windows NT4. A Samba-3 BDC will
-not create SAM update delta files. It will not interoperate with a PDC (NT4 or Samba)
-to synchronize the SAM from delta files that are held by BDCs.
-</p><p>
-<a class="indexterm" name="id337634"></a>
-<a class="indexterm" name="id337641"></a>
-Samba-3 cannot function as a BDC to an MS Windows NT4 PDC, and Samba-3 cannot
-function correctly as a PDC to an MS Windows NT4 BDC. Both Samba-3 and MS Windows
-NT4 can function as a BDC to its own type of PDC.
-</p><p>
-<a class="indexterm" name="id337652"></a>
-<a class="indexterm" name="id337659"></a>
-<a class="indexterm" name="id337665"></a>
-The BDC is said to hold a <span class="emphasis"><em>read-only</em></span> of the SAM from which
-it is able to process network logon requests and authenticate users. The BDC can
-continue to provide this service, particularly while, for example, the wide-area
-network link to the PDC is down. A BDC plays a very important role in both the
-maintenance of domain security as well as in network integrity.
-</p><p>
-<a class="indexterm" name="id337682"></a>
-<a class="indexterm" name="id337689"></a>
-<a class="indexterm" name="id337695"></a>
-<a class="indexterm" name="id337702"></a>
-In the event that the NT4 PDC should need to be taken out of service, or if it dies, one of the NT4 BDCs can
-be promoted to a PDC. If this happens while the original NT4 PDC is online, it is automatically demoted to an
-NT4 BDC. This is an important aspect of domain controller management. The tool that is used to effect a
-promotion or a demotion is the Server Manager for Domains. It should be noted that Samba-3 BDCs cannot be
-promoted in this manner because reconfiguration of Samba requires changes to the <code class="filename">smb.conf</code> file. It is easy
-enough to manuall change the <code class="filename">smb.conf</code> file and then restart relevant Samba network services.
-</p><div class="sect3" title="Example PDC Configuration"><div class="titlepage"><div><div><h4 class="title"><a name="id337727"></a>Example PDC Configuration</h4></div></div></div><p>
-<a class="indexterm" name="id337735"></a>
-<a class="indexterm" name="id337742"></a>
-Beginning with Version 2.2, Samba officially supports domain logons for all current Windows clients, including
-Windows NT4, 2003, and XP Professional. For Samba to be enabled as a PDC, some parameters in the
-<em class="parameter"><code>[global]</code></em> section of the <code class="filename">smb.conf</code> have to be set. Refer to <a class="link" href="samba-bdc.html#minimalPDC" title="Example 5.1. Minimal smb.conf for a PDC in Use with a BDC LDAP Server on PDC">the Minimal smb.conf for a PDC in Use with a BDC LDAP Server on PDC
-section</a> for an example of the minimum required settings.
-</p><div class="example"><a name="minimalPDC"></a><p class="title"><b>Example 5.1. Minimal smb.conf for a PDC in Use with a BDC LDAP Server on PDC</b></p><div class="example-contents"><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id337792"></a><em class="parameter"><code>workgroup = MIDEARTH</code></em></td></tr><tr><td><a class="indexterm" name="id337803"></a><em class="parameter"><code>passdb backend = ldapsam://localhost:389</code></em></td></tr><tr><td><a class="indexterm" name="id337815"></a><em class="parameter"><code>domain master = yes</code></em></td></tr><tr><td><a class="indexterm" name="id337826"></a><em class="parameter"><code>domain logons = yes</code></em></td></tr><tr><td><a class="indexterm" name="id337838"></a><em class="parameter"><code>ldap suffix = dc=quenya,dc=org</code></em></td></tr><tr><td><a class="indexterm" name="id337849"></a><em class="parameter"><code>ldap user suffix = ou=Users</code></em></td></tr><tr><td><a class="indexterm" name="id337861"></a><em class="parameter"><code>ldap group suffix = ou=Groups</code></em></td></tr><tr><td><a class="indexterm" name="id337873"></a><em class="parameter"><code>ldap machine suffix = ou=Computers</code></em></td></tr><tr><td><a class="indexterm" name="id337884"></a><em class="parameter"><code>ldap idmap suffix = ou=Idmap</code></em></td></tr><tr><td><a class="indexterm" name="id337896"></a><em class="parameter"><code>ldap admin dn = cn=sambadmin,dc=quenya,dc=org</code></em></td></tr></table></div></div><br class="example-break"><p>
-<a class="indexterm" name="id337911"></a>
-<a class="indexterm" name="id337918"></a>
-Several other things like a <em class="parameter"><code>[homes]</code></em> and a <em class="parameter"><code>[netlogon]</code></em> share
-also need to be set along with settings for the profile path, the user's home drive, and so on. This is not
-covered in this chapter; for more information please refer to <a class="link" href="samba-pdc.html" title="Chapter 4. Domain Control">Domain Control</a>.
-Refer to <a class="link" href="samba-pdc.html" title="Chapter 4. Domain Control">the Domain Control chapter</a> for specific recommendations for PDC
-configuration. Alternately, fully documented working example network configurations using OpenLDAP and Samba
-as available in the <a class="ulink" href="http://www.samba.org/samba/docs/Samba3-ByExample" target="_top">book</a> <span class="quote">&#8220;<span class="quote">Samba-3
-by Example</span>&#8221;</span> that may be obtained from local and on-line book stores.
-</p></div></div><div class="sect2" title="LDAP Configuration Notes"><div class="titlepage"><div><div><h3 class="title"><a name="id337967"></a>LDAP Configuration Notes</h3></div></div></div><p>
-<a class="indexterm" name="id337974"></a>
-<a class="indexterm" name="id337984"></a>
-<a class="indexterm" name="id337993"></a>
-When configuring a master and a slave LDAP server, it is advisable to use the master LDAP server
-for the PDC and slave LDAP servers for the BDCs. It is not essential to use slave LDAP servers; however,
-many administrators will want to do so in order to provide redundant services. Of course, one or more BDCs
-may use any slave LDAP server. Then again, it is entirely possible to use a single LDAP server for the
-entire network.
-</p><p>
-<a class="indexterm" name="id338006"></a>
-<a class="indexterm" name="id338016"></a>
-<a class="indexterm" name="id338025"></a>
-<a class="indexterm" name="id338031"></a>
-<a class="indexterm" name="id338038"></a>
-When configuring a master LDAP server that will have slave LDAP servers, do not forget to configure this in
-the <code class="filename">/etc/openldap/slapd.conf</code> file. It must be noted that the DN of a server certificate
-must use the CN attribute to name the server, and the CN must carry the servers' fully qualified domain name.
-Additional alias names and wildcards may be present in the subjectAltName certificate extension. More details
-on server certificate names are in RFC2830.
-</p><p>
-<a class="indexterm" name="id338058"></a>
-<a class="indexterm" name="id338065"></a>
-<a class="indexterm" name="id338071"></a>
-<a class="indexterm" name="id338078"></a>
-<a class="indexterm" name="id338088"></a>
-<a class="indexterm" name="id338094"></a>
-<a class="indexterm" name="id338101"></a>
-It does not really fit within the scope of this document, but a working LDAP installation is basic to
-LDAP-enabled Samba operation. When using an OpenLDAP server with Transport Layer Security (TLS), the machine
-name in <code class="filename">/etc/ssl/certs/slapd.pem</code> must be the same as in
-<code class="filename">/etc/openldap/sldap.conf</code>. The Red Hat Linux startup script creates the
-<code class="filename">slapd.pem</code> file with hostname <span class="quote">&#8220;<span class="quote">localhost.localdomain.</span>&#8221;</span> It is impossible to
-access this LDAP server from a slave LDAP server (i.e., a Samba BDC) unless the certificate is re-created with
-a correct hostname.
-</p><p>
-<a class="indexterm" name="id338137"></a>
-<a class="indexterm" name="id338143"></a>
-<a class="indexterm" name="id338150"></a>
-<a class="indexterm" name="id338157"></a>
-<a class="indexterm" name="id338164"></a>
-<a class="indexterm" name="id338171"></a>
-Do not install a Samba PDC so that is uses an LDAP slave server. Joining client machines to the domain
-will fail in this configuration because the change to the machine account in the LDAP tree must take place on
-the master LDAP server. This is not replicated rapidly enough to the slave server that the PDC queries. It
-therefore gives an error message on the client machine about not being able to set up account credentials. The
-machine account is created on the LDAP server, but the password fields will be empty. Unfortunately, some
-sites are unable to avoid such configurations, and these sites should review the <a class="link" href="smb.conf.5.html#LDAPREPLICATIONSLEEP" target="_top">ldap replication sleep</a> parameter, intended to slow down Samba sufficiently for the replication to catch up.
-This is a kludge, and one that the administrator must manually duplicate in any scripts (such as the
-<a class="link" href="smb.conf.5.html#ADDMACHINESCRIPT" target="_top">add machine script</a>) that they use.
-</p><p>
-Possible PDC/BDC plus LDAP configurations include:
-</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
- PDC+BDC -&gt; One Central LDAP Server.
- </p></li><li class="listitem"><p>
- PDC -&gt; LDAP master server, BDC -&gt; LDAP slave server.
- </p></li><li class="listitem"><p>
- PDC -&gt; LDAP master, with secondary slave LDAP server.
- </p><p>
- BDC -&gt; LDAP master, with secondary slave LDAP server.
- </p></li><li class="listitem"><p>
- PDC -&gt; LDAP master, with secondary slave LDAP server.
- </p><p>
- BDC -&gt; LDAP slave server, with secondary master LDAP server.
- </p></li></ul></div><p>
-In order to have a fallback configuration (secondary) LDAP server, you would specify
-the secondary LDAP server in the <code class="filename">smb.conf</code> file as shown in <a class="link" href="samba-bdc.html#mulitldapcfg" title="Example 5.2. Multiple LDAP Servers in smb.conf">the Multiple LDAP
-Servers in <code class="filename">smb.conf</code> example</a>.
-</p><div class="example"><a name="mulitldapcfg"></a><p class="title"><b>Example 5.2. Multiple LDAP Servers in <code class="filename">smb.conf</code></b></p><div class="example-contents"><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id338287"></a><em class="parameter"><code>passdb backend = ldapsam:"ldap://master.quenya.org ldap://slave.quenya.org"</code></em></td></tr></table></div></div><br class="example-break"></div><div class="sect2" title="Active Directory Domain Control"><div class="titlepage"><div><div><h3 class="title"><a name="id338300"></a>Active Directory Domain Control</h3></div></div></div><p>
-<a class="indexterm" name="id338308"></a>
-<a class="indexterm" name="id338315"></a>
-<a class="indexterm" name="id338321"></a>
-<a class="indexterm" name="id338328"></a>
-<a class="indexterm" name="id338335"></a>
-<a class="indexterm" name="id338342"></a>
-As of the release of MS Windows 2000 and Active Directory, this information is now stored
-in a directory that can be replicated and for which partial or full administrative control
-can be delegated. Samba-3 is not able to be a domain controller within an Active Directory
-tree, and it cannot be an Active Directory server. This means that Samba-3 also cannot
-act as a BDC to an Active Directory domain controller.
-</p></div><div class="sect2" title="What Qualifies a Domain Controller on the Network?"><div class="titlepage"><div><div><h3 class="title"><a name="id338354"></a>What Qualifies a Domain Controller on the Network?</h3></div></div></div><p>
-<a class="indexterm" name="id338362"></a>
-<a class="indexterm" name="id338369"></a>
-<a class="indexterm" name="id338375"></a>
-<a class="indexterm" name="id338382"></a>
-Every machine that is a domain controller for the domain MIDEARTH has to register the NetBIOS
-group name MIDEARTH&lt;1C&gt; with the WINS server and/or by broadcast on the local network.
-The PDC also registers the unique NetBIOS name MIDEARTH&lt;1B&gt; with the WINS server.
-The name type &lt;1B&gt; name is normally reserved for the Domain Master Browser (DMB), a role
-that has nothing to do with anything related to authentication, but the Microsoft domain
-implementation requires the DMB to be on the same machine as the PDC.
-</p><p>
-<a class="indexterm" name="id338398"></a>
-<a class="indexterm" name="id338405"></a>
-<a class="indexterm" name="id338412"></a>
-Where a WINS server is not used, broadcast name registrations alone must suffice. Refer to
-<a class="link" href="NetworkBrowsing.html" title="Chapter 10. Network Browsing">Network Browsing</a>,<a class="link" href="NetworkBrowsing.html#netdiscuss" title="Discussion">Discussion</a>
-for more information regarding TCP/IP network protocols and how SMB/CIFS names are handled.
-</p></div><div class="sect2" title="How Does a Workstation find its Domain Controller?"><div class="titlepage"><div><div><h3 class="title"><a name="id338437"></a>How Does a Workstation find its Domain Controller?</h3></div></div></div><p>
-<a class="indexterm" name="id338445"></a>
-<a class="indexterm" name="id338452"></a>
-There are two different mechanisms to locate a domain controller: one method is used when
-NetBIOS over TCP/IP is enabled and the other when it has been disabled in the TCP/IP
-network configuration.
-</p><p>
-<a class="indexterm" name="id338463"></a>
-<a class="indexterm" name="id338470"></a>
-Where NetBIOS over TCP/IP is disabled, all name resolution involves the use of DNS, broadcast
-messaging over UDP, as well as Active Directory communication technologies. In this type of
-environment all machines require appropriate DNS entries. More information may be found in
-<a class="link" href="NetworkBrowsing.html#adsdnstech" title="DNS and Active Directory">DNS and Active Directory</a>.
-</p><div class="sect3" title="NetBIOS Over TCP/IP Enabled"><div class="titlepage"><div><div><h4 class="title"><a name="id338488"></a>NetBIOS Over TCP/IP Enabled</h4></div></div></div><p>
-<a class="indexterm" name="id338496"></a>
-<a class="indexterm" name="id338503"></a>
-<a class="indexterm" name="id338509"></a>
-<a class="indexterm" name="id338516"></a>
-An MS Windows NT4/200x/XP Professional workstation in the domain MIDEARTH that wants a
-local user to be authenticated has to find the domain controller for MIDEARTH. It does this
-by doing a NetBIOS name query for the group name MIDEARTH&lt;1C&gt;. It assumes that each
-of the machines it gets back from the queries is a domain controller and can answer logon
-requests. To not open security holes, both the workstation and the selected domain controller
-authenticate each other. After that the workstation sends the user's credentials (name and
-password) to the local domain controller for validation.
-</p></div><div class="sect3" title="NetBIOS Over TCP/IP Disabled"><div class="titlepage"><div><div><h4 class="title"><a name="id338539"></a>NetBIOS Over TCP/IP Disabled</h4></div></div></div><p>
-<a class="indexterm" name="id338547"></a>
-<a class="indexterm" name="id338554"></a>
-<a class="indexterm" name="id338561"></a>
-<a class="indexterm" name="id338567"></a>
-An MS Windows NT4/200x/XP Professional workstation in the realm <code class="constant">quenya.org</code>
-that has a need to affect user logon authentication will locate the domain controller by
-re-querying DNS servers for the <code class="constant">_ldap._tcp.pdc._msdcs.quenya.org</code> record.
-More information regarding this subject may be found in <a class="link" href="NetworkBrowsing.html#adsdnstech" title="DNS and Active Directory">DNS and Active Directory</a>.
-</p></div></div></div><div class="sect1" title="Backup Domain Controller Configuration"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id338595"></a>Backup Domain Controller Configuration</h2></div></div></div><p>
-<a class="indexterm" name="id338603"></a>
-The creation of a BDC requires some steps to prepare the Samba server before
-<span class="application">smbd</span> is executed for the first time. These steps are as follows:
-</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
- <a class="indexterm" name="id338623"></a>
- <a class="indexterm" name="id338629"></a>
- <a class="indexterm" name="id338636"></a>
- <a class="indexterm" name="id338642"></a>
- <a class="indexterm" name="id338649"></a>
- <a class="indexterm" name="id338656"></a>
- The domain SID has to be the same on the PDC and the BDC. In Samba versions pre-2.2.5, the domain SID was
- stored in the file <code class="filename">private/MACHINE.SID</code>. For all versions of Samba released since 2.2.5
- the domain SID is stored in the file <code class="filename">private/secrets.tdb</code>. This file is unique to each
- server and cannot be copied from a PDC to a BDC; the BDC will generate a new SID at startup. It will overwrite
- the PDC domain SID with the newly created BDC SID. There is a procedure that will allow the BDC to acquire the
- domain SID. This is described here.
- </p><p>
- <a class="indexterm" name="id338682"></a>
- <a class="indexterm" name="id338689"></a>
- <a class="indexterm" name="id338695"></a>
- <a class="indexterm" name="id338702"></a>
- <a class="indexterm" name="id338709"></a>
- To retrieve the domain SID from the PDC or an existing BDC and store it in the
- <code class="filename">secrets.tdb</code>, execute:
- </p><pre class="screen">
-<code class="prompt">root# </code><strong class="userinput"><code>net rpc getsid</code></strong>
-</pre></li><li class="listitem"><p>
- <a class="indexterm" name="id338748"></a>
- <a class="indexterm" name="id338755"></a>
- <a class="indexterm" name="id338761"></a>
- Specification of the <a class="link" href="smb.conf.5.html#LDAPADMINDN" target="_top">ldap admin dn</a> is obligatory.
- This also requires the LDAP administration password to be set in the <code class="filename">secrets.tdb</code>
- using the <code class="literal">smbpasswd -w <em class="replaceable"><code>mysecret</code></em></code>.
- </p></li><li class="listitem"><p>
- The <a class="link" href="smb.conf.5.html#LDAPSUFFIX" target="_top">ldap suffix</a> parameter and the <a class="link" href="smb.conf.5.html#LDAPIDMAPSUFFIX" target="_top">ldap idmap suffix</a>
- parameter must be specified in the <code class="filename">smb.conf</code> file.
- </p></li><li class="listitem"><p>
- <a class="indexterm" name="id338833"></a>
- <a class="indexterm" name="id338842"></a>
- <a class="indexterm" name="id338849"></a>
- <a class="indexterm" name="id338856"></a>
- The UNIX user database has to be synchronized from the PDC to the
- BDC. This means that both the <code class="filename">/etc/passwd</code> and
- <code class="filename">/etc/group</code> have to be replicated from the PDC
- to the BDC. This can be done manually whenever changes are made.
- Alternately, the PDC is set up as an NIS master server and the BDC as an NIS slave
- server. To set up the BDC as a mere NIS client would not be enough,
- as the BDC would not be able to access its user database in case of
- a PDC failure. NIS is by no means the only method to synchronize
- passwords. An LDAP solution would also work.
- </p></li><li class="listitem"><p>
- <a class="indexterm" name="id338884"></a>
- <a class="indexterm" name="id338891"></a>
- <a class="indexterm" name="id338897"></a>
- <a class="indexterm" name="id338904"></a>
- <a class="indexterm" name="id338910"></a>
- <a class="indexterm" name="id338917"></a>
- <a class="indexterm" name="id338924"></a>
- <a class="indexterm" name="id338931"></a>
- The Samba password database must be replicated from the PDC to the BDC.
- Although it is possible to synchronize the <code class="filename">smbpasswd</code>
- file with <code class="literal">rsync</code> and <code class="literal">ssh</code>, this method
- is broken and flawed, and is therefore not recommended. A better solution
- is to set up slave LDAP servers for each BDC and a master LDAP server for the PDC.
- The use of rsync is inherently flawed by the fact that the data will be replicated
- at timed intervals. There is no guarantee that the BDC will be operating at all
- times with correct and current machine and user account information. This means that
- this method runs the risk of users being inconvenienced by discontinuity of access
- to network services due to inconsistent security data. It must be born in mind that
- Windows workstations update (change) the machine trust account password at regular
- intervals administrators are not normally aware that this is happening
- or when it takes place.
- </p><p>
- <a class="indexterm" name="id338968"></a>
- <a class="indexterm" name="id338975"></a>
- <a class="indexterm" name="id338982"></a>
- <a class="indexterm" name="id338989"></a>
- The use of LDAP for both the POSIX (UNIX user and group) accounts and for the
- SambaSAMAccount data automatically ensures that all account change information
- will be written to the shared directory. This eliminates the need for any special
- action to synchronize account information because LDAP will meet that requirement.
- </p></li><li class="listitem"><p>
- <a class="indexterm" name="id339003"></a>
- <a class="indexterm" name="id339010"></a>
- <a class="indexterm" name="id339016"></a>
- <a class="indexterm" name="id339023"></a>
- <a class="indexterm" name="id339029"></a>
- <a class="indexterm" name="id339036"></a>
- The netlogon share has to be replicated from the PDC to the BDC. This can be done manually whenever login
- scripts are changed, or it can be done automatically using a <code class="literal">cron</code> job that will replicate
- the directory structure in this share using a tool like <code class="literal">rsync</code>. The use of
- <code class="literal">rsync</code> for replication of the netlogon data is not critical to network security and is one
- that can be manually managed given that the administrator will make all changes to the netlogon share as part
- of a conscious move.
- </p></li></ul></div><div class="sect2" title="Example Configuration"><div class="titlepage"><div><div><h3 class="title"><a name="id339066"></a>Example Configuration</h3></div></div></div><p>
-Finally, the BDC has to be capable of being found by the workstations. This can be done by configuring the
-Samba <code class="filename">smb.conf</code> file <em class="parameter"><code>[global]</code></em> section as shown in <a class="link" href="samba-bdc.html#minim-bdc" title="Example 5.3. Minimal Setup for Being a BDC">Minimal
-Setup for Being a BDC</a>.
-</p><div class="example"><a name="minim-bdc"></a><p class="title"><b>Example 5.3. Minimal Setup for Being a BDC</b></p><div class="example-contents"><table border="0" summary="Simple list" class="simplelist"><tr><td><a class="indexterm" name="id339110"></a><em class="parameter"><code>workgroup = MIDEARTH</code></em></td></tr><tr><td><a class="indexterm" name="id339121"></a><em class="parameter"><code>passdb backend = ldapsam:ldap://slave-ldap.quenya.org</code></em></td></tr><tr><td><a class="indexterm" name="id339133"></a><em class="parameter"><code>domain master = no</code></em></td></tr><tr><td><a class="indexterm" name="id339144"></a><em class="parameter"><code>domain logons = yes</code></em></td></tr><tr><td><a class="indexterm" name="id339156"></a><em class="parameter"><code>ldap suffix = dc=abmas,dc=biz</code></em></td></tr><tr><td><a class="indexterm" name="id339167"></a><em class="parameter"><code>ldap user suffix = ou=Users</code></em></td></tr><tr><td><a class="indexterm" name="id339179"></a><em class="parameter"><code>ldap group suffix = ou=Groups</code></em></td></tr><tr><td><a class="indexterm" name="id339191"></a><em class="parameter"><code>ldap machine suffix = ou=Computers</code></em></td></tr><tr><td><a class="indexterm" name="id339202"></a><em class="parameter"><code>ldap idmap suffix = ou=Idmap</code></em></td></tr><tr><td><a class="indexterm" name="id339214"></a><em class="parameter"><code>ldap admin dn = cn=sambadmin,dc=quenya,dc=org</code></em></td></tr><tr><td><a class="indexterm" name="id339226"></a><em class="parameter"><code>idmap backend = ldap:ldap://master-ldap.quenya.org</code></em></td></tr><tr><td><a class="indexterm" name="id339237"></a><em class="parameter"><code>idmap uid = 10000-20000</code></em></td></tr><tr><td><a class="indexterm" name="id339249"></a><em class="parameter"><code>idmap gid = 10000-20000</code></em></td></tr></table></div></div><br class="example-break"><p>
-Fully documented working example network configurations using OpenLDAP and Samba
-as available in the <a class="ulink" href="http://www.samba.org/samba/docs/Samba3-ByExample" target="_top">book</a> <span class="quote">&#8220;<span class="quote">Samba-3
-by Example</span>&#8221;</span> that may be obtained from local and on-line book stores.
-</p><p>
-<a class="indexterm" name="id339278"></a>
-<a class="indexterm" name="id339284"></a>
-<a class="indexterm" name="id339291"></a>
-<a class="indexterm" name="id339298"></a>
-This configuration causes the BDC to register only the name MIDEARTH&lt;1C&gt; with the WINS server. This is
-not a problem, as the name MIDEARTH&lt;1C&gt; is a NetBIOS group name that is meant to be registered by more
-than one machine. The parameter <a class="link" href="smb.conf.5.html#DOMAINMASTER" target="_top">domain master = no</a> forces the BDC not to
-register MIDEARTH&lt;1B&gt;, which is a unique NetBIOS name that is reserved for the PDC.
-</p><p>
-<a class="indexterm" name="id339324"></a>
-<a class="indexterm" name="id339330"></a>
-<a class="indexterm" name="id339337"></a>
-<a class="indexterm" name="id339344"></a>
-<a class="indexterm" name="id339351"></a>
-<a class="indexterm" name="id339358"></a>
-<a class="indexterm" name="id339365"></a>
-<a class="indexterm" name="id339372"></a>
-<a class="indexterm" name="id339378"></a>
-The <em class="parameter"><code>idmap backend</code></em> will redirect the <code class="literal">winbindd</code> utility to use the LDAP
-database to store all mappings for Windows SIDs to UIDs and GIDs for UNIX accounts in a repository that is
-shared. The BDC will however depend on local resolution of UIDs and GIDs via NSS and the
-<code class="literal">nss_ldap</code> utility.
-</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
-<a class="indexterm" name="id339409"></a>
-<a class="indexterm" name="id339418"></a>
-<a class="indexterm" name="id339425"></a>
-<a class="indexterm" name="id339432"></a>
-Samba-3 has introduced a new ID mapping facility. One of the features of this facility is that it
-allows greater flexibility in how user and group IDs are handled in respect to NT domain user and group
-SIDs. One of the new facilities provides for explicitly ensuring that UNIX/Linux UID and GID values
-will be consistent on the PDC, all BDCs, and all domain member servers. The parameter that controls this
-is called <em class="parameter"><code>idmap backend</code></em>. Please refer to the man page for <code class="filename">smb.conf</code> for more information
-regarding its behavior.
-</p></div><p>
-<a class="indexterm" name="id339461"></a>
-<a class="indexterm" name="id339468"></a>
-<a class="indexterm" name="id339475"></a>
-The use of the <a class="link" href="smb.conf.5.html#IDMAPBACKEND" target="_top">idmap backend = ldap:ldap://master.quenya.org</a>
-option on a BDC only makes sense where ldapsam is used on a PDC. The purpose of an LDAP-based idmap backend is
-also to allow a domain member (without its own passdb backend) to use winbindd to resolve Windows network users
-and groups to common UID/GIDs. In other words, this option is generally intended for use on BDCs and on domain
-member servers.
-</p></div></div><div class="sect1" title="Common Errors"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id339500"></a>Common Errors</h2></div></div></div><p>
-<a class="indexterm" name="id339508"></a>
-Domain control was a new area for Samba, but there are now many examples that we may refer to.
-Updated information will be published as they become available and may be found in later Samba releases or
-from the Samba Web <a class="ulink" href="http://samba.org" target="_top">site</a>; refer in particular to the
-<code class="filename">WHATSNEW.txt</code> in the Samba release tarball. The book, <span class="quote">&#8220;<span class="quote">Samba-3 by Example</span>&#8221;</span>
-documents well tested and proven configuration examples. You can obtain a copy of this
-<a class="ulink" href="http://www.samba.org/samba/docs/Samba3-ByExample.pdf" target="_top">book</a> for the Samba web site.
-</p><div class="sect2" title="Machine Accounts Keep Expiring"><div class="titlepage"><div><div><h3 class="title"><a name="id339540"></a>Machine Accounts Keep Expiring</h3></div></div></div><p>
-<a class="indexterm" name="id339548"></a>
-<a class="indexterm" name="id339555"></a>
-<a class="indexterm" name="id339562"></a>
-<a class="indexterm" name="id339568"></a>
-This problem will occur when the passdb (SAM) files are copied from a central
-server but the local BDC is acting as a PDC. This results in the application of
-Local Machine Trust Account password updates to the local SAM. Such updates
-are not copied back to the central server. The newer machine account password is then
-overwritten when the SAM is recopied from the PDC. The result is that the domain member machine
-on startup will find that its passwords do not match the one now in the database, and
-since the startup security check will now fail, this machine will not allow logon attempts
-to proceed and the account expiry error will be reported.
-</p><p>
-The solution is to use a more robust passdb backend, such as the ldapsam backend, setting up
-a slave LDAP server for each BDC and a master LDAP server for the PDC.
-</p></div><div class="sect2" title="Can Samba Be a Backup Domain Controller to an NT4 PDC?"><div class="titlepage"><div><div><h3 class="title"><a name="id339588"></a>Can Samba Be a Backup Domain Controller to an NT4 PDC?</h3></div></div></div><p>
-<a class="indexterm" name="id339596"></a>
-<a class="indexterm" name="id339605"></a>
-No. The native NT4 SAM replication protocols have not yet been fully implemented.
-</p><p>
-<a class="indexterm" name="id339614"></a>
-<a class="indexterm" name="id339621"></a>
-<a class="indexterm" name="id339627"></a>
-Can I get the benefits of a BDC with Samba? Yes, but only to a Samba PDC.The
-main reason for implementing a BDC is availability. If the PDC is a Samba
-machine, a second Samba machine can be set up to service logon requests whenever
-the PDC is down.
-</p></div><div class="sect2" title="How Do I Replicate the smbpasswd File?"><div class="titlepage"><div><div><h3 class="title"><a name="id339639"></a>How Do I Replicate the smbpasswd File?</h3></div></div></div><p>
-<a class="indexterm" name="id339646"></a>
-<a class="indexterm" name="id339655"></a>
-<a class="indexterm" name="id339662"></a>
-Replication of the smbpasswd file is sensitive. It has to be done whenever changes
-to the SAM are made. Every user's password change is done in the smbpasswd file and
-has to be replicated to the BDC. So replicating the smbpasswd file very often is necessary.
-</p><p>
-<a class="indexterm" name="id339674"></a>
-<a class="indexterm" name="id339681"></a>
-<a class="indexterm" name="id339688"></a>
-As the smbpasswd file contains plaintext password equivalents, it must not be
-sent unencrypted over the wire. The best way to set up smbpasswd replication from
-the PDC to the BDC is to use the utility rsync. rsync can use ssh as a transport.
-<code class="literal">ssh</code> itself can be set up to accept <span class="emphasis"><em>only</em></span>
-<code class="literal">rsync</code> transfer without requiring the user to type a password.
-</p><p>
-<a class="indexterm" name="id339715"></a>
-<a class="indexterm" name="id339722"></a>
-As said a few times before, use of this method is broken and flawed. Machine trust
-accounts will go out of sync, resulting in a broken domain. This method is
-<span class="emphasis"><em>not</em></span> recommended. Try using LDAP instead.
-</p></div><div class="sect2" title="Can I Do This All with LDAP?"><div class="titlepage"><div><div><h3 class="title"><a name="id339736"></a>Can I Do This All with LDAP?</h3></div></div></div><p>
-<a class="indexterm" name="id339744"></a>
-<a class="indexterm" name="id339751"></a>
-The simple answer is yes. Samba's pdb_ldap code supports binding to a replica
-LDAP server and will also follow referrals and rebind to the master if it ever
-needs to make a modification to the database. (Normally BDCs are read-only, so
-this will not occur often).
-</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="samba-pdc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="type.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="domain-member.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Domain Control </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Domain Membership</td></tr></table></div></body></html>