fixed bad link noticed by Martin Schwenke
[Samba.git] / docs / docbook / projdoc / Samba-PDC-HOWTO.sgml
blob475b66598c25a762818427975169f528d5c7cab1
1 <chapter id="samba-pdc">
4 <chapterinfo>
5 <author>
6 <firstname>Gerald (Jerry)</firstname><surname>Carter</surname>
7 <affiliation>
8 <orgname>VA Linux Systems/Samba Team</orgname>
9 <address><email>jerry@samba.org</email></address>
10 </affiliation>
11 <firstname>David</firstname><surname>Bannon</surname>
12 <affiliation>
13 <orgname>Samba Team</orgname>
14 <address><email>dbannon@samba.org</email></address>
15 </affiliation>
17 </author>
18 <pubdate> (26 Apr 2001) </pubdate>
19 </chapterinfo>
21 <title>
22 How to Configure Samba 2.2 as a Primary Domain Controller
23 </title>
26 <!-- **********************************************************
28 Prerequisite Reading
30 *************************************************************** -->
31 <sect1>
32 <title>Prerequisite Reading</title>
34 <para>
35 Before you continue reading in this chapter, please make sure
36 that you are comfortable with configuring basic files services
37 in smb.conf and how to enable and administer password
38 encryption in Samba. Theses two topics are covered in the
39 <ulink url="smb.conf.5.html"><filename>smb.conf(5)</filename></ulink>
40 manpage and the <ulink url="ENCRYPTION.html">Encryption chapter</ulink>
41 of this HOWTO Collection.
42 </para>
45 </sect1>
49 <!-- **********************************************************
51 Background Information
53 *************************************************************** -->
54 <sect1>
55 <title>
56 Background
57 </title>
59 <note>
60 <para>
61 <emphasis>Author's Note:</emphasis> This document is a combination
62 of David Bannon's "Samba 2.2 PDC HOWTO" and "Samba NT Domain FAQ".
63 Both documents are superseded by this one.
64 </para>
65 </note>
67 <para>
68 Versions of Samba prior to release 2.2 had marginal capabilities to act
69 as a Windows NT 4.0 Primary Domain Controller
70 <indexterm><primary>Primary Domain Controller</primary></indexterm>
71 (PDC). With Samba 2.2.0, we are proud to announce official support for
72 Windows NT 4.0-style domain logons from Windows NT 4.0 and Windows
73 2000 clients. This article outlines the steps
74 necessary for configuring Samba as a PDC. It is necessary to have a
75 working Samba server prior to implementing the PDC functionality. If
76 you have not followed the steps outlined in <ulink
77 url="UNIX_INSTALL.html"> UNIX_INSTALL.html</ulink>, please make sure
78 that your server is configured correctly before proceeding. Another
79 good resource in the <ulink url="smb.conf.5.html">smb.conf(5) man
80 page</ulink>. The following functionality should work in 2.2:
81 </para>
83 <itemizedlist>
84 <listitem><para>
85 domain logons for Windows NT 4.0/2000 clients.
86 </para></listitem>
88 <listitem><para>
89 placing a Windows 9x client in user level security
90 </para></listitem>
92 <listitem><para>
93 retrieving a list of users and groups from a Samba PDC to
94 Windows 9x/NT/2000 clients
95 </para></listitem>
97 <listitem><para>
98 roving (roaming) user profiles
99 </para></listitem>
101 <listitem><para>
102 Windows NT 4.0-style system policies
103 </para></listitem>
104 </itemizedlist>
107 <para>
108 The following pieces of functionality are not included in the 2.2 release:
109 </para>
111 <itemizedlist>
112 <listitem><para>
113 Windows NT 4 domain trusts
114 </para></listitem>
116 <listitem><para>
117 SAM replication with Windows NT 4.0 Domain Controllers
118 (i.e. a Samba PDC and a Windows NT BDC or vice versa)
119 </para></listitem>
121 <listitem><para>
122 Adding users via the User Manager for Domains
123 </para></listitem>
125 <listitem><para>
126 Acting as a Windows 2000 Domain Controller (i.e. Kerberos and
127 Active Directory)
128 </para></listitem>
129 </itemizedlist>
131 <para>
132 Please note that Windows 9x clients are not true members of a domain
133 for reasons outlined in this article. Therefore the protocol for
134 support Windows 9x-style domain logons is completely different
135 from NT4 domain logons and has been officially supported for some
136 time.
137 </para>
140 <para>
141 Implementing a Samba PDC can basically be divided into 2 broad
142 steps.
143 </para>
145 <orderedlist numeration="Arabic">
146 <listitem><para>
147 Configuring the Samba PDC
148 </para></listitem>
150 <listitem><para>
151 Creating machine trust accounts and joining clients
152 to the domain
153 </para></listitem>
154 </orderedlist>
156 <para>
157 There are other minor details such as user profiles, system
158 policies, etc... However, these are not necessarily specific
159 to a Samba PDC as much as they are related to Windows NT networking
160 concepts. They will be mentioned only briefly here.
161 </para>
163 </sect1>
166 <!-- **********************************************************
168 Configuring the Samba PDC
170 *************************************************************** -->
172 <sect1>
173 <title>Configuring the Samba Domain Controller</title>
175 <para>
176 The first step in creating a working Samba PDC is to
177 understand the parameters necessary in smb.conf. I will not
178 attempt to re-explain the parameters here as they are more that
179 adequately covered in <ulink url="smb.conf.5.html"> the smb.conf
180 man page</ulink>. For convenience, the parameters have been
181 linked with the actual smb.conf description.
182 </para>
184 <para>
185 Here is an example <filename>smb.conf</filename> for acting as a PDC:
186 </para>
188 <para><programlisting>
189 [global]
190 ; Basic server settings
191 <ulink url="smb.conf.5.html#NETBIOSNAME">netbios name</ulink> = <replaceable>POGO</replaceable>
192 <ulink url="smb.conf.5.html#WORKGROUP">workgroup</ulink> = <replaceable>NARNIA</replaceable>
194 ; we should act as the domain and local master browser
195 <ulink url="smb.conf.5.html#OSLEVEL">os level</ulink> = 64
196 <ulink url="smb.conf.5.html#PERFERREDMASTER">preferred master</ulink> = yes
197 <ulink url="smb.conf.5.html#DOMAINMASTER">domain master</ulink> = yes
198 <ulink url="smb.conf.5.html#LOCALMASTER">local master</ulink> = yes
200 ; security settings (must user security = user)
201 <ulink url="smb.conf.5.html#SECURITYEQUALSUSER">security</ulink> = user
203 ; encrypted passwords are a requirement for a PDC
204 <ulink url="smb.conf.5.html#ENCRYPTPASSWORDS">encrypt passwords</ulink> = yes
206 ; support domain logons
207 <ulink url="smb.conf.5.html#DOMAINLOGONS">domain logons</ulink> = yes
209 ; where to store user profiles?
210 <ulink url="smb.conf.5.html#LOGONPATH">logon path</ulink> = \\%N\profiles\%u
212 ; where is a user's home directory and where should it
213 ; be mounted at?
214 <ulink url="smb.conf.5.html#LOGONDRIVE">logon drive</ulink> = H:
215 <ulink url="smb.conf.5.html#LOGONHOME">logon home</ulink> = \\homeserver\%u
217 ; specify a generic logon script for all users
218 ; this is a relative **DOS** path to the [netlogon] share
219 <ulink url="smb.conf.5.html#LOGONSCRIPT">logon script</ulink> = logon.cmd
221 ; necessary share for domain controller
222 [netlogon]
223 <ulink url="smb.conf.5.html#PATH">path</ulink> = /usr/local/samba/lib/netlogon
224 <ulink url="smb.conf.5.html#READONLY">read only</ulink> = yes
225 <ulink url="smb.conf.5.html#WRITELIST">write list</ulink> = <replaceable>ntadmin</replaceable>
227 ; share for storing user profiles
228 [profiles]
229 <ulink url="smb.conf.5.html#PATH">path</ulink> = /export/smb/ntprofile
230 <ulink url="smb.conf.5.html#READONLY">read only</ulink> = no
231 <ulink url="smb.conf.5.html#CREATEMASK">create mask</ulink> = 0600
232 <ulink url="smb.conf.5.html#DIRECTORYMASK">directory mask</ulink> = 0700
233 </programlisting></para>
235 <para>
236 There are a couple of points to emphasize in the above configuration.
237 </para>
239 <itemizedlist>
240 <listitem><para>
241 Encrypted passwords must be enabled. For more details on how
242 to do this, refer to <ulink url="ENCRYPTION.html">ENCRYPTION.html</ulink>.
243 </para></listitem>
245 <listitem><para>
246 The server must support domain logons and a
247 <filename>[netlogon]</filename> share
248 </para></listitem>
250 <listitem><para>
251 The server must be the domain master browser in order for Windows
252 client to locate the server as a DC. Please refer to the various
253 Network Browsing documentation included with this distribution for
254 details.
255 </para></listitem>
256 </itemizedlist>
258 <para>
259 As Samba 2.2 does not offer a complete implementation of group mapping
260 between Windows NT groups and Unix groups (this is really quite
261 complicated to explain in a short space), you should refer to the
262 <ulink url="smb.conf.5.html#DOMAINADMINGROUP">domain admin
263 group</ulink> smb.conf parameter for information of creating "Domain
264 Admins" style accounts.
265 </para>
267 </sect1>
270 <sect1>
271 <title>Creating Machine Trust Accounts and Joining Clients to the
272 Domain</title>
274 <para>
275 A machine trust account is a Samba account that is used to
276 authenticate a client machine (rather than a user) to the Samba
277 server. In Windows terminology, this is known as a "Computer
278 Account."</para>
280 <para>
281 The password of a machine trust account acts as the shared secret for
282 secure communication with the Domain Controller. This is a security
283 feature to prevent an unauthorized machine with the same NetBIOS name
284 from joining the domain and gaining access to domain user/group
285 accounts. Windows NT and 2000 clients use machine trust accounts, but
286 Windows 9x clients do not. Hence, a Windows 9x client is never a true
287 member of a domain because it does not possess a machine trust
288 account, and thus has no shared secret with the domain controller.
289 </para>
291 <para>A Windows PDC stores each machine trust account in the Windows
292 Registry. A Samba PDC, however, stores each machine trust account
293 in two parts, as follows:
295 <itemizedlist>
296 <listitem><para>A Samba account, stored in the same location as user
297 LanMan and NT password hashes (currently
298 <filename>smbpasswd</filename>). The Samba account
299 possesses and uses only the NT password hash.</para></listitem>
301 <listitem><para>A corresponding Unix account, typically stored in
302 <filename>/etc/passwd</filename>. (Future releases will alleviate the need to
303 create <filename>/etc/passwd</filename> entries.) </para></listitem>
304 </itemizedlist>
305 </para>
307 <para>
308 There are two ways to create machine trust accounts:
309 </para>
311 <itemizedlist>
312 <listitem><para> Manual creation. Both the Samba and corresponding
313 Unix account are created by hand.</para></listitem>
315 <listitem><para> "On-the-fly" creation. The Samba machine trust
316 account is automatically created by Samba at the time the client
317 is joined to the domain. (For security, this is the
318 recommended method.) The corresponding Unix account may be
319 created automatically or manually. </para>
320 </listitem>
322 </itemizedlist>
324 <sect2>
325 <title>Manual Creation of Machine Trust Accounts</title>
327 <para>
328 The first step in manually creating a machine trust account is to
329 manually create the corresponding Unix account in
330 <filename>/etc/passwd</filename>. This can be done using
331 <command>vipw</command> or other 'add user' command that is normally
332 used to create new Unix accounts. The following is an example for a
333 Linux based Samba server:
334 </para>
336 <para>
337 <prompt>root# </prompt><command>/usr/sbin/useradd -g 100 -d /dev/null -c <replaceable>"machine
338 nickname"</replaceable> -s /bin/false <replaceable>machine_name</replaceable>$ </command>
339 </para>
340 <para>
341 <prompt>root# </prompt><command>passwd -l <replaceable>machine_name</replaceable>$</command>
342 </para>
344 <para>
345 The <filename>/etc/passwd</filename> entry will list the machine name
346 with a "$" appended, won't have a password, will have a null shell and no
347 home directory. For example a machine named 'doppy' would have an
348 <filename>/etc/passwd</filename> entry like this:
349 </para>
351 <para><programlisting>
352 doppy$:x:505:501:<replaceable>machine_nickname</replaceable>:/dev/null:/bin/false
353 </programlisting></para>
355 <para>
356 Above, <replaceable>machine_nickname</replaceable> can be any
357 descriptive name for the client, i.e., BasementComputer.
358 <replaceable>machine_name</replaceable> absolutely must be the NetBIOS
359 name of the client to be joined to the domain. The "$" must be
360 appended to the NetBIOS name of the client or Samba will not recognize
361 this as a machine trust account.
362 </para>
365 <para>
366 Now that the corresponding Unix account has been created, the next step is to create
367 the Samba account for the client containing the well-known initial
368 machine trust account password. This can be done using the <ulink
369 url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink> command
370 as shown here:
371 </para>
373 <para>
374 <prompt>root# </prompt><command>smbpasswd -a -m <replaceable>machine_name</replaceable></command>
375 </para>
377 <para>
378 where <replaceable>machine_name</replaceable> is the machine's NetBIOS
379 name. The RID of the new machine account is generated from the UID of
380 the corresponding Unix account.
381 </para>
383 <warning>
384 <title>Join the client to the domain immediately</title>
386 <para>
387 Manually creating a machine trust account using this method is the
388 equivalent of creating a machine trust account on a Windows NT PDC using
389 the "Server Manager". From the time at which the account is created
390 to the time which the client joins the domain and changes the password,
391 your domain is vulnerable to an intruder joining your domain using a
392 a machine with the same NetBIOS name. A PDC inherently trusts
393 members of the domain and will serve out a large degree of user
394 information to such clients. You have been warned!
395 </para>
396 </warning>
397 </sect2>
400 <sect2>
401 <title>"On-the-Fly" Creation of Machine Trust Accounts</title>
403 <para>
404 The second (and recommended) way of creating machine trust accounts is
405 simply to allow the Samba server to create them as needed when the client
406 is joined to the domain. </para>
408 <para>Since each Samba machine trust account requires a corresponding
409 Unix account, a method for automatically creating the
410 Unix account is usually supplied; this requires configuration of the
411 <ulink url="smb.conf.5.html#ADDUSERSCRIPT">add user script</ulink>
412 option in <filename>smb.conf</filename>. This
413 method is not required, however; corresponding Unix accounts may also
414 be created manually.
415 </para>
418 <para>Below is an example for a RedHat 6.2 Linux system.
419 </para>
421 <para><programlisting>
422 [global]
423 # <...remainder of parameters...>
424 add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
425 </programlisting></para>
427 </sect2>
430 <sect2><title>Joining the Client to the Domain</title>
432 <para>
433 The procedure for joining a client to the domain varies with the
434 version of Windows.
435 </para>
437 <itemizedlist>
438 <listitem><para><emphasis>Windows 2000</emphasis></para>
440 <para> When the user elects to join the client to a domain, Windows prompts for
441 an account and password that is privileged to join the domain. A
442 Samba administrative account (i.e., a Samba account that has root
443 privileges on the Samba server) must be entered here; the
444 operation will fail if an ordinary user account is given.
445 The password for this account should be
446 set to a different password than the associated
447 <filename>/etc/passwd</filename> entry, for security
448 reasons. </para>
450 <para>The session key of the Samba administrative account acts as an
451 encryption key for setting the password of the machine trust
452 account. The machine trust account will be created on-the-fly, or
453 updated if it already exists.</para>
454 </listitem>
456 <listitem><para><emphasis>Windows NT</emphasis></para>
458 <para> If the machine trust account was created manually, on the
459 Identification Changes menu enter the domain name, but do not
460 check the box "Create a Computer Account in the Domain." In this case,
461 the existing machine trust account is used to join the machine to
462 the domain.</para>
464 <para> If the machine trust account is to be created
465 on-the-fly, on the Identification Changes menu enter the domain
466 name, and check the box "Create a Computer Account in the Domain." In
467 this case, joining the domain proceeds as above for Windows 2000
468 (i.e., you must supply a Samba administrative account when
469 prompted).</para>
470 </listitem>
471 </itemizedlist>
473 </sect2>
474 </sect1>
475 <!-- **********************************************************
477 Common Problems
479 *************************************************************** -->
481 <sect1>
482 <title>Common Problems and Errors</title>
484 <para>
485 </para>
486 <itemizedlist>
487 <listitem>
488 <para>
489 <emphasis>I cannot include a '$' in a machine name.</emphasis>
490 </para>
492 <para>
493 A 'machine name' in (typically) <filename>/etc/passwd</>
494 of the machine name with a '$' appended. FreeBSD (and other BSD
495 systems?) won't create a user with a '$' in their name.
496 </para>
498 <para>
499 The problem is only in the program used to make the entry, once
500 made, it works perfectly. So create a user without the '$' and
501 use <command>vipw</> to edit the entry, adding the '$'. Or create
502 the whole entry with vipw if you like, make sure you use a
503 unique User ID !
504 </para>
505 </listitem>
507 <listitem>
508 <para>
509 <emphasis>I get told "You already have a connection to the Domain...."
510 or "Cannot join domain, the credentials supplied conflict with an
511 existing set.." when creating a machine trust account.</emphasis>
512 </para>
514 <para>
515 This happens if you try to create a machine trust account from the
516 machine itself and already have a connection (e.g. mapped drive)
517 to a share (or IPC$) on the Samba PDC. The following command
518 will remove all network drive connections:
519 </para>
521 <para>
522 <prompt>C:\WINNT\></prompt> <command>net use * /d</command>
523 </para>
525 <para>
526 Further, if the machine is a already a 'member of a workgroup' that
527 is the same name as the domain you are joining (bad idea) you will
528 get this message. Change the workgroup name to something else, it
529 does not matter what, reboot, and try again.
530 </para>
531 </listitem>
533 <listitem>
534 <para>
535 <emphasis>The system can not log you on (C000019B)....</emphasis>
536 </para>
538 <para>I joined the domain successfully but after upgrading
539 to a newer version of the Samba code I get the message, "The system
540 can not log you on (C000019B), Please try a gain or consult your
541 system administrator" when attempting to logon.
542 </para>
544 <para>
545 This occurs when the domain SID stored in
546 <filename>private/WORKGROUP.SID</filename> is
547 changed. For example, you remove the file and <command>smbd</command> automatically
548 creates a new one. Or you are swapping back and forth between
549 versions 2.0.7, TNG and the HEAD branch code (not recommended). The
550 only way to correct the problem is to restore the original domain
551 SID or remove the domain client from the domain and rejoin.
552 </para>
553 </listitem>
555 <listitem>
556 <para>
557 <emphasis>The machine trust account for this computer either does not
558 exist or is not accessible.</emphasis>
559 </para>
561 <para>
562 When I try to join the domain I get the message "The machine account
563 for this computer either does not exist or is not accessible". What's
564 wrong?
565 </para>
567 <para>
568 This problem is caused by the PDC not having a suitable machine trust account.
569 If you are using the <parameter>add user script</parameter> method to create
570 accounts then this would indicate that it has not worked. Ensure the domain
571 admin user system is working.
572 </para>
574 <para>
575 Alternatively if you are creating account entries manually then they
576 have not been created correctly. Make sure that you have the entry
577 correct for the machine trust account in smbpasswd file on the Samba PDC.
578 If you added the account using an editor rather than using the smbpasswd
579 utility, make sure that the account name is the machine NetBIOS name
580 with a '$' appended to it ( i.e. computer_name$ ). There must be an entry
581 in both /etc/passwd and the smbpasswd file. Some people have reported
582 that inconsistent subnet masks between the Samba server and the NT
583 client have caused this problem. Make sure that these are consistent
584 for both client and server.
585 </para>
586 </listitem>
588 <listitem>
589 <para>
590 <emphasis>When I attempt to login to a Samba Domain from a NT4/W2K workstation,
591 I get a message about my account being disabled.</emphasis>
592 </para>
594 <para>
595 This problem is caused by a PAM related bug in Samba 2.2.0. This bug is
596 fixed in 2.2.1. Other symptoms could be unaccessible shares on
597 NT/W2K member servers in the domain or the following error in your smbd.log:
598 passdb/pampass.c:pam_account(268) PAM: UNKNOWN ERROR for User: %user%
599 </para>
601 <para>
602 At first be ensure to enable the useraccounts with <command>smbpasswd -e
603 %user%</command>, this is normally done, when you create an account.
604 </para>
606 <para>
607 In order to work around this problem in 2.2.0, configure the
608 <parameter>account</parameter> control flag in
609 <filename>/etc/pam.d/samba</filename> file as follows:
610 </para>
612 <para><programlisting>
613 account required pam_permit.so
614 </programlisting></para>
616 <para>
617 If you want to remain backward compatibility to samba 2.0.x use
618 <filename>pam_permit.so</filename>, it's also possible to use
619 <filename>pam_pwdb.so</filename>. There are some bugs if you try to
620 use <filename>pam_unix.so</filename>, if you need this, be ensure to use
621 the most recent version of this file.
622 </para>
623 </listitem>
624 </itemizedlist>
626 </sect1>
630 <!-- **********************************************************
632 Policies and Profiles
634 *************************************************************** -->
636 <sect1>
637 <title>
638 System Policies and Profiles
639 </title>
641 <para>
642 Much of the information necessary to implement System Policies and
643 Roving User Profiles in a Samba domain is the same as that for
644 implementing these same items in a Windows NT 4.0 domain.
645 You should read the white paper <ulink url="http://www.microsoft.com/ntserver/management/deployment/planguide/prof_policies.asp">Implementing
646 Profiles and Policies in Windows NT 4.0</ulink> available from Microsoft.
647 </para>
649 <para>
650 Here are some additional details:
651 </para>
653 <itemizedlist>
655 <listitem>
656 <para>
657 <emphasis>What about Windows NT Policy Editor?</emphasis>
658 </para>
660 <para>
661 To create or edit <filename>ntconfig.pol</filename> you must use
662 the NT Server Policy Editor, <command>poledit.exe</command> which
663 is included with NT Server but <emphasis>not NT Workstation</emphasis>.
664 There is a Policy Editor on a NTws
665 but it is not suitable for creating <emphasis>Domain Policies</emphasis>.
666 Further, although the Windows 95
667 Policy Editor can be installed on an NT Workstation/Server, it will not
668 work with NT policies because the registry key that are set by the policy templates.
669 However, the files from the NT Server will run happily enough on an NTws.
670 You need <filename>poledit.exe, common.adm</> and <filename>winnt.adm</>. It is convenient
671 to put the two *.adm files in <filename>c:\winnt\inf</> which is where
672 the binary will look for them unless told otherwise. Note also that that
673 directory is 'hidden'.
674 </para>
676 <para>
677 The Windows NT policy editor is also included with the Service Pack 3 (and
678 later) for Windows NT 4.0. Extract the files using <command>servicepackname /x</command>,
679 i.e. that's <command>Nt4sp6ai.exe /x</command> for service pack 6a. The policy editor,
680 <command>poledit.exe</command> and the associated template files (*.adm) should
681 be extracted as well. It is also possible to downloaded the policy template
682 files for Office97 and get a copy of the policy editor. Another possible
683 location is with the Zero Administration Kit available for download from Microsoft.
684 </para>
685 </listitem>
688 <listitem>
689 <para>
690 <emphasis>Can Win95 do Policies?</emphasis>
691 </para>
693 <para>
694 Install the group policy handler for Win9x to pick up group
695 policies. Look on the Win98 CD in <filename>\tools\reskit\netadmin\poledit</filename>.
696 Install group policies on a Win9x client by double-clicking
697 <filename>grouppol.inf</filename>. Log off and on again a couple of
698 times and see if Win98 picks up group policies. Unfortunately this needs
699 to be done on every Win9x machine that uses group policies....
700 </para>
702 <para>
703 If group policies don't work one reports suggests getting the updated
704 (read: working) grouppol.dll for Windows 9x. The group list is grabbed
705 from /etc/group.
706 </para>
707 </listitem>
710 <listitem>
711 <para>
712 <emphasis>How do I get 'User Manager' and 'Server Manager'</emphasis>
713 </para>
715 <para>
716 Since I don't need to buy an NT Server CD now, how do I get
717 the 'User Manager for Domains', the 'Server Manager'?
718 </para>
720 <para>
721 Microsoft distributes a version of these tools called nexus for
722 installation on Windows 95 systems. The tools set includes
723 </para>
725 <itemizedlist>
726 <listitem><para>Server Manager</para></listitem>
728 <listitem><para>User Manager for Domains</para></listitem>
730 <listitem><para>Event Viewer</para></listitem>
731 </itemizedlist>
733 <para>
734 Click here to download the archived file <ulink
735 url="ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE">ftp://ftp.microsoft.com/Softlib/MSLFILES/NEXUS.EXE</ulink>
736 </para>
738 <para>
739 The Windows NT 4.0 version of the 'User Manager for
740 Domains' and 'Server Manager' are available from Microsoft via ftp
741 from <ulink url="ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE">ftp://ftp.microsoft.com/Softlib/MSLFILES/SRVTOOLS.EXE</ulink>
742 </para>
743 </listitem>
744 </itemizedlist>
746 </sect1>
750 <!-- **********************************************************
752 Getting Help
754 *************************************************************** -->
757 <sect1>
758 <title>What other help can I get? </title>
760 <para>
761 There are many sources of information available in the form
762 of mailing lists, RFC's and documentation. The docs that come
763 with the samba distribution contain very good explanations of
764 general SMB topics such as browsing.</para>
766 <itemizedlist>
767 <listitem>
768 <para>
769 <emphasis>What are some diagnostics tools I can use to debug the domain logon
770 process and where can I find them?</emphasis>
771 </para>
773 <para>
774 One of the best diagnostic tools for debugging problems is Samba itself.
775 You can use the -d option for both smbd and nmbd to specify what
776 'debug level' at which to run. See the man pages on smbd, nmbd and
777 smb.conf for more information on debugging options. The debug
778 level can range from 1 (the default) to 10 (100 for debugging passwords).
779 </para>
781 <para>
782 Another helpful method of debugging is to compile samba using the
783 <command>gcc -g </command> flag. This will include debug
784 information in the binaries and allow you to attach gdb to the
785 running smbd / nmbd process. In order to attach gdb to an smbd
786 process for an NT workstation, first get the workstation to make the
787 connection. Pressing ctrl-alt-delete and going down to the domain box
788 is sufficient (at least, on the first time you join the domain) to
789 generate a 'LsaEnumTrustedDomains'. Thereafter, the workstation
790 maintains an open connection, and therefore there will be an smbd
791 process running (assuming that you haven't set a really short smbd
792 idle timeout) So, in between pressing ctrl alt delete, and actually
793 typing in your password, you can gdb attach and continue.
794 </para>
796 <para>
797 Some useful samba commands worth investigating:
798 </para>
800 <itemizedlist>
801 <listitem><para>testparam | more</para></listitem>
802 <listitem><para>smbclient -L //{netbios name of server}</para></listitem>
803 </itemizedlist>
805 <para>
806 An SMB enabled version of tcpdump is available from
807 <ulink url="http://www.tcpdump.org/">http://www.tcpdup.org/</ulink>.
808 Ethereal, another good packet sniffer for Unix and Win32
809 hosts, can be downloaded from <ulink
810 url="http://www.ethereal.com/">http://www.ethereal.com</ulink>.
811 </para>
813 <para>
814 For tracing things on the Microsoft Windows NT, Network Monitor
815 (aka. netmon) is available on the Microsoft Developer Network CD's,
816 the Windows NT Server install CD and the SMS CD's. The version of
817 netmon that ships with SMS allows for dumping packets between any two
818 computers (i.e. placing the network interface in promiscuous mode).
819 The version on the NT Server install CD will only allow monitoring
820 of network traffic directed to the local NT box and broadcasts on the
821 local subnet. Be aware that Ethereal can read and write netmon
822 formatted files.
823 </para>
824 </listitem>
827 <listitem>
828 <para>
829 <emphasis>How do I install 'Network Monitor' on an NT Workstation
830 or a Windows 9x box?</emphasis>
831 </para>
833 <para>
834 Installing netmon on an NT workstation requires a couple
835 of steps. The following are for installing Netmon V4.00.349, which comes
836 with Microsoft Windows NT Server 4.0, on Microsoft Windows NT
837 Workstation 4.0. The process should be similar for other version of
838 Windows NT / Netmon. You will need both the Microsoft Windows
839 NT Server 4.0 Install CD and the Workstation 4.0 Install CD.
840 </para>
842 <para>
843 Initially you will need to install 'Network Monitor Tools and Agent'
844 on the NT Server. To do this
845 </para>
847 <itemizedlist>
848 <listitem><para>Goto Start - Settings - Control Panel -
849 Network - Services - Add </para></listitem>
851 <listitem><para>Select the 'Network Monitor Tools and Agent' and
852 click on 'OK'.</para></listitem>
854 <listitem><para>Click 'OK' on the Network Control Panel.
855 </para></listitem>
857 <listitem><para>Insert the Windows NT Server 4.0 install CD
858 when prompted.</para></listitem>
859 </itemizedlist>
861 <para>
862 At this point the Netmon files should exist in
863 <filename>%SYSTEMROOT%\System32\netmon\*.*</filename>.
864 Two subdirectories exist as well, <filename>parsers\</filename>
865 which contains the necessary DLL's for parsing the netmon packet
866 dump, and <filename>captures\</filename>.
867 </para>
869 <para>
870 In order to install the Netmon tools on an NT Workstation, you will
871 first need to install the 'Network Monitor Agent' from the Workstation
872 install CD.
873 </para>
875 <itemizedlist>
876 <listitem><para>Goto Start - Settings - Control Panel -
877 Network - Services - Add</para></listitem>
879 <listitem><para>Select the 'Network Monitor Agent' and click
880 on 'OK'.</para></listitem>
882 <listitem><para>Click 'OK' on the Network Control Panel.
883 </para></listitem>
885 <listitem><para>Insert the Windows NT Workstation 4.0 install
886 CD when prompted.</para></listitem>
887 </itemizedlist>
890 <para>
891 Now copy the files from the NT Server in %SYSTEMROOT%\System32\netmon\*.*
892 to %SYSTEMROOT%\System32\netmon\*.* on the Workstation and set
893 permissions as you deem appropriate for your site. You will need
894 administrative rights on the NT box to run netmon.
895 </para>
897 <para>
898 To install Netmon on a Windows 9x box install the network monitor agent
899 from the Windows 9x CD (\admin\nettools\netmon). There is a readme
900 file located with the netmon driver files on the CD if you need
901 information on how to do this. Copy the files from a working
902 Netmon installation.
903 </para>
904 </listitem>
909 <listitem>
910 <para>
911 The following is a list if helpful URLs and other links:
912 </para>
914 <itemizedlist>
916 <listitem><para>Home of Samba site <ulink url="http://samba.org">
917 http://samba.org</ulink>. We have a mirror near you !</para></listitem>
919 <listitem><para> The <emphasis>Development</emphasis> document
920 on the Samba mirrors might mention your problem. If so,
921 it might mean that the developers are working on it.</para></listitem>
923 <listitem><para>See how Scott Merrill simulates a BDC behavior at
924 <ulink url="http://www.skippy.net/linux/smb-howto.html">
925 http://www.skippy.net/linux/smb-howto.html</>. </para></listitem>
927 <listitem><para>Although 2.0.7 has almost had its day as a PDC, David Bannon will
928 keep the 2.0.7 PDC pages at <ulink url="http://bioserve.latrobe.edu.au/samba">
929 http://bioserve.latrobe.edu.au/samba</ulink> going for a while yet.</para></listitem>
931 <listitem><para>Misc links to CIFS information
932 <ulink url="http://samba.org/cifs/">http://samba.org/cifs/</ulink></para></listitem>
934 <listitem><para>NT Domains for Unix <ulink url="http://mailhost.cb1.com/~lkcl/ntdom/">
935 http://mailhost.cb1.com/~lkcl/ntdom/</ulink></para></listitem>
937 <listitem><para>FTP site for older SMB specs:
938 <ulink url="ftp://ftp.microsoft.com/developr/drg/CIFS/">
939 ftp://ftp.microsoft.com/developr/drg/CIFS/</ulink></para></listitem>
941 </itemizedlist>
942 </listitem>
943 </itemizedlist>
946 <itemizedlist>
947 <listitem>
948 <para>
949 <emphasis>How do I get help from the mailing lists?</emphasis>
950 </para>
952 <para>
953 There are a number of Samba related mailing lists. Go to <ulink
954 url="http://samba.org">http://samba.org</ulink>, click on your nearest mirror
955 and then click on <command>Support</> and then click on <command>
956 Samba related mailing lists</>.
957 </para>
959 <para>
960 For questions relating to Samba TNG go to
961 <ulink url="http://www.samba-tng.org/">http://www.samba-tng.org/</ulink>
962 It has been requested that you don't post questions about Samba-TNG to the
963 main stream Samba lists.</para>
965 <para>
966 If you post a message to one of the lists please observe the following guide lines :
967 </para>
969 <itemizedlist>
971 <listitem><para> Always remember that the developers are volunteers, they are
972 not paid and they never guarantee to produce a particular feature at
973 a particular time. Any time lines are 'best guess' and nothing more.
974 </para></listitem>
976 <listitem><para> Always mention what version of samba you are using and what
977 operating system its running under. You should probably list the
978 relevant sections of your smb.conf file, at least the options
979 in [global] that affect PDC support.</para></listitem>
981 <listitem><para>In addition to the version, if you obtained Samba via
982 CVS mention the date when you last checked it out.</para></listitem>
984 <listitem><para> Try and make your question clear and brief, lots of long,
985 convoluted questions get deleted before they are completely read !
986 Don't post html encoded messages (if you can select colour or font
987 size its html).</para></listitem>
989 <listitem><para> If you run one of those nifty 'I'm on holidays' things when
990 you are away, make sure its configured to not answer mailing lists.
991 </para></listitem>
993 <listitem><para> Don't cross post. Work out which is the best list to post to
994 and see what happens, i.e. don't post to both samba-ntdom and samba-technical.
995 Many people active on the lists subscribe to more
996 than one list and get annoyed to see the same message two or more times.
997 Often someone will see a message and thinking it would be better dealt
998 with on another, will forward it on for you.</para></listitem>
1000 <listitem><para>You might include <emphasis>partial</emphasis>
1001 log files written at a debug level set to as much as 20.
1002 Please don't send the entire log but enough to give the context of the
1003 error messages.</para></listitem>
1005 <listitem><para>(Possibly) If you have a complete netmon trace ( from the opening of
1006 the pipe to the error ) you can send the *.CAP file as well.</para></listitem>
1008 <listitem><para>Please think carefully before attaching a document to an email.
1009 Consider pasting the relevant parts into the body of the message. The samba
1010 mailing lists go to a huge number of people, do they all need a copy of your
1011 smb.conf in their attach directory?</para></listitem>
1013 </itemizedlist>
1014 </listitem>
1017 <listitem>
1018 <para>
1019 <emphasis>How do I get off the mailing lists?</emphasis>
1020 </para>
1022 <para>To have your name removed from a samba mailing list, go to the
1023 same place you went to to get on it. Go to <ulink
1024 url="http://lists.samba.org/">http://lists.samba.org</ulink>,
1025 click on your nearest mirror and then click on <command>Support</> and
1026 then click on <command> Samba related mailing lists</>. Or perhaps see
1027 <ulink url="http://lists.samba.org/mailman/roster/samba-ntdom">here</ulink>
1028 </para>
1030 <para>
1031 Please don't post messages to the list asking to be removed, you will just
1032 be referred to the above address (unless that process failed in some way...)
1033 </para>
1034 </listitem>
1035 </itemizedlist>
1037 </sect1>
1040 <!-- **********************************************************
1042 Windows 9x domain control
1044 *************************************************************** -->
1045 <sect1>
1046 <title>Domain Control for Windows 9x/ME</title>
1048 <note>
1049 <para>
1050 The following section contains much of the original
1051 DOMAIN.txt file previously included with Samba. Much of
1052 the material is based on what went into the book <emphasis>Special
1053 Edition, Using Samba</emphasis>, by Richard Sharpe.
1054 </para>
1055 </note>
1057 <para>
1058 A domain and a workgroup are exactly the same thing in terms of network
1059 browsing. The difference is that a distributable authentication
1060 database is associated with a domain, for secure login access to a
1061 network. Also, different access rights can be granted to users if they
1062 successfully authenticate against a domain logon server (NT server and
1063 other systems based on NT server support this, as does at least Samba TNG now).
1064 </para>
1066 <para>
1067 The SMB client logging on to a domain has an expectation that every other
1068 server in the domain should accept the same authentication information.
1069 Network browsing functionality of domains and workgroups is
1070 identical and is explained in BROWSING.txt. It should be noted, that browsing
1071 is totally orthogonal to logon support.
1072 </para>
1074 <para>
1075 Issues related to the single-logon network model are discussed in this
1076 section. Samba supports domain logons, network logon scripts, and user
1077 profiles for MS Windows for workgroups and MS Windows 9X/ME clients
1078 which will be the focus of this section.
1079 </para>
1082 <para>
1083 When an SMB client in a domain wishes to logon it broadcast requests for a
1084 logon server. The first one to reply gets the job, and validates its
1085 password using whatever mechanism the Samba administrator has installed.
1086 It is possible (but very stupid) to create a domain where the user
1087 database is not shared between servers, i.e. they are effectively workgroup
1088 servers advertising themselves as participating in a domain. This
1089 demonstrates how authentication is quite different from but closely
1090 involved with domains.
1091 </para>
1094 <para>
1095 Using these features you can make your clients verify their logon via
1096 the Samba server; make clients run a batch file when they logon to
1097 the network and download their preferences, desktop and start menu.
1098 </para>
1100 <para>
1101 Before launching into the configuration instructions, it is
1102 worthwhile lookingat how a Windows 9x/ME client performs a logon:
1103 </para>
1105 <orderedlist>
1106 <listitem>
1107 <para>
1108 The client broadcasts (to the IP broadcast address of the subnet it is in)
1109 a NetLogon request. This is sent to the NetBIOS name DOMAIN<1c> at the
1110 NetBIOS layer. The client chooses the first response it receives, which
1111 contains the NetBIOS name of the logon server to use in the format of
1112 \\SERVER.
1113 </para>
1114 </listitem>
1116 <listitem>
1117 <para>
1118 The client then connects to that server, logs on (does an SMBsessetupX) and
1119 then connects to the IPC$ share (using an SMBtconX).
1120 </para>
1121 </listitem>
1123 <listitem>
1124 <para>
1125 The client then does a NetWkstaUserLogon request, which retrieves the name
1126 of the user's logon script.
1127 </para>
1128 </listitem>
1130 <listitem>
1131 <para>
1132 The client then connects to the NetLogon share and searches for this
1133 and if it is found and can be read, is retrieved and executed by the client.
1134 After this, the client disconnects from the NetLogon share.
1135 </para>
1136 </listitem>
1138 <listitem>
1139 <para>
1140 The client then sends a NetUserGetInfo request to the server, to retrieve
1141 the user's home share, which is used to search for profiles. Since the
1142 response to the NetUserGetInfo request does not contain much more
1143 the user's home share, profiles for Win9X clients MUST reside in the user
1144 home directory.
1145 </para>
1146 </listitem>
1148 <listitem>
1149 <para>
1150 The client then connects to the user's home share and searches for the
1151 user's profile. As it turns out, you can specify the user's home share as
1152 a sharename and path. For example, \\server\fred\.profile.
1153 If the profiles are found, they are implemented.
1154 </para>
1155 </listitem>
1157 <listitem>
1158 <para>
1159 The client then disconnects from the user's home share, and reconnects to
1160 the NetLogon share and looks for CONFIG.POL, the policies file. If this is
1161 found, it is read and implemented.
1162 </para>
1163 </listitem>
1164 </orderedlist>
1167 <sect2>
1168 <title>Configuration Instructions: Network Logons</title>
1170 <para>
1171 The main difference between a PDC and a Windows 9x logon
1172 server configuration is that
1173 </para>
1175 <itemizedlist>
1177 <listitem><para>
1178 Password encryption is not required for a Windows 9x logon server.
1179 </para></listitem>
1181 <listitem><para>
1182 Windows 9x/ME clients do not possess machine trust accounts.
1183 </para></listitem>
1185 </itemizedlist>
1187 <para>
1188 Therefore, a Samba PDC will also act as a Windows 9x logon
1189 server.
1190 </para>
1193 <warning>
1194 <title>security mode and master browsers</title>
1196 <para>
1197 There are a few comments to make in order to tie up some
1198 loose ends. There has been much debate over the issue of whether
1199 or not it is ok to configure Samba as a Domain Controller in security
1200 modes other than <constant>USER</constant>. The only security mode
1201 which will not work due to technical reasons is <constant>SHARE</constant>
1202 mode security. <constant>DOMAIN</constant> and <constant>SERVER</constant>
1203 mode security is really just a variation on SMB user level security.
1204 </para>
1206 <para>
1207 Actually, this issue is also closely tied to the debate on whether
1208 or not Samba must be the domain master browser for its workgroup
1209 when operating as a DC. While it may technically be possible
1210 to configure a server as such (after all, browsing and domain logons
1211 are two distinctly different functions), it is not a good idea to
1212 so. You should remember that the DC must register the DOMAIN#1b NetBIOS
1213 name. This is the name used by Windows clients to locate the DC.
1214 Windows clients do not distinguish between the DC and the DMB.
1215 For this reason, it is very wise to configure the Samba DC as the DMB.
1216 </para>
1218 <para>
1219 Now back to the issue of configuring a Samba DC to use a mode other
1220 than "security = user". If a Samba host is configured to use
1221 another SMB server or DC in order to validate user connection
1222 requests, then it is a fact that some other machine on the network
1223 (the "password server") knows more about user than the Samba host.
1224 99% of the time, this other host is a domain controller. Now
1225 in order to operate in domain mode security, the "workgroup" parameter
1226 must be set to the name of the Windows NT domain (which already
1227 has a domain controller, right?)
1228 </para>
1230 <para>
1231 Therefore configuring a Samba box as a DC for a domain that
1232 already by definition has a PDC is asking for trouble.
1233 Therefore, you should always configure the Samba DC to be the DMB
1234 for its domain.
1235 </para>
1236 </warning>
1238 </sect2>
1241 <sect2>
1242 <title>Configuration Instructions: Setting up Roaming User Profiles</title>
1244 <warning>
1245 <para>
1246 <emphasis>NOTE!</emphasis> Roaming profiles support is different
1247 for Win9X and WinNT.
1248 </para>
1249 </warning>
1251 <para>
1252 Before discussing how to configure roaming profiles, it is useful to see how
1253 Win9X and WinNT clients implement these features.
1254 </para>
1256 <para>
1257 Win9X clients send a NetUserGetInfo request to the server to get the user's
1258 profiles location. However, the response does not have room for a separate
1259 profiles location field, only the user's home share. This means that Win9X
1260 profiles are restricted to being in the user's home directory.
1261 </para>
1264 <para>
1265 WinNT clients send a NetSAMLogon RPC request, which contains many fields,
1266 including a separate field for the location of the user's profiles.
1267 This means that support for profiles is different for Win9X and WinNT.
1268 </para>
1272 <sect3>
1273 <title>Windows NT Configuration</title>
1275 <para>
1276 To support WinNT clients, in the [global] section of smb.conf set the
1277 following (for example):
1278 </para>
1280 <para><programlisting>
1281 logon path = \\profileserver\profileshare\profilepath\%U\moreprofilepath
1282 </programlisting></para>
1284 <para>
1285 The default for this option is \\%N\%U\profile, namely
1286 \\sambaserver\username\profile. The \\N%\%U service is created
1287 automatically by the [homes] service.
1288 If you are using a samba server for the profiles, you _must_ make the
1289 share specified in the logon path browseable.
1290 </para>
1292 <note>
1293 <para>
1294 [lkcl 26aug96 - we have discovered a problem where Windows clients can
1295 maintain a connection to the [homes] share in between logins. The
1296 [homes] share must NOT therefore be used in a profile path.]
1297 </para>
1298 </note>
1300 </sect3>
1303 <sect3>
1304 <title>Windows 9X Configuration</title>
1306 <para>
1307 To support Win9X clients, you must use the "logon home" parameter. Samba has
1308 now been fixed so that "net use/home" now works as well, and it, too, relies
1309 on the "logon home" parameter.
1310 </para>
1312 <para>
1313 By using the logon home parameter, you are restricted to putting Win9X
1314 profiles in the user's home directory. But wait! There is a trick you
1315 can use. If you set the following in the [global] section of your
1316 smb.conf file:
1317 </para>
1319 <para><programlisting>
1320 logon home = \\%L\%U\.profiles
1321 </programlisting></para>
1323 <para>
1324 then your Win9X clients will dutifully put their clients in a subdirectory
1325 of your home directory called .profiles (thus making them hidden).
1326 </para>
1328 <para>
1329 Not only that, but 'net use/home' will also work, because of a feature in
1330 Win9X. It removes any directory stuff off the end of the home directory area
1331 and only uses the server and share portion. That is, it looks like you
1332 specified \\%L\%U for "logon home".
1333 </para>
1336 </sect3>
1339 <sect3>
1340 <title>Win9X and WinNT Configuration</title>
1342 <para>
1343 You can support profiles for both Win9X and WinNT clients by setting both the
1344 "logon home" and "logon path" parameters. For example:
1345 </para>
1347 <para><programlisting>
1348 logon home = \\%L\%U\.profiles
1349 logon path = \\%L\profiles\%U
1350 </programlisting></para>
1352 <note>
1353 <para>
1354 I have not checked what 'net use /home' does on NT when "logon home" is
1355 set as above.
1356 </para>
1357 </note>
1358 </sect3>
1362 <sect3>
1363 <title>Windows 9X Profile Setup</title>
1365 <para>
1366 When a user first logs in on Windows 9X, the file user.DAT is created,
1367 as are folders "Start Menu", "Desktop", "Programs" and "Nethood".
1368 These directories and their contents will be merged with the local
1369 versions stored in c:\windows\profiles\username on subsequent logins,
1370 taking the most recent from each. You will need to use the [global]
1371 options "preserve case = yes", "short preserve case = yes" and
1372 "case sensitive = no" in order to maintain capital letters in shortcuts
1373 in any of the profile folders.
1374 </para>
1377 <para>
1378 The user.DAT file contains all the user's preferences. If you wish to
1379 enforce a set of preferences, rename their user.DAT file to user.MAN,
1380 and deny them write access to this file.
1381 </para>
1383 <orderedlist>
1384 <listitem>
1385 <para>
1386 On the Windows 95 machine, go to Control Panel | Passwords and
1387 select the User Profiles tab. Select the required level of
1388 roaming preferences. Press OK, but do _not_ allow the computer
1389 to reboot.
1390 </para>
1391 </listitem>
1394 <listitem>
1395 <para>
1396 On the Windows 95 machine, go to Control Panel | Network |
1397 Client for Microsoft Networks | Preferences. Select 'Log on to
1398 NT Domain'. Then, ensure that the Primary Logon is 'Client for
1399 Microsoft Networks'. Press OK, and this time allow the computer
1400 to reboot.
1401 </para>
1402 </listitem>
1404 </orderedlist>
1406 <para>
1407 Under Windows 95, Profiles are downloaded from the Primary Logon.
1408 If you have the Primary Logon as 'Client for Novell Networks', then
1409 the profiles and logon script will be downloaded from your Novell
1410 Server. If you have the Primary Logon as 'Windows Logon', then the
1411 profiles will be loaded from the local machine - a bit against the
1412 concept of roaming profiles, if you ask me.
1413 </para>
1415 <para>
1416 You will now find that the Microsoft Networks Login box contains
1417 [user, password, domain] instead of just [user, password]. Type in
1418 the samba server's domain name (or any other domain known to exist,
1419 but bear in mind that the user will be authenticated against this
1420 domain and profiles downloaded from it, if that domain logon server
1421 supports it), user name and user's password.
1422 </para>
1424 <para>
1425 Once the user has been successfully validated, the Windows 95 machine
1426 will inform you that 'The user has not logged on before' and asks you
1427 if you wish to save the user's preferences? Select 'yes'.
1428 </para>
1430 <para>
1431 Once the Windows 95 client comes up with the desktop, you should be able
1432 to examine the contents of the directory specified in the "logon path"
1433 on the samba server and verify that the "Desktop", "Start Menu",
1434 "Programs" and "Nethood" folders have been created.
1435 </para>
1437 <para>
1438 These folders will be cached locally on the client, and updated when
1439 the user logs off (if you haven't made them read-only by then :-).
1440 You will find that if the user creates further folders or short-cuts,
1441 that the client will merge the profile contents downloaded with the
1442 contents of the profile directory already on the local client, taking
1443 the newest folders and short-cuts from each set.
1444 </para>
1446 <para>
1447 If you have made the folders / files read-only on the samba server,
1448 then you will get errors from the w95 machine on logon and logout, as
1449 it attempts to merge the local and the remote profile. Basically, if
1450 you have any errors reported by the w95 machine, check the Unix file
1451 permissions and ownership rights on the profile directory contents,
1452 on the samba server.
1453 </para>
1455 <para>
1456 If you have problems creating user profiles, you can reset the user's
1457 local desktop cache, as shown below. When this user then next logs in,
1458 they will be told that they are logging in "for the first time".
1459 </para>
1461 <orderedlist>
1462 <listitem>
1463 <para>
1464 instead of logging in under the [user, password, domain] dialog,
1465 press escape.
1466 </para>
1467 </listitem>
1469 <listitem>
1470 <para>
1471 run the regedit.exe program, and look in:
1472 </para>
1474 <para>
1475 HKEY_LOCAL_MACHINE\Windows\CurrentVersion\ProfileList
1476 </para>
1478 <para>
1479 you will find an entry, for each user, of ProfilePath. Note the
1480 contents of this key (likely to be c:\windows\profiles\username),
1481 then delete the key ProfilePath for the required user.
1482 </para>
1484 <para>
1485 [Exit the registry editor].
1486 </para>
1487 </listitem>
1489 <listitem>
1490 <para>
1491 <emphasis>WARNING</emphasis> - before deleting the contents of the
1492 directory listed in
1493 the ProfilePath (this is likely to be c:\windows\profiles\username),
1494 ask them if they have any important files stored on their desktop
1495 or in their start menu. delete the contents of the directory
1496 ProfilePath (making a backup if any of the files are needed).
1497 </para>
1499 <para>
1500 This will have the effect of removing the local (read-only hidden
1501 system file) user.DAT in their profile directory, as well as the
1502 local "desktop", "nethood", "start menu" and "programs" folders.
1503 </para>
1504 </listitem>
1506 <listitem>
1507 <para>
1508 search for the user's .PWL password-caching file in the c:\windows
1509 directory, and delete it.
1510 </para>
1511 </listitem>
1514 <listitem>
1515 <para>
1516 log off the windows 95 client.
1517 </para>
1518 </listitem>
1520 <listitem>
1521 <para>
1522 check the contents of the profile path (see "logon path" described
1523 above), and delete the user.DAT or user.MAN file for the user,
1524 making a backup if required.
1525 </para>
1526 </listitem>
1528 </orderedlist>
1530 <para>
1531 If all else fails, increase samba's debug log levels to between 3 and 10,
1532 and / or run a packet trace program such as tcpdump or netmon.exe, and
1533 look for any error reports.
1534 </para>
1536 <para>
1537 If you have access to an NT server, then first set up roaming profiles
1538 and / or netlogons on the NT server. Make a packet trace, or examine
1539 the example packet traces provided with NT server, and see what the
1540 differences are with the equivalent samba trace.
1541 </para>
1543 </sect3>
1546 <sect3>
1547 <title>Windows NT Workstation 4.0</title>
1549 <para>
1550 When a user first logs in to a Windows NT Workstation, the profile
1551 NTuser.DAT is created. The profile location can be now specified
1552 through the "logon path" parameter.
1553 </para>
1555 <note>
1556 <para>
1557 [lkcl 10aug97 - i tried setting the path to
1558 \\samba-server\homes\profile, and discovered that this fails because
1559 a background process maintains the connection to the [homes] share
1560 which does _not_ close down in between user logins. you have to
1561 have \\samba-server\%L\profile, where user is the username created
1562 from the [homes] share].
1563 </para>
1564 </note>
1566 <para>
1567 There is a parameter that is now available for use with NT Profiles:
1568 "logon drive". This should be set to "h:" or any other drive, and
1569 should be used in conjunction with the new "logon home" parameter.
1570 </para>
1572 <para>
1573 The entry for the NT 4.0 profile is a _directory_ not a file. The NT
1574 help on profiles mentions that a directory is also created with a .PDS
1575 extension. The user, while logging in, must have write permission to
1576 create the full profile path (and the folder with the .PDS extension)
1577 [lkcl 10aug97 - i found that the creation of the .PDS directory failed,
1578 and had to create these manually for each user, with a shell script.
1579 also, i presume, but have not tested, that the full profile path must
1580 be browseable just as it is for w95, due to the manner in which they
1581 attempt to create the full profile path: test existence of each path
1582 component; create path component].
1583 </para>
1585 <para>
1586 In the profile directory, NT creates more folders than 95. It creates
1587 "Application Data" and others, as well as "Desktop", "Nethood",
1588 "Start Menu" and "Programs". The profile itself is stored in a file
1589 NTuser.DAT. Nothing appears to be stored in the .PDS directory, and
1590 its purpose is currently unknown.
1591 </para>
1593 <para>
1594 You can use the System Control Panel to copy a local profile onto
1595 a samba server (see NT Help on profiles: it is also capable of firing
1596 up the correct location in the System Control Panel for you). The
1597 NT Help file also mentions that renaming NTuser.DAT to NTuser.MAN
1598 turns a profile into a mandatory one.
1599 </para>
1601 <note>
1602 <para>
1603 [lkcl 10aug97 - i notice that NT Workstation tells me that it is
1604 downloading a profile from a slow link. whether this is actually the
1605 case, or whether there is some configuration issue, as yet unknown,
1606 that makes NT Workstation _think_ that the link is a slow one is a
1607 matter to be resolved].
1608 </para>
1610 <para>
1611 [lkcl 20aug97 - after samba digest correspondence, one user found, and
1612 another confirmed, that profiles cannot be loaded from a samba server
1613 unless "security = user" and "encrypt passwords = yes" (see the file
1614 ENCRYPTION.txt) or "security = server" and "password server = ip.address.
1615 of.yourNTserver" are used. Either of these options will allow the NT
1616 workstation to access the samba server using LAN manager encrypted
1617 passwords, without the user intervention normally required by NT
1618 workstation for clear-text passwords].
1619 </para>
1621 <para>
1622 [lkcl 25aug97 - more comments received about NT profiles: the case of
1623 the profile _matters_. the file _must_ be called NTuser.DAT or, for
1624 a mandatory profile, NTuser.MAN].
1625 </para>
1626 </note>
1628 </sect3>
1631 <sect3>
1632 <title>Windows NT Server</title>
1634 <para>
1635 There is nothing to stop you specifying any path that you like for the
1636 location of users' profiles. Therefore, you could specify that the
1637 profile be stored on a samba server, or any other SMB server, as long as
1638 that SMB server supports encrypted passwords.
1639 </para>
1641 </sect3>
1644 <sect3>
1645 <title>Sharing Profiles between W95 and NT Workstation 4.0</title>
1647 <warning>
1648 <title>Potentially outdated or incorrect material follows</title>
1649 <para>
1650 I think this is all bogus, but have not deleted it. (Richard Sharpe)
1651 </para>
1652 </warning>
1654 <para>
1655 The default logon path is \\%N\U%. NT Workstation will attempt to create
1656 a directory "\\samba-server\username.PDS" if you specify the logon path
1657 as "\\samba-server\username" with the NT User Manager. Therefore, you
1658 will need to specify (for example) "\\samba-server\username\profile".
1659 NT 4.0 will attempt to create "\\samba-server\username\profile.PDS", which
1660 is more likely to succeed.
1661 </para>
1663 <para>
1664 If you then want to share the same Start Menu / Desktop with W95, you will
1665 need to specify "logon path = \\samba-server\username\profile" [lkcl 10aug97
1666 this has its drawbacks: i created a shortcut to telnet.exe, which attempts
1667 to run from the c:\winnt\system32 directory. this directory is obviously
1668 unlikely to exist on a Win95-only host].
1669 </para>
1671 <para>
1673 If you have this set up correctly, you will find separate user.DAT and
1674 NTuser.DAT files in the same profile directory.
1675 </para>
1677 <note>
1678 <para>
1679 [lkcl 25aug97 - there are some issues to resolve with downloading of
1680 NT profiles, probably to do with time/date stamps. i have found that
1681 NTuser.DAT is never updated on the workstation after the first time that
1682 it is copied to the local workstation profile directory. this is in
1683 contrast to w95, where it _does_ transfer / update profiles correctly].
1684 </para>
1685 </note>
1687 </sect3>
1689 </sect2>
1690 </sect1>
1693 <!-- **********************************************************
1695 Appendix - DOMAIN_CONTROL.txt
1697 *************************************************************** -->
1699 <sect1>
1700 <title>
1701 DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba
1702 </title>
1704 <warning>
1705 <title>Possibly Outdated Material</title>
1707 <para>
1708 This appendix was originally authored by John H Terpstra of
1709 the Samba Team and is included here for posterity.
1710 </para>
1711 </warning>
1714 <para>
1715 <emphasis>NOTE :</emphasis>
1716 The term "Domain Controller" and those related to it refer to one specific
1717 method of authentication that can underly an SMB domain. Domain Controllers
1718 prior to Windows NT Server 3.1 were sold by various companies and based on
1719 private extensions to the LAN Manager 2.1 protocol. Windows NT introduced
1720 Microsoft-specific ways of distributing the user authentication database.
1721 See DOMAIN.txt for examples of how Samba can participate in or create
1722 SMB domains based on shared authentication database schemes other than the
1723 Windows NT SAM.
1724 </para>
1726 <para>
1727 Windows NT Server can be installed as either a plain file and print server
1728 (WORKGROUP workstation or server) or as a server that participates in Domain
1729 Control (DOMAIN member, Primary Domain controller or Backup Domain controller).
1730 The same is true for OS/2 Warp Server, Digital Pathworks and other similar
1731 products, all of which can participate in Domain Control along with Windows NT.
1732 </para>
1734 <para>
1735 To many people these terms can be confusing, so let's try to clear the air.
1736 </para>
1738 <para>
1739 Every Windows NT system (workstation or server) has a registry database.
1740 The registry contains entries that describe the initialization information
1741 for all services (the equivalent of Unix Daemons) that run within the Windows
1742 NT environment. The registry also contains entries that tell application
1743 software where to find dynamically loadable libraries that they depend upon.
1744 In fact, the registry contains entries that describes everything that anything
1745 may need to know to interact with the rest of the system.
1746 </para>
1748 <para>
1749 The registry files can be located on any Windows NT machine by opening a
1750 command prompt and typing:
1751 </para>
1753 <para>
1754 <prompt>C:\WINNT\></prompt> dir %SystemRoot%\System32\config
1755 </para>
1757 <para>
1758 The environment variable %SystemRoot% value can be obtained by typing:
1759 </para>
1761 <para>
1762 <prompt>C:\WINNT></prompt>echo %SystemRoot%
1763 </para>
1765 <para>
1766 The active parts of the registry that you may want to be familiar with are
1767 the files called: default, system, software, sam and security.
1768 </para>
1770 <para>
1771 In a domain environment, Microsoft Windows NT domain controllers participate
1772 in replication of the SAM and SECURITY files so that all controllers within
1773 the domain have an exactly identical copy of each.
1774 </para>
1776 <para>
1777 The Microsoft Windows NT system is structured within a security model that
1778 says that all applications and services must authenticate themselves before
1779 they can obtain permission from the security manager to do what they set out
1780 to do.
1781 </para>
1783 <para>
1784 The Windows NT User database also resides within the registry. This part of
1785 the registry contains the user's security identifier, home directory, group
1786 memberships, desktop profile, and so on.
1787 </para>
1789 <para>
1790 Every Windows NT system (workstation as well as server) will have its own
1791 registry. Windows NT Servers that participate in Domain Security control
1792 have a database that they share in common - thus they do NOT own an
1793 independent full registry database of their own, as do Workstations and
1794 plain Servers.
1795 </para>
1797 <para>
1798 The User database is called the SAM (Security Access Manager) database and
1799 is used for all user authentication as well as for authentication of inter-
1800 process authentication (i.e. to ensure that the service action a user has
1801 requested is permitted within the limits of that user's privileges).
1802 </para>
1804 <para>
1805 The Samba team have produced a utility that can dump the Windows NT SAM into
1806 smbpasswd format: see ENCRYPTION.txt for information on smbpasswd and
1807 /pub/samba/pwdump on your nearest Samba mirror for the utility. This
1808 facility is useful but cannot be easily used to implement SAM replication
1809 to Samba systems.
1810 </para>
1812 <para>
1813 Windows for Workgroups, Windows 95, and Windows NT Workstations and Servers
1814 can participate in a Domain security system that is controlled by Windows NT
1815 servers that have been correctly configured. Almost every domain will have
1816 ONE Primary Domain Controller (PDC). It is desirable that each domain will
1817 have at least one Backup Domain Controller (BDC).
1818 </para>
1820 <para>
1821 The PDC and BDCs then participate in replication of the SAM database so that
1822 each Domain Controlling participant will have an up to date SAM component
1823 within its registry.
1824 </para>
1826 </sect1>
1828 </chapter>