Rebuild docs
[Samba/gebeck_regimport.git] / docs / htmldocs / samba-pdc.html
blob951dd2ea96d01dc9771a22afcbcfe5aedec852a4
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5
3 Samba as an NT4 or Win2k Primary Domain Controller
4 </title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="type.html" title="Part II. Server Configuration Basics"><link rel="previous" href="securitylevels.html" title="Chapter 4. Samba as Stand-Alone Server"><link rel="next" href="samba-bdc.html" title="Chapter 6. 
5 Samba Backup Domain Controller to Samba Domain Control
6 "></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
7 Samba as an NT4 or Win2k Primary Domain Controller
8 </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="securitylevels.html">Prev</a> </td><th width="60%" align="center">Part II. Server Configuration Basics</th><td width="20%" align="right"> <a accesskey="n" href="samba-bdc.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><h2 class="title"><a name="samba-pdc"></a>Chapter 5
9 Samba as an NT4 or Win2k Primary Domain Controller
10 </h2></div><div><div class="author"><h3 class="author">Gerald (Jerry) Carter</h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt>&lt;<a href="mailto:jerry@samba.org">jerry@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author">John H. Terpstra</h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt>&lt;<a href="mailto:jht@samba.org">jht@samba.org</a>&gt;</tt></p></div></div></div></div><div><div class="author"><h3 class="author">David Bannon</h3><div class="affiliation"><span class="orgname">Samba Team<br></span><div class="address"><p><tt>&lt;<a href="mailto:dbannon@samba.org">dbannon@samba.org</a>&gt;</tt></p></div></div></div></div><div><p class="pubdate"> (26 Apr 2001) </p></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="samba-pdc.html#id2807495">Prerequisite Reading</a></dt><dt><a href="samba-pdc.html#id2807518">
11 Background
12 </a></dt><dt><a href="samba-pdc.html#id2877458">Configuring the Samba Domain Controller</a></dt><dt><a href="samba-pdc.html#id2877759">Creating Machine Trust Accounts and Joining Clients to the Domain</a></dt><dd><dl><dt><a href="samba-pdc.html#id2878028">Manual Creation of Machine Trust Accounts</a></dt><dt><a href="samba-pdc.html#id2878262">&quot;On-the-Fly&quot; Creation of Machine Trust Accounts</a></dt><dt><a href="samba-pdc.html#id2878318">Joining the Client to the Domain</a></dt></dl></dd><dt><a href="samba-pdc.html#id2878425">Common Problems and Errors</a></dt><dd><dl><dt><a href="samba-pdc.html#id2878432">I cannot include a '$' in a machine name</a></dt><dt><a href="samba-pdc.html#id2878470">I get told &quot;You already have a connection to the Domain....&quot;
13 or &quot;Cannot join domain, the credentials supplied conflict with an
14 existing set..&quot; when creating a machine trust account.</a></dt><dt><a href="samba-pdc.html#id2878517">The system can not log you on (C000019B)....</a></dt><dt><a href="samba-pdc.html#id2878568">The machine trust account for this computer either does not
15 exist or is not accessible.</a></dt><dt><a href="samba-pdc.html#id2878617">When I attempt to login to a Samba Domain from a NT4/W2K workstation,
16 I get a message about my account being disabled.</a></dt></dl></dd><dt><a href="samba-pdc.html#id2878642">Domain Control for Windows 9x/ME</a></dt><dd><dl><dt><a href="samba-pdc.html#id2878805">Configuration Instructions: Network Logons</a></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2807495"></a>Prerequisite Reading</h2></div></div><p>
17 Before you continue reading in this chapter, please make sure
18 that you are comfortable with configuring basic files services
19 in smb.conf and how to enable and administer password
20 encryption in Samba. Theses two topics are covered in the
21 <tt>smb.conf</tt> manpage.
22 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2807518"></a>
23 Background
24 </h2></div></div><p>
25 This article outlines the steps necessary for configuring Samba as a PDC.
26 It is necessary to have a working Samba server prior to implementing the
27 PDC functionality.
28 </p><div class="itemizedlist"><ul type="disc"><li><p>
29 Domain logons for Windows NT 4.0 / 200x / XP Professional clients.
30 </p></li><li><p>
31 Placing Windows 9x / Me clients in user level security
32 </p></li><li><p>
33 Retrieving a list of users and groups from a Samba PDC to
34 Windows 9x / Me / NT / 200x / XP Professional clients
35 </p></li><li><p>
36 Roaming Profiles
37 </p></li><li><p>
38 Network/System Policies
39 </p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
40 Roaming Profiles and System/Network policies are advanced network administration topics
41 that are covered separately in this document.
42 </p></div><p>
43 The following functionalities are new to the Samba 3.0 release:
44 </p><div class="itemizedlist"><ul type="disc"><li><p>
45 Windows NT 4 domain trusts
46 </p></li><li><p>
47 Adding users via the User Manager for Domains
48 </p></li></ul></div><p>
49 The following functionalities are NOT provided by Samba 3.0:
50 </p><div class="itemizedlist"><ul type="disc"><li><p>
51 SAM replication with Windows NT 4.0 Domain Controllers
52 (i.e. a Samba PDC and a Windows NT BDC or vice versa)
53 </p></li><li><p>
54 Acting as a Windows 2000 Domain Controller (i.e. Kerberos and
55 Active Directory)
56 </p></li></ul></div><p>
57 Please note that Windows 9x / Me / XP Home clients are not true members of a domain
58 for reasons outlined in this article. Therefore the protocol for
59 support of Windows 9x-style domain logons is completely different
60 from NT4 / Win2k type domain logons and has been officially supported for some
61 time.
62 </p><p><span class="emphasis"><em>
63 MS Windows XP Home edition is NOT able to join a domain and does not permit
64 the use of domain logons.</em></span>
65 </p><p>
66 Implementing a Samba PDC can basically be divided into 3 broad
67 steps.
68 </p><div class="orderedlist"><ol type="1"><li><p>
69 Configuring the Samba PDC
70 </p></li><li><p>
71 Creating machine trust accounts and joining clients to the domain
72 </p></li><li><p>
73 Adding and managing domain user accounts
74 </p></li></ol></div><p>
75 There are other minor details such as user profiles, system
76 policies, etc... However, these are not necessarily specific
77 to a Samba PDC as much as they are related to Windows NT networking
78 concepts.
79 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2877458"></a>Configuring the Samba Domain Controller</h2></div></div><p>
80 The first step in creating a working Samba PDC is to
81 understand the parameters necessary in smb.conf. Here we
82 attempt to explain the parameters that are covered in
83 the <tt>smb.conf</tt> man page.
84 </p><p>
85 Here is an example <tt>smb.conf</tt> for acting as a PDC:
86 </p><pre class="programlisting">
87 [global]
88 ; Basic server settings
89 <a href="smb.conf.5.html#NETBIOSNAME" target="_top">netbios name</a> = <i><tt>POGO</tt></i>
90 <a href="smb.conf.5.html#WORKGROUP" target="_top">workgroup</a> = <i><tt>NARNIA</tt></i>
92 ; User and Machine Account Backends
93 ; Choices are: tdbsam, tdbsam_nua, smbpasswd, smbpasswd_nua, ldapsam, ldapsam_nua, ...
94 ; mysqlsam, xmlsam, guest
95 <a href="smb.conf.5.html#PASSDBBACKEND" target="_top">passdb backend</a> = ldapsam, guest
97 ; we should act as the domain and local master browser
98 <a href="smb.conf.5.html#OSLEVEL" target="_top">os level</a> = 64
99 <a href="smb.conf.5.html#PERFERREDMASTER" target="_top">preferred master</a> = yes
100 <a href="smb.conf.5.html#DOMAINMASTER" target="_top">domain master</a> = yes
101 <a href="smb.conf.5.html#LOCALMASTER" target="_top">local master</a> = yes
103 ; security settings (must user security = user)
104 <a href="smb.conf.5.html#SECURITYEQUALSUSER" target="_top">security</a> = user
106 ; encrypted passwords are a requirement for a PDC
107 <a href="smb.conf.5.html#ENCRYPTPASSWORDS" target="_top">encrypt passwords</a> = yes
109 ; support domain logons
110 <a href="smb.conf.5.html#DOMAINLOGONS" target="_top">domain logons</a> = yes
112 ; where to store user profiles?
113 <a href="smb.conf.5.html#LOGONPATH" target="_top">logon path</a> = \\%N\profiles\%u
115 ; where is a user's home directory and where should it be mounted at?
116 <a href="smb.conf.5.html#LOGONDRIVE" target="_top">logon drive</a> = H:
117 <a href="smb.conf.5.html#LOGONHOME" target="_top">logon home</a> = \\homeserver\%u
119 ; specify a generic logon script for all users
120 ; this is a relative **DOS** path to the [netlogon] share
121 <a href="smb.conf.5.html#LOGONSCRIPT" target="_top">logon script</a> = logon.cmd
123 ; necessary share for domain controller
124 [netlogon]
125 <a href="smb.conf.5.html#PATH" target="_top">path</a> = /usr/local/samba/lib/netlogon
126 <a href="smb.conf.5.html#READONLY" target="_top">read only</a> = yes
127 <a href="smb.conf.5.html#WRITELIST" target="_top">write list</a> = <i><tt>ntadmin</tt></i>
129 ; share for storing user profiles
130 [profiles]
131 <a href="smb.conf.5.html#PATH" target="_top">path</a> = /export/smb/ntprofile
132 <a href="smb.conf.5.html#READONLY" target="_top">read only</a> = no
133 <a href="smb.conf.5.html#CREATEMASK" target="_top">create mask</a> = 0600
134 <a href="smb.conf.5.html#DIRECTORYMASK" target="_top">directory mask</a> = 0700
135 </pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
136 The above parameters make for a full set of parameters that may define the server's mode
137 of operation. The following parameters are the essentials alone:
139 </p><pre class="programlisting">
140 workgroup = NARNIA
141 domain logons = Yes
142 security = User
143 </pre><p>
145 The additional parameters shown in the longer listing above just makes for a
146 more complete environment.
147 </p></div><p>
148 There are a couple of points to emphasize in the above configuration.
149 </p><div class="itemizedlist"><ul type="disc"><li><p>
150 Encrypted passwords must be enabled. For more details on how
151 to do this, refer to <a href="passdb.html" title="Chapter 10. User information database">the User Database chapter</a>.
152 </p></li><li><p>
153 The server must support domain logons and a
154 <tt>[netlogon]</tt> share
155 </p></li><li><p>
156 The server must be the domain master browser in order for Windows
157 client to locate the server as a DC. Please refer to the various
158 Network Browsing documentation included with this distribution for
159 details.
160 </p></li></ul></div><p>
161 Samba 3.0 offers a complete implementation of group mapping
162 between Windows NT groups and Unix groups (this is really quite
163 complicated to explain in a short space).
164 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2877759"></a>Creating Machine Trust Accounts and Joining Clients to the Domain</h2></div></div><p>
165 A machine trust account is a Samba account that is used to
166 authenticate a client machine (rather than a user) to the Samba
167 server. In Windows terminology, this is known as a &quot;Computer
168 Account.&quot;</p><p>
169 The password of a machine trust account acts as the shared secret for
170 secure communication with the Domain Controller. This is a security
171 feature to prevent an unauthorized machine with the same NetBIOS name
172 from joining the domain and gaining access to domain user/group
173 accounts. Windows NT, 200x, XP Professional clients use machine trust
174 accounts, but Windows 9x / Me / XP Home clients do not. Hence, a
175 Windows 9x / Me / XP Home client is never a true member of a domain
176 because it does not possess a machine trust account, and thus has no
177 shared secret with the domain controller.
178 </p><p>A Windows PDC stores each machine trust account in the Windows
179 Registry. A Samba-3 PDC also has to store machine trust account information
180 in a suitable backend data store. With Samba-3 there can be multiple back-ends
181 for this including:
182 </p><div class="itemizedlist"><ul type="disc"><li><p>
183 <span class="emphasis"><em>smbpasswd</em></span> - the plain ascii file stored used by
184 earlier versions of Samba. This file configuration option requires
185 a Unix/Linux system account for EVERY entry (ie: both for user and for
186 machine accounts). This file will be located in the <span class="emphasis"><em>private</em></span>
187 directory (default is /usr/local/samba/lib/private or on linux /etc/samba).
188 </p></li><li><p>
189 <span class="emphasis"><em>smbpasswd_nua</em></span> - This file is independant of the
190 system wide user accounts. The use of this back-end option requires
191 specification of the &quot;non unix account range&quot; option also. It is called
192 smbpasswd and will be located in the <tt>private</tt> directory.
193 </p></li><li><p>
194 <span class="emphasis"><em>tdbsam</em></span> - a binary database backend that will be
195 stored in the <span class="emphasis"><em>private</em></span> directory in a file called
196 <span class="emphasis"><em>passwd.tdb</em></span>. The key benefit of this binary format
197 file is that it can store binary objects that can not be accomodated
198 in the traditional plain text smbpasswd file.
199 </p></li><li><p>
200 <span class="emphasis"><em>tdbsam_nua</em></span> like the smbpasswd_nua option above, this
201 file allows the creation of arbitrary user and machine accounts without
202 requiring that account to be added to the system (/etc/passwd) file. It
203 too requires the specification of the &quot;non unix account range&quot; option
204 in the [globals] section of the <tt>smb.conf</tt> file.
205 </p></li><li><p>
206 <span class="emphasis"><em>ldapsam</em></span> - An LDAP based back-end. Permits the
207 LDAP server to be specified. eg: ldap://localhost or ldap://frodo.murphy.com
208 </p></li><li><p>
209 <span class="emphasis"><em>ldapsam_nua</em></span> - LDAP based back-end with no unix
210 account requirement, like smbpasswd_nua and tdbsam_nua above.
211 </p></li></ul></div><p>Read the chapter about the <a href="passdb.html" title="Chapter 10. User information database">User Database</a>
212 for details.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
213 The new tdbsam and ldapsam account backends store vastly more information than
214 smbpasswd is capable of. The new backend database includes capacity to specify
215 per user settings for many parameters, over-riding global settings given in the
216 <tt>smb.conf</tt> file. eg: logon drive, logon home, logon path, etc.
217 </p></div><p>
218 A Samba PDC, however, stores each machine trust account in two parts,
219 as follows:
221 </p><div class="itemizedlist"><ul type="disc"><li><p>A Samba account, stored in the same location as user
222 LanMan and NT password hashes (currently
223 <tt>smbpasswd</tt>). The Samba account
224 possesses and uses only the NT password hash.</p></li><li><p>A corresponding Unix account, typically stored in
225 <tt>/etc/passwd</tt>. (Future releases will alleviate the need to
226 create <tt>/etc/passwd</tt> entries.) </p></li></ul></div><p>
227 </p><p>
228 There are two ways to create machine trust accounts:
229 </p><div class="itemizedlist"><ul type="disc"><li><p> Manual creation. Both the Samba and corresponding
230 Unix account are created by hand.</p></li><li><p> &quot;On-the-fly&quot; creation. The Samba machine trust
231 account is automatically created by Samba at the time the client
232 is joined to the domain. (For security, this is the
233 recommended method.) The corresponding Unix account may be
234 created automatically or manually. </p></li></ul></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878028"></a>Manual Creation of Machine Trust Accounts</h3></div></div><p>
235 The first step in manually creating a machine trust account is to
236 manually create the corresponding Unix account in
237 <tt>/etc/passwd</tt>. This can be done using
238 <b>vipw</b> or other 'add user' command that is normally
239 used to create new Unix accounts. The following is an example for a
240 Linux based Samba server:
241 </p><p>
242 <tt>root# </tt><b>/usr/sbin/useradd -g 100 -d /dev/null -c <i><tt>&quot;machine
243 nickname&quot;</tt></i> -s /bin/false <i><tt>machine_name</tt></i>$ </b>
244 </p><p>
245 <tt>root# </tt><b>passwd -l <i><tt>machine_name</tt></i>$</b>
246 </p><p>On *BSD systems, this can be done using the 'chpass' utility:</p><p>
247 <tt>root# </tt><b>chpass -a &quot;<i><tt>machine_name</tt></i>$:*:101:100::0:0:Workstation <i><tt>machine_name</tt></i>:/dev/null:/sbin/nologin&quot;</b>
248 </p><p>
249 The <tt>/etc/passwd</tt> entry will list the machine name
250 with a &quot;$&quot; appended, won't have a password, will have a null shell and no
251 home directory. For example a machine named 'doppy' would have an
252 <tt>/etc/passwd</tt> entry like this:
253 </p><pre class="programlisting">
254 doppy$:x:505:501:<i><tt>machine_nickname</tt></i>:/dev/null:/bin/false
255 </pre><p>
256 Above, <i><tt>machine_nickname</tt></i> can be any
257 descriptive name for the client, i.e., BasementComputer.
258 <i><tt>machine_name</tt></i> absolutely must be the NetBIOS
259 name of the client to be joined to the domain. The &quot;$&quot; must be
260 appended to the NetBIOS name of the client or Samba will not recognize
261 this as a machine trust account.
262 </p><p>
263 Now that the corresponding Unix account has been created, the next step is to create
264 the Samba account for the client containing the well-known initial
265 machine trust account password. This can be done using the <a href="smbpasswd.8.html" target="_top"><b>smbpasswd(8)</b></a> command
266 as shown here:
267 </p><p>
268 <tt>root# </tt><b><tt>smbpasswd -a -m <i><tt>machine_name</tt></i></tt></b>
269 </p><p>
270 where <i><tt>machine_name</tt></i> is the machine's NetBIOS
271 name. The RID of the new machine account is generated from the UID of
272 the corresponding Unix account.
273 </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Join the client to the domain immediately</h3><p>
274 Manually creating a machine trust account using this method is the
275 equivalent of creating a machine trust account on a Windows NT PDC using
276 the &quot;Server Manager&quot;. From the time at which the account is created
277 to the time which the client joins the domain and changes the password,
278 your domain is vulnerable to an intruder joining your domain using
279 a machine with the same NetBIOS name. A PDC inherently trusts
280 members of the domain and will serve out a large degree of user
281 information to such clients. You have been warned!
282 </p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878262"></a>&quot;On-the-Fly&quot; Creation of Machine Trust Accounts</h3></div></div><p>
283 The second (and recommended) way of creating machine trust accounts is
284 simply to allow the Samba server to create them as needed when the client
285 is joined to the domain. </p><p>Since each Samba machine trust account requires a corresponding
286 Unix account, a method for automatically creating the
287 Unix account is usually supplied; this requires configuration of the
288 <a href="smb.conf.5.html#ADDUSERSCRIPT" target="_top">add user script</a>
289 option in <tt>smb.conf</tt>. This
290 method is not required, however; corresponding Unix accounts may also
291 be created manually.
292 </p><p>Below is an example for a RedHat 6.2 Linux system.
293 </p><pre class="programlisting">
294 [global]
295 # &lt;...remainder of parameters...&gt;
296 add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
297 </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878318"></a>Joining the Client to the Domain</h3></div></div><p>
298 The procedure for joining a client to the domain varies with the
299 version of Windows.
300 </p><div class="itemizedlist"><ul type="disc"><li><p><span class="emphasis"><em>Windows 2000</em></span></p><p>
301 When the user elects to join the client to a domain, Windows prompts for
302 an account and password that is privileged to join the domain. A Samba administrative
303 account (i.e., a Samba account that has root privileges on the Samba server) must be
304 entered here; the operation will fail if an ordinary user account is given.
305 The password for this account should be set to a different password than the associated
306 <tt>/etc/passwd</tt> entry, for security reasons.
307 </p><p>
308 The session key of the Samba administrative account acts as an
309 encryption key for setting the password of the machine trust
310 account. The machine trust account will be created on-the-fly, or
311 updated if it already exists.
312 </p></li><li><p><span class="emphasis"><em>Windows NT</em></span></p><p> If the machine trust account was created manually, on the
313 Identification Changes menu enter the domain name, but do not
314 check the box &quot;Create a Computer Account in the Domain.&quot; In this case,
315 the existing machine trust account is used to join the machine to
316 the domain.</p><p> If the machine trust account is to be created
317 on-the-fly, on the Identification Changes menu enter the domain
318 name, and check the box &quot;Create a Computer Account in the Domain.&quot; In
319 this case, joining the domain proceeds as above for Windows 2000
320 (i.e., you must supply a Samba administrative account when
321 prompted).</p></li><li><p><span class="emphasis"><em>Samba</em></span></p><p>Joining a samba client to a domain is documented in
322 the <a href="domain-member.html" title="Chapter 8. Samba as a NT4 or Win2k domain member">Domain Member</a> chapter.
323 </p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2878425"></a>Common Problems and Errors</h2></div></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878432"></a>I cannot include a '$' in a machine name</h3></div></div><p>
324 A 'machine name' in (typically) <tt>/etc/passwd</tt>
325 of the machine name with a '$' appended. FreeBSD (and other BSD
326 systems?) won't create a user with a '$' in their name.
327 </p><p>
328 The problem is only in the program used to make the entry. Once made, it works perfectly.
329 Create a user without the '$' using <b>vipw</b> to edit the entry, adding
330 the '$'. Or create the whole entry with vipw if you like, make sure you use a unique User ID!
331 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878470"></a>I get told &quot;You already have a connection to the Domain....&quot;
332 or &quot;Cannot join domain, the credentials supplied conflict with an
333 existing set..&quot; when creating a machine trust account.</h3></div></div><p>
334 This happens if you try to create a machine trust account from the
335 machine itself and already have a connection (e.g. mapped drive)
336 to a share (or IPC$) on the Samba PDC. The following command
337 will remove all network drive connections:
338 </p><p>
339 <tt>C:\WINNT\&gt;</tt> <b>net use * /d</b>
340 </p><p>
341 Further, if the machine is already a 'member of a workgroup' that
342 is the same name as the domain you are joining (bad idea) you will
343 get this message. Change the workgroup name to something else, it
344 does not matter what, reboot, and try again.
345 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878517"></a>The system can not log you on (C000019B)....</h3></div></div><p>I joined the domain successfully but after upgrading
346 to a newer version of the Samba code I get the message, &quot;The system
347 can not log you on (C000019B), Please try again or consult your
348 system administrator&quot; when attempting to logon.
349 </p><p>
350 This occurs when the domain SID stored in the secrets.tdb database
351 is changed. The most common cause of a change in domain SID is when
352 the domain name and/or the server name (netbios name) is changed.
353 The only way to correct the problem is to restore the original domain
354 SID or remove the domain client from the domain and rejoin. The domain
355 SID may be reset using either the net or rpcclient utilities.
356 </p><p>
357 The reset or change the domain SID you can use the net command as follows:
359 </p><pre class="programlisting">
360 net getlocalsid 'OLDNAME'
361 net setlocalsid 'SID'
362 </pre><p>
363 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878568"></a>The machine trust account for this computer either does not
364 exist or is not accessible.</h3></div></div><p>
365 When I try to join the domain I get the message &quot;The machine account
366 for this computer either does not exist or is not accessible&quot;. What's
367 wrong?
368 </p><p>
369 This problem is caused by the PDC not having a suitable machine trust account.
370 If you are using the <i><tt>add user script</tt></i> method to create
371 accounts then this would indicate that it has not worked. Ensure the domain
372 admin user system is working.
373 </p><p>
374 Alternatively if you are creating account entries manually then they
375 have not been created correctly. Make sure that you have the entry
376 correct for the machine trust account in smbpasswd file on the Samba PDC.
377 If you added the account using an editor rather than using the smbpasswd
378 utility, make sure that the account name is the machine NetBIOS name
379 with a '$' appended to it ( i.e. computer_name$ ). There must be an entry
380 in both /etc/passwd and the smbpasswd file. Some people have reported
381 that inconsistent subnet masks between the Samba server and the NT
382 client have caused this problem. Make sure that these are consistent
383 for both client and server.
384 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878617"></a>When I attempt to login to a Samba Domain from a NT4/W2K workstation,
385 I get a message about my account being disabled.</h3></div></div><p>
386 At first be ensure to enable the useraccounts with <b>smbpasswd -e
387 %user%</b>, this is normally done, when you create an account.
388 </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2878642"></a>Domain Control for Windows 9x/ME</h2></div></div><p>
389 A domain and a workgroup are exactly the same thing in terms of network
390 browsing. The difference is that a distributable authentication
391 database is associated with a domain, for secure login access to a
392 network. Also, different access rights can be granted to users if they
393 successfully authenticate against a domain logon server. Samba-3 does this
394 now in the same way that MS Windows NT/2K.
395 </p><p>
396 The SMB client logging on to a domain has an expectation that every other
397 server in the domain should accept the same authentication information.
398 Network browsing functionality of domains and workgroups is identical and
399 is explained in this documentation under the browsing discussions.
400 It should be noted, that browsing is totally orthogonal to logon support.
401 </p><p>
402 Issues related to the single-logon network model are discussed in this
403 section. Samba supports domain logons, network logon scripts, and user
404 profiles for MS Windows for workgroups and MS Windows 9X/ME clients
405 which are the focus of this section.
406 </p><p>
407 When an SMB client in a domain wishes to logon it broadcast requests for a
408 logon server. The first one to reply gets the job, and validates its
409 password using whatever mechanism the Samba administrator has installed.
410 It is possible (but very stupid) to create a domain where the user
411 database is not shared between servers, i.e. they are effectively workgroup
412 servers advertising themselves as participating in a domain. This
413 demonstrates how authentication is quite different from but closely
414 involved with domains.
415 </p><p>
416 Using these features you can make your clients verify their logon via
417 the Samba server; make clients run a batch file when they logon to
418 the network and download their preferences, desktop and start menu.
419 </p><p>
420 Before launching into the configuration instructions, it is
421 worthwhile to look at how a Windows 9x/ME client performs a logon:
422 </p><div class="orderedlist"><ol type="1"><li><p>
423 The client broadcasts (to the IP broadcast address of the subnet it is in)
424 a NetLogon request. This is sent to the NetBIOS name DOMAIN&lt;1c&gt; at the
425 NetBIOS layer. The client chooses the first response it receives, which
426 contains the NetBIOS name of the logon server to use in the format of
427 \\SERVER.
428 </p></li><li><p>
429 The client then connects to that server, logs on (does an SMBsessetupX) and
430 then connects to the IPC$ share (using an SMBtconX).
431 </p></li><li><p>
432 The client then does a NetWkstaUserLogon request, which retrieves the name
433 of the user's logon script.
434 </p></li><li><p>
435 The client then connects to the NetLogon share and searches for this
436 and if it is found and can be read, is retrieved and executed by the client.
437 After this, the client disconnects from the NetLogon share.
438 </p></li><li><p>
439 The client then sends a NetUserGetInfo request to the server, to retrieve
440 the user's home share, which is used to search for profiles. Since the
441 response to the NetUserGetInfo request does not contain much more then
442 the user's home share, profiles for Win9X clients MUST reside in the user
443 home directory.
444 </p></li><li><p>
445 The client then connects to the user's home share and searches for the
446 user's profile. As it turns out, you can specify the user's home share as
447 a sharename and path. For example, \\server\fred\.profile.
448 If the profiles are found, they are implemented.
449 </p></li><li><p>
450 The client then disconnects from the user's home share, and reconnects to
451 the NetLogon share and looks for CONFIG.POL, the policies file. If this is
452 found, it is read and implemented.
453 </p></li></ol></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2878805"></a>Configuration Instructions: Network Logons</h3></div></div><p>
454 The main difference between a PDC and a Windows 9x logon
455 server configuration is that
456 </p><div class="itemizedlist"><ul type="disc"><li><p>
457 Password encryption is not required for a Windows 9x logon server.
458 </p></li><li><p>
459 Windows 9x/ME clients do not possess machine trust accounts.
460 </p></li></ul></div><p>
461 Therefore, a Samba PDC will also act as a Windows 9x logon
462 server.
463 </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">security mode and master browsers</h3><p>
464 There are a few comments to make in order to tie up some
465 loose ends. There has been much debate over the issue of whether
466 or not it is ok to configure Samba as a Domain Controller in security
467 modes other than <tt>USER</tt>. The only security mode
468 which will not work due to technical reasons is <tt>SHARE</tt>
469 mode security. <tt>DOMAIN</tt> and <tt>SERVER</tt>
470 mode security is really just a variation on SMB user level security.
471 </p><p>
472 Actually, this issue is also closely tied to the debate on whether
473 or not Samba must be the domain master browser for its workgroup
474 when operating as a DC. While it may technically be possible
475 to configure a server as such (after all, browsing and domain logons
476 are two distinctly different functions), it is not a good idea to do
477 so. You should remember that the DC must register the DOMAIN#1b NetBIOS
478 name. This is the name used by Windows clients to locate the DC.
479 Windows clients do not distinguish between the DC and the DMB.
480 For this reason, it is very wise to configure the Samba DC as the DMB.
481 </p><p>
482 Now back to the issue of configuring a Samba DC to use a mode other
483 than &quot;security = user&quot;. If a Samba host is configured to use
484 another SMB server or DC in order to validate user connection
485 requests, then it is a fact that some other machine on the network
486 (the &quot;password server&quot;) knows more about the user than the Samba host.
487 99% of the time, this other host is a domain controller. Now
488 in order to operate in domain mode security, the &quot;workgroup&quot; parameter
489 must be set to the name of the Windows NT domain (which already
490 has a domain controller, right?)
491 </p><p>
492 Therefore configuring a Samba box as a DC for a domain that
493 already by definition has a PDC is asking for trouble.
494 Therefore, you should always configure the Samba DC to be the DMB
495 for its domain.
496 </p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="securitylevels.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="samba-bdc.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Samba as Stand-Alone Server </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6
497 Samba Backup Domain Controller to Samba Domain Control
498 </td></tr></table></div></body></html>