1 <chapter id="samba-pdc">
7 <firstname>David</firstname><surname>Bannon</surname>
9 <orgname>Samba Team</orgname>
10 <address><email>dbannon@samba.org</email></address>
15 <title>Domain Control</title>
17 <formalpara><title><emphasis>The Essence of Learning:</emphasis></title>
19 There are many who approach MS Windows networking with incredible misconceptions.
20 That's OK, because it give the rest of us plenty of opportunity to be of assistance.
21 Those who really want help would be well advised to become familiar with information
22 that is already available.
27 The reader is advised NOT to tackle this section without having first understood
28 and mastered some basics. MS Windows networking is not particularly forgiving of
29 misconfiguration. Users of MS Windows networking are likely to complain bitterly
30 of persistent niggles that may be caused by broken network or system configuration.
31 To a great many people however, MS Windows networking starts with a domain controller
32 that in some magical way is expected to solve all ills.
36 From the Samba mailing list one can readilly identify many common networking issues.
37 If you are not clear on the following subjects, then it will do much good to read the
38 sections of this HOWTO that deal with it. These are the most common causes of MS Windows
43 <listitem><para>Basic TCP/IP configuration</para></listitem>
44 <listitem><para>NetBIOS name resolution</para></listitem>
45 <listitem><para>Authentication configuration</para></listitem>
46 <listitem><para>User and Group configuration</para></listitem>
47 <listitem><para>Basic File and Directory Permission Control in Unix/Linux</para></listitem>
48 <listitem><para>Understanding of how MS Windows clients interoperate in a network
49 environment</para></listitem>
53 Do not be put off, on the surface of it MS Windows networking seems so simple that any fool
54 can do it. In fact, it is not a good idea to set up an MS Windows network with
55 inadequate training and preparation. But let's get our first indelible principle out of the
56 way: <emphasis>It is perfectly OK to make mistakes!</emphasis> In the right place and at
57 the right time, mistakes are the essence of learning. It is <emphasis>very much</emphasis>
58 not Ok to make mistakes that cause loss of productivity and impose an avoidable financial
59 burden on an organisation.
63 Where is the right place to make mistakes? Only out of harms' way! If you are going to
64 make mistakes, then please do this on a test network, away from users and in such a way as
65 to not inflict pain on others. Do your learning on a test network.
69 <title>Features and Benefits</title>
72 <emphasis>What is the key benefit of Microsoft Domain security?</emphasis>
76 In a word, <emphasis>Single Sign On</emphasis>, or SSO for short. This to many is the holy
77 grail of MS Windows NT and beyond networking. SSO allows users in a well designed network
78 to log onto any workstation that is a member of the domain that their user account is in
79 (or in a domain that has an appropriate trust relationship with the domain they are visiting)
80 and they will be able to log onto the network and access resources (shares, files, and printers)
81 as if they are sitting at their home (personal) workstation. This is a feature of the Domain
86 The benefits of Domain security are fully available to those sites that deploy a Samba PDC.
90 The following functionalities are new to the Samba-3 release:
95 Windows NT4 domain trusts
99 Adding users via the User Manager for Domains or via the Windows 200x Microsoft
104 Introduces replaceable and multiple user account (authentication)
105 back ends. In the case where the back end is placed in an LDAP database
106 Samba-3 confers the benefits of a back end that can be distributed, replicated,
111 Implements full Unicode support. This simplifies cross locale internationalisation
112 support. It also opens up the use of protocols that samba-2.2.x had but could not use due
113 to the need to fully support Unicode.
118 The following functionalities are NOT provided by Samba-3:
123 SAM replication with Windows NT4 Domain Controllers
124 (i.e. a Samba PDC and a Windows NT BDC or vice versa)
128 Acting as a Windows 2000 Domain Controller (i.e. Kerberos and
129 Active Directory) - In point of fact, Samba-3 DOES have some
130 Active Directory Domain Control ability that is at this time
131 purely experimental <emphasis>AND</emphasis> that is certain
132 to change as it becomes a fully supported feature some time
133 during the samba-3 (or later) life cycle.
138 Windows 9x / Me / XP Home clients are not true members of a domain for reasons outlined
139 in this chapter. The protocol for support of Windows 9x / Me style network (domain) logons
140 is completely different from NT4 / Win2k type domain logons and has been officially supported
141 for some time. These clients use the old LanMan Network Logon facilities that are supported
142 in Samba since approximately the samba-1.9.15 series.
146 Samba-3 has an implementation of group mapping between Windows NT groups
147 and Unix groups (this is really quite complicated to explain in a short space) this is
148 discussed more fully in a chapter dedicated to this topic..
152 A Samba-3, like an MS Windows NT4 PDC or a Windows 200x Active Directory, needs to store
153 user and machine trust account information in a suitable backend data store. With Samba-3
154 there can be multiple back-ends for this including:
159 <emphasis>smbpasswd</emphasis> - the plain ascii file stored used by
160 earlier versions of Samba. This file configuration option requires
161 a Unix/Linux system account for EVERY entry (ie: both for user and for
162 machine accounts). This file will be located in the <emphasis>private</emphasis>
163 directory (default is /usr/local/samba/lib/private or on linux /etc/samba).
167 <emphasis>tdbsam</emphasis> - a binary database backend that will be
168 stored in the <emphasis>private</emphasis> directory in a file called
169 <emphasis>passwd.tdb</emphasis>. The key benefit of this binary format
170 file is that it can store binary objects that can not be accomodated
171 in the traditional plain text smbpasswd file. These permit the extended
172 account controls that MS Windows NT4 and later also have.
176 <emphasis>ldapsam</emphasis> - An LDAP based back-end. Permits the
177 LDAP server to be specified. eg: ldap://localhost or ldap://frodo.murphy.com.
178 Like the tdbsam, ldapsam permits the storing of extended account attributes
179 for control of things like: Permitted access times, password activation and
180 expiry, permitted points of access (workstation names), per user profile
181 location, and much more.
185 <emphasis>ldapsam_compat</emphasis> - An LDAP back-end that maintains backwards
186 compatibility with the behaviour of samba-2.2.x. You should use this in the process
187 of mirgrating from samba-2.2.x to samba-3 if you do not want to rebuild your LDAP
193 Read the chapter about the <link linkend="passdb">User Database</link> for details
194 regarding the choices available and how to configure them.
198 The new tdbsam and ldapsam account backends store substantially more information than
199 smbpasswd is capable of. The new backend database includes capacity to specify
200 per user settings for many parameters, over-riding global settings given in the
201 <filename>smb.conf</filename> file. eg: logon drive, logon home, logon path, etc.
202 Thus, with samba-3 it is possible to have a default system configuration for profiles,
203 and on a per user basis to over-ride this for those users who should not be subject
204 to the default configuration.
210 <title>Basics of Domain Control</title>
213 Over the years public perceptions of what Domain Control really is has taken on an
214 almost mystical nature. Before we branch into a brief overview of Domain Control
215 there are three basic types of domain controllers:
219 <title>Domain Controller Types</title>
222 <listitem><para>Primary Domain Controller</para></listitem>
223 <listitem><para>Backup Domain Controller</para></listitem>
224 <listitem><para>ADS Domain Controller</para></listitem>
228 The <emphasis>Primary Domain Controller</emphasis> or PDC plays an important role in the MS
229 Windows NT4 and Windows 200x Domain Control architecture, but not in the manner that so many
230 expect. There is folk lore that dictates that because of it's role in the MS Windows
231 network that the PDC should be the most powerful and most capable machine in the network.
232 As strange as it may seem to say this here, good over all network performance dictates that
233 the entire infrastructure needs to be balanced. It is advisable to invest more in the Backup
234 Domain Controllers and Stand-Alone (or Domain Member) servers than in the PDC.
238 In the case of MS Windows NT4 style domaines it is the PDC seeds the Domain Control database,
239 a part of the Windows registry called the SAM (Security Accounts Management). It plays a key
240 part in NT4 type domain user authentication and in synchronisation of the domain authentication
241 database with Backup Domain Controllers.
245 With MS Windows 200x Server based Active Directory domains, one domain controller seeds a potential
246 hierachy of domain controllers, each with their own area of delegated control. The master domain
247 controller has the ability to override any down-stream controller, but a down-line controller has
248 control only over it's down-line. With Samba-3 this functionality can be implemented using an
249 LDAP based user and machine account back end.
253 New to Samba-3 is the ability to use a back-end database that holds the same type of data as
254 the NT4 style SAM (Security Account Manager) database (one of the registry files).
255 The samba-3 SAM can be specified via the smb.conf file parameter
256 <emphasis>passwd backend</emphasis> and valid options include
257 <emphasis>smbpasswd, tdbsam, ldapsam, nisplussam, xmlsam, mysqlsam, plugin, guest</emphasis>.
261 The <emphasis>Backup Domain Controller</emphasis> or BDC plays a key role in servicing network
262 authentication requests. The BDC is biased to answer logon requests in preference to the PDC.
263 On a network segment that has a BDC and a PDC the BDC will be most likely to service network
264 logon requests. The PDC will answer network logon requests when the BDC is too busy (high load).
265 A BDC can be promoted to a PDC. If the PDC is on line at the time that the BDC is promoted to
266 PDC the previous PDC is automatically demoted to a BDC. With Samba-3 this is NOT an automatic
267 operation, the PDB and BDC must be manually configured and changes need to be made likewise.
271 With MS Windows NT4 it is an install time decision what type of machine the server will be.
272 It is possible to change the promote a BDC to a PDC and vica versa only, but the only way
273 to convert a domain controller to a domain member server or a stand-alone server is to
274 reinstall it. The install time choices offered are:
278 <listitem><para>Primary Domain Controller - The one that seeds the domain SAM</para></listitem>
279 <listitem><para>Backup Domain Controller - One that obtains a copy of the domain SAM</para></listitem>
280 <listitem><para>Domain Member Server - One that has NO copy of the domain SAM, rather it obtains authentication from a Domain Controller for all access controls.</para></listitem>
281 <listitem><para>Stand-Alone Server - One that plays NO part is SAM synchronisation, has it's own authentication database and plays no role in Domain security.</para></listitem>
285 With MS Windows 2000 the configuration of domain control is done after the server has been
286 installed. Samba-3 is capable of acting fully as a native member of a Windows 200x server
287 Active Directory domain.
291 New to Samba-3 is the ability to function fully as an MS Windows NT4 style Domain Controller,
292 excluding the SAM replication components. However, please be aware that Samba-3 support the
293 MS Windows 200x domain control protcols also.
297 At this time Samba-3 is capable of acting as an <emphasis>ADS Domain Controller</emphasis> but
298 in only a limited and experimental manner. This functionality should not be depended upon
299 until the samba-team offers formal support for it. At such a time, the documentation will
300 be revised to duely reflect all configuration and management requirements.
306 <title>Preparing for Domain Control</title>
309 There are two ways that MS Windows machines may interact with each other, with other servers,
310 and with Domain Controllers: Either as <emphasis>Stand-Alone</emphasis> systems, more commonly
311 called <emphasis>Workgroup</emphasis> members, or as full participants in a security system,
312 more commonly called <emphasis>Domain</emphasis> members.
316 It should be noted that <emphasis>Workgroup</emphasis> membership involve no special configuration
317 other than the machine being configured so that the network configuration has a commonly used name
318 for it's workgroup entry. It is not uncommon for the name WORKGROUP to be used for this. With this
319 mode of configuration there are NO machine trust accounts and any concept of membership as such
320 is limited to the fact that all machines appear in the network neighbourhood to be logically
321 groupped together. Again, just to be clear: WORKGROUP MODE DOES NOT INVOLVE ANY SECURITY MACHINE
326 Domain member machines have a machine account in the Domain accounts database. A special procedure
327 must be followed on each machine to affect Domain membership. This procedure, which can be done
328 only by the local machine Adminisistrator account, will create the Domain machine account (if
329 if does not exist), and then initializes that account. When the client first logs onto the
330 Domain it triggers a machine password change.
334 When running a Domain all MS Windows NT / 200x / XP Professional clients should be configured
335 as full Domain Members - IF A SECURE NETWORK IS WANTED. If the machine is NOT made a member of the
336 Domain, then it will operate like a workgroup (stand-alone) machine. Please refer to the chapter
337 on Domain Membership for information regarding HOW to make your MS Windows clients Domain members.
341 The following are necessary for configuring Samba-3 as an MS Windows NT4 style PDC for MS Windows
342 NT4 / 200x / XP clients.
347 Configuration of basic TCP/IP and MS Windows Networking
351 Correct designation of the Server Role (<emphasis>security = user</emphasis>)
355 Consistent configuration of Name Resolution (See chapter on Browsing and on
356 MS Windows network Integration)
360 Domain logons for Windows NT4 / 200x / XP Professional clients
364 Configuration of Roaming Profiles or explicit configuration to force local profile usage
368 Configuration of Network/System Policies
372 Adding and managing domain user accounts
376 Configuring MS Windows client machines to become domain members
381 The following provisions are required to serve MS Windows 9x / Me Clients:
386 Configuration of basic TCP/IP and MS Windows Networking
390 Correct designation of the Server Role (<emphasis>security = user</emphasis>)
394 Network Logon Configuration (Since Windows 9x / XP Home are not technically domain
395 members, they do not really particpate in the security aspects of Domain logons as such)
399 Roaming Profile Configuration
403 Configuration of System Policy handling
407 Installation of the Network driver "Client for MS Windows Networks" and configuration
408 to log onto the domain
412 Placing Windows 9x / Me clients in user level security - if it is desired to allow
413 all client share access to be controlled according to domain user / group identities.
417 Adding and managing domain user accounts
422 Roaming Profiles and System/Network policies are advanced network administration topics
423 that are covered separately in this document. However, these are not necessarily specific
424 to a Samba PDC as much as they are related to Windows NT networking concepts.
428 A Domain Controller is an SMB/CIFS server that:
433 Advertises and registers itself as a Domain Controller (Through NetBIOS broadcasts
434 as well as by way of name registrations either by Mailslot Broadcasts over UDP broadcast,
435 to a WINS server over UDP unicast, or via DNS and Active Directory)
439 Provides the NETLOGON service (actually a collection of services that runs over
440 a number of protocols. These include the LanMan Logon service, the Netlogon service,
441 the Local Security Account service, and variations of them)
445 Provides a share called NETLOGON
450 For samba to provide these is rather easy to configure. Each Samba Domain Controller must provide
451 the NETLOGON service which samba calls the <emphasis>domain logons</emphasis> functionality
452 (after the name of the parameter in the &smb.conf; file). Additionally, one (1) server in a Samba-3
453 Domain must advertise itself as the domain master browser. This causes the Primary Domain Controller
454 to claim domain specific NetBIOS name that identifies it as a domain master browser for its given
455 domain/workgroup. Local master browsers in the same domain/workgroup on broadcast-isolated subnets
456 then ask for a complete copy of the browse list for the whole wide area network. Browser clients
457 will then contact their local master browser, and will receive the domain-wide browse list,
458 instead of just the list for their broadcast-isolated subnet.
465 <title>Domain Control - Example Configuration</title>
468 The first step in creating a working Samba PDC is to understand the parameters necessary
469 in &smb.conf;. Here we attempt to explain the parameters that are covered in
470 the &smb.conf; man page.
474 Here is an example &smb.conf; for acting as a PDC:
477 <para><programlisting>
479 ; Basic server settings
480 <ulink url="smb.conf.5.html#NETBIOSNAME">netbios name</ulink> = <replaceable>POGO</replaceable>
481 <ulink url="smb.conf.5.html#WORKGROUP">workgroup</ulink> = <replaceable>NARNIA</replaceable>
483 ; User and Machine Account Backends
484 ; Choices are: tdbsam, smbpasswd, ldapsam, mysqlsam, xmlsam, guest
485 <ulink url="smb.conf.5.html#PASSDBBACKEND">passdb backend</ulink> = ldapsam, guest
487 ; we should act as the domain and local master browser
488 <ulink url="smb.conf.5.html#OSLEVEL">os level</ulink> = 64
489 <ulink url="smb.conf.5.html#PERFERREDMASTER">preferred master</ulink> = yes
490 <ulink url="smb.conf.5.html#DOMAINMASTER">domain master</ulink> = yes
491 <ulink url="smb.conf.5.html#LOCALMASTER">local master</ulink> = yes
493 ; security settings (must user security = user)
494 <ulink url="smb.conf.5.html#SECURITYEQUALSUSER">security</ulink> = user
496 ; encrypted passwords are a requirement for a PDC
497 <ulink url="smb.conf.5.html#ENCRYPTPASSWORDS">encrypt passwords</ulink> = yes
499 ; support domain logons
500 <ulink url="smb.conf.5.html#DOMAINLOGONS">domain logons</ulink> = yes
502 ; where to store user profiles?
503 <ulink url="smb.conf.5.html#LOGONPATH">logon path</ulink> = \\%N\profiles\%u
505 ; where is a user's home directory and where should it be mounted at?
506 <ulink url="smb.conf.5.html#LOGONDRIVE">logon drive</ulink> = H:
507 <ulink url="smb.conf.5.html#LOGONHOME">logon home</ulink> = \\homeserver\%u\winprofile
509 ; specify a generic logon script for all users
510 ; this is a relative **DOS** path to the [netlogon] share
511 <ulink url="smb.conf.5.html#LOGONSCRIPT">logon script</ulink> = logon.cmd
513 ; necessary share for domain controller
515 <ulink url="smb.conf.5.html#PATH">path</ulink> = /usr/local/samba/lib/netlogon
516 <ulink url="smb.conf.5.html#READONLY">read only</ulink> = yes
517 <ulink url="smb.conf.5.html#WRITELIST">write list</ulink> = <replaceable>ntadmin</replaceable>
519 ; share for storing user profiles
521 <ulink url="smb.conf.5.html#PATH">path</ulink> = /export/smb/ntprofile
522 <ulink url="smb.conf.5.html#READONLY">read only</ulink> = no
523 <ulink url="smb.conf.5.html#CREATEMASK">create mask</ulink> = 0600
524 <ulink url="smb.conf.5.html#DIRECTORYMASK">directory mask</ulink> = 0700
525 </programlisting></para>
528 The above parameters make for a full set of parameters that may define the server's mode
529 of operation. The following parameters are the essentials alone:
538 The additional parameters shown in the longer listing above just makes for a
539 more complete environment.
543 There are a couple of points to emphasize in the above configuration.
548 Encrypted passwords must be enabled. For more details on how
549 to do this, refer to <link linkend="passdb">the User Database chapter</link>.
553 The server must support domain logons and have a
554 <filename>[netlogon]</filename> share
558 The server must be the domain master browser in order for Windows
559 client to locate the server as a DC. Please refer to the various
560 Network Browsing documentation included with this distribution for
568 <title>Samba ADS Domain Control</title>
571 Samba-3 can behave and appear to MS Windows 200x and XP clients as an Active Directory Server.
572 The problem with doing this is that samba-3 is NOT an Active Directory server and does NOT yet
573 support all protocols needed to make this a possibility.
579 <title>Domain and Network Logon Configuration</title>
582 The subject of Network or Domain Logons is discussed here because it rightly forms
583 an integral part of the essential functionality that is provided by a Domain Controller.
587 <title>Domain Network Logon Service</title>
590 All Domain Controllers must run the netlogon service (<emphasis>domain logons</emphasis>
591 in Samba. One Domain Controller must be configured with <emphasis>domain master = Yes</emphasis>
592 (the Primary Domain Controller), on ALL Backup Domain Controllers <emphasis>domain master = No</emphasis>
597 <title>Example Configuration</title>
600 <title> A minimal configuration to support Domain Logons</title>
604 domain master = (Yes on PDC, No on BDCs)
607 comment = Network Logon Service
608 path = /var/lib/samba/netlogon
616 <title>The Special Case of MS Windows XP Home Edition</title>
619 MS Windows XP Home Edition does not have the ability to join any type of Domain
620 security facility. Unlike, MS Windows 9x / Me, MS Windows XP Home Edition also completely
621 lacks the ability to log onto a network.
625 To be completely clear: If you want MS Windows XP Home Edition to integrate with your
626 MS Windows NT4 or Active Directory Domain security understand - IT CAN NOT BE DONE.
627 Your only choice is to buy the upgrade pack from MS Windows XP Home Edition to
628 MS Windows XP Professional.
632 Now that this has been said, please do NOT ask the mailing list, or email any of the
633 Samba-Team members with your questions asking how to make this work. It can't be done.
639 <title>The Special Case of Windows 9x / Me</title>
642 A domain and a workgroup are exactly the same thing in terms of network
643 browsing. The difference is that a distributable authentication
644 database is associated with a domain, for secure login access to a
645 network. Also, different access rights can be granted to users if they
646 successfully authenticate against a domain logon server. Samba-3 does this
647 now in the same way that MS Windows NT/2K.
651 The SMB client logging on to a domain has an expectation that every other
652 server in the domain should accept the same authentication information.
653 Network browsing functionality of domains and workgroups is identical and
654 is explained in this documentation under the browsing discussions.
655 It should be noted, that browsing is totally orthogonal to logon support.
659 Issues related to the single-logon network model are discussed in this
660 section. Samba supports domain logons, network logon scripts, and user
661 profiles for MS Windows for workgroups and MS Windows 9X/ME clients
662 which are the focus of this section.
666 When an SMB client in a domain wishes to logon it broadcast requests for a
667 logon server. The first one to reply gets the job, and validates its
668 password using whatever mechanism the Samba administrator has installed.
669 It is possible (but very stupid) to create a domain where the user
670 database is not shared between servers, i.e. they are effectively workgroup
671 servers advertising themselves as participating in a domain. This
672 demonstrates how authentication is quite different from but closely
673 involved with domains.
677 Using these features you can make your clients verify their logon via
678 the Samba server; make clients run a batch file when they logon to
679 the network and download their preferences, desktop and start menu.
683 MS Windows XP Home edition is NOT able to join a domain and does not permit
684 the use of domain logons.
688 Before launching into the configuration instructions, it is
689 worthwhile to look at how a Windows 9x/ME client performs a logon:
695 The client broadcasts (to the IP broadcast address of the subnet it is in)
696 a NetLogon request. This is sent to the NetBIOS name DOMAIN<#1c> at the
697 NetBIOS layer. The client chooses the first response it receives, which
698 contains the NetBIOS name of the logon server to use in the format of
705 The client then connects to that server, logs on (does an SMBsessetupX) and
706 then connects to the IPC$ share (using an SMBtconX).
712 The client then does a NetWkstaUserLogon request, which retrieves the name
713 of the user's logon script.
719 The client then connects to the NetLogon share and searches for this
720 and if it is found and can be read, is retrieved and executed by the client.
721 After this, the client disconnects from the NetLogon share.
727 The client then sends a NetUserGetInfo request to the server, to retrieve
728 the user's home share, which is used to search for profiles. Since the
729 response to the NetUserGetInfo request does not contain much more then
730 the user's home share, profiles for Win9X clients MUST reside in the user
737 The client then connects to the user's home share and searches for the
738 user's profile. As it turns out, you can specify the user's home share as
739 a sharename and path. For example, \\server\fred\.winprofile.
740 If the profiles are found, they are implemented.
746 The client then disconnects from the user's home share, and reconnects to
747 the NetLogon share and looks for CONFIG.POL, the policies file. If this is
748 found, it is read and implemented.
754 The main difference between a PDC and a Windows 9x logon server configuration is that
759 Password encryption is not required for a Windows 9x logon server. But note
760 that beginning with MS Windows 98 the default setting is that plain-text
761 password support has been disabled. It can be re-enabled with the registry
762 changes that are documented in the chapter on Policies.
766 Windows 9x/ME clients do not require and do not use machine trust accounts.
771 A Samba PDC will act as a Windows 9x logon server, after all it does provide the
772 network logon services that MS Windows 9x / Me expect to find.
779 <title>Security Mode and Master Browsers</title>
782 There are a few comments to make in order to tie up some
783 loose ends. There has been much debate over the issue of whether
784 or not it is ok to configure Samba as a Domain Controller in security
785 modes other than <constant>USER</constant>. The only security mode
786 which will not work due to technical reasons is <constant>SHARE</constant>
787 mode security. <constant>DOMAIN</constant> and <constant>SERVER</constant>
788 mode security are really just a variation on SMB user level security.
792 Actually, this issue is also closely tied to the debate on whether
793 or not Samba must be the domain master browser for its workgroup
794 when operating as a DC. While it may technically be possible
795 to configure a server as such (after all, browsing and domain logons
796 are two distinctly different functions), it is not a good idea to do
797 so. You should remember that the DC must register the DOMAIN<#1b> NetBIOS
798 name. This is the name used by Windows clients to locate the DC.
799 Windows clients do not distinguish between the DC and the DMB.
800 For this reason, it is very wise to configure the Samba DC as the DMB.
804 Now back to the issue of configuring a Samba DC to use a mode other
805 than <emphasis>security = user</emphasis>. If a Samba host is configured to use
806 another SMB server or DC in order to validate user connection
807 requests, then it is a fact that some other machine on the network
808 (the <emphasis>password server</emphasis>) knows more about the user than the Samba host.
809 99% of the time, this other host is a domain controller. Now
810 in order to operate in domain mode security, the <emphasis>workgroup</emphasis> parameter
811 must be set to the name of the Windows NT domain (which already
812 has a domain controller). If the domain does NOT already have a Domain Controller
813 then you do not yet have a Domain!
817 Configuring a Samba box as a DC for a domain that already by definition has a
818 PDC is asking for trouble. Therefore, you should always configure the Samba DC
819 to be the DMB for its domain and set <emphasis>security = user</emphasis>.
820 This is the only officially supported mode of operation.
828 <title>Common Problems and Errors</title>
831 <title>I cannot include a '$' in a machine name</title>
833 A 'machine name' in (typically) <filename>/etc/passwd</filename>
834 of the machine name with a '$' appended. FreeBSD (and other BSD
835 systems?) won't create a user with a '$' in their name.
839 The problem is only in the program used to make the entry. Once made, it works perfectly.
840 Create a user without the '$' using <command>vipw</command> to edit the entry, adding
841 the '$'. Or create the whole entry with vipw if you like, make sure you use a unique User ID!
846 <title>I get told "You already have a connection to the Domain...."
847 or "Cannot join domain, the credentials supplied conflict with an
848 existing set.." when creating a machine trust account.</title>
851 This happens if you try to create a machine trust account from the
852 machine itself and already have a connection (e.g. mapped drive)
853 to a share (or IPC$) on the Samba PDC. The following command
854 will remove all network drive connections:
858 <prompt>C:\WINNT\></prompt> <command>net use * /d</command>
862 Further, if the machine is already a 'member of a workgroup' that
863 is the same name as the domain you are joining (bad idea) you will
864 get this message. Change the workgroup name to something else, it
865 does not matter what, reboot, and try again.
870 <title>The system can not log you on (C000019B)....</title>
872 <para>I joined the domain successfully but after upgrading
873 to a newer version of the Samba code I get the message, "The system
874 can not log you on (C000019B), Please try again or consult your
875 system administrator" when attempting to logon.
879 This occurs when the domain SID stored in the secrets.tdb database
880 is changed. The most common cause of a change in domain SID is when
881 the domain name and/or the server name (netbios name) is changed.
882 The only way to correct the problem is to restore the original domain
883 SID or remove the domain client from the domain and rejoin. The domain
884 SID may be reset using either the net or rpcclient utilities.
888 The reset or change the domain SID you can use the net command as follows:
891 net getlocalsid 'OLDNAME'
892 net setlocalsid 'SID'
899 <title>The machine trust account for this computer either does not
900 exist or is not accessible.</title>
903 When I try to join the domain I get the message "The machine account
904 for this computer either does not exist or is not accessible". What's
909 This problem is caused by the PDC not having a suitable machine trust account.
910 If you are using the <parameter>add machine script</parameter> method to create
911 accounts then this would indicate that it has not worked. Ensure the domain
912 admin user system is working.
916 Alternatively if you are creating account entries manually then they
917 have not been created correctly. Make sure that you have the entry
918 correct for the machine trust account in smbpasswd file on the Samba PDC.
919 If you added the account using an editor rather than using the smbpasswd
920 utility, make sure that the account name is the machine NetBIOS name
921 with a '$' appended to it ( i.e. computer_name$ ). There must be an entry
922 in both /etc/passwd and the smbpasswd file. Some people have reported
923 that inconsistent subnet masks between the Samba server and the NT
924 client have caused this problem. Make sure that these are consistent
925 for both client and server.
930 <title>When I attempt to login to a Samba Domain from a NT4/W2K workstation,
931 I get a message about my account being disabled.</title>
934 At first be ensure to enable the useraccounts with <command>smbpasswd -e
935 %user%</command>, this is normally done, when you create an account.