91417186ba07990d0f1490ceb2a52b8dcd6b7a36
[bbaumbach/samba-autobuild/.git] / docs / textdocs / NTDOMAIN.txt
1 !==
2 !== NTDOMAIN.txt for Samba release 2.0.0-beta1 13 Nov 1998
3 !==
4 Contributor:    Luke Kenneth Casson Leighton (samba-bugs@samba.anu.edu.au)
5                 Copyright (C) 1997 Luke Kenneth Casson Leighton
6 Created:        October 20, 1997
7 Updated:        October 29, 1997
8
9 Subject:        NT Domain Logons
10 ===========================================================================
11
12 As of 1.9.18alpha1, Samba supports logins for NT 3.51 and 4.0 Workstations,
13 without the need, use or intervention of NT Server.  This document describes
14 how to set this up.  Over the continued development of the 1.9.18alpha
15 series, this process (and therefore this document) should become simpler.
16
17 One useful thing to do is to get this version of Samba up and running
18 with Win95 profiles, as you would for the current stable version of
19 Samba (currently at 1.9.17p4), and is fully documented.  You will need
20 to set up encrypted passwords.  Even if you don't have any Win95 machines,
21 using your Samba Server to store the profile for one of your NT Workstation
22 users is a good test that you have 1.9.18alpha1 correctly configured *prior*
23 to attempting NT Domain Logons.
24
25 The support is still experimental, so should be used at your own risk.
26
27 NT is not as robust as you might have been led to believe: during the
28 development of the Domain Logon Support, one person reported having to
29 reinstall NT from scratch: their workstation had become totally unuseable.
30
31 [further reports on ntsec@iss.net by independent administrators showing
32  similar symptoms lead us to believe that the SAM database file may be
33  corruptible.  this _is_ recoverable (or, at least the machine is accessible),
34  by deleting the SAM file, under which circumstances all user account details
35  are lost, but at least the Administrator can log in with a blank password.
36  this is *not* possible except if the NT system is installed in a FAT
37  partition.]
38
39 This *has* been reported to the NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM digest.
40
41
42 Domain Logons using latest cvs source
43 =====================================
44
45 1) obtain and compile samba: see http://samba.anu.edu.au/cvs.html
46
47 2) set up samba with encrypted passwords: see ENCRYPTION.txt (probably out
48    of date: you no longer need the DES libraries, but other than that,
49    ENCRYPTION.txt is current).
50
51    at this point, you ought to test that your samba server is accessible
52    correctly with encrypted passwords, before progressing with any of the
53    NT workstation-specific bits: it's up to you.
54
55 3) [ for each workstation, add a line to smbpasswd with a username of MACHINE$
56      and a password of "machine".  this process will be automated in further
57      releases (but for now use smbpasswd -m machine_name).
58
59 4) if using NT server to log in, run the User Manager for Domains, and
60    add the capability to "Log in Locally" to the policies, which you would
61    have to do even if you were logging in to another NT PDC instead of a
62    Samba PDC.
63
64 5) set up the following parameters in smb.conf
65
66 ;       substitute your workgroup here
67         workgroup = SAMBA
68
69 ;       DO NOT add the redundant "domain sid = " parameter as this has
70 ;       been superseded by code that automatically generates a random
71 ;       sid for you.
72 ;       domain sid = redundant.
73
74 ;       tells workstations to use SAMBA as its Primary Domain Controller.
75         domain logons = yes
76
77 6) make sure samba is running before the next step is carried out.  if
78    this is your first time, just for fun you might like to switch the
79    debug log level to about 10.  the NT pipes produces some very pretty
80    output when decoding requests and generating responses, which would
81    be particularly useful to see in tcpdump at some point.
82
83 7) In the NT Network Settings, change the domain to SAMBA.  Do
84    not attempt to create an account using the other part of the dialog:
85    it will fail at present.
86
87    You should get a wonderful message saying "Welcome to the SAMBA Domain."
88
89    If you don't, then please first increase your debug log levels and also
90    get a tcpdump (or preferably NetMonitor) trace and examine it carefully.
91    You should see a NETLOGON, a SAMLOGON on UDP port 138.  If you don't,
92    then you probably don't have "domain logons = yes" or there is some other
93    problem in resolving the NetBIOS name SAMBA<1c>.
94
95    On port 139, you should see a LSA_OPEN_POLICY, two LSA_QUERY_INFOs (one
96    for a domain SID of S-1-3... and another for S-1-5) and then an LSA_CLOSE
97    or two.  
98
99    You may see a pipe connection to a wksta service being refused: this
100    is acceptable, we have found.  You may also see a "Net Server Get Info"
101    being issued on the srvsvc pipe.
102
103    Assuming you got the Welcome message, go through the obligatory reboot...
104
105 8) When pressing Ctrl-Alt-Delete, the NT login box should have three entries.
106    If there is a delay of about twenty seconds between pressing Ctrl-Alt-Delete
107    and the appearance of this login dialog, then there might be a problem:
108    at this stage the workstation is issuing an LSA_ENUMTRUSTEDDOMAIN request
109
110    The domain box should have two entries: the hostname and the SAMBA domain.
111    Any local accounts are under the hostname domain, from which you will be
112    able to shut down the machine etc.
113    
114    Select the SAMBA domain, and type in a valid username and password for
115    which there is a valid entry in the samba server's smbpasswd LM/NT OWF
116    database.  At present, the password is ignored, to allow access to the
117    domain, but *not* ignored for accesses to Samba's SMB services: that's
118    completely separate from the SAM Logon process.  Even if you log in a
119    user to a domain, your users will still need to connect to Samba SMB
120    shares with valid username / passwords, for that share.
121
122    You should see an LSA_REQ_CHAL, followed by LSA_AUTH2, LSA_NET_SRV_PWSET,
123    and LSA_SAM_LOGON.  The SAM Logon will be particularly large (the response
124    can be approximately 600 bytes) as it contains user info.
125
126    Also, there will probably be a "Net Server Get Info" and a "Net Share Enum"
127    amongst this lot.  If the SAM Logon is successful, the dialog should
128    disappear, and a standard SMB connection established to download the
129    profile specified in the SAM Logon (if it was).
130
131    At this point, you _may_ encounter difficulties in creating a remote
132    profile, and the login may terminate (generating an LSA_SAM_LOGOFF).  If
133    this occurs, then either find an existing profile on the samba server and
134    copy it into the location specified by the "logon path" smb.conf parameter
135    for the user logging in, or log in on the local machine, and use the
136    System | Profiles control panel to make a copy of the _local_ profile onto
137    the samba server.  This process is described and documented in the NT
138    Help Files.
139
140 9) Play around.  Look at the Samba Server: see if it can be found in the
141    browse lists.  Check that it is accessible; run some applications.
142    Generally stress things.  Laugh a lot.  Logout of the NT machine
143    (generating an LSA_SAM_LOGOFF) and log back in again.  Try logging in
144    two users simultaneously.  Try logging the same user in twice.
145    Make Samba fall over, and then send bug reports to us, with NTDOM: at
146    the start of the subject line, as "samba-bugs@samba.anu.edu.au".
147
148 Your reports, testing, patches, criticism and encouragement will help us
149 get this right.
150