2 !== NTDOMAIN.txt for Samba release 1.9.18alpha14 24 Dec 1997
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
9 Subject: NT Domain Logons
10 ===========================================================================
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.
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.
25 The support is still experimental, so should be used at your own risk.
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.
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
39 This *has* been reported to the NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM digest.
42 Domain Logons using 1.9.18alpha1
43 ================================
45 1) compile samba with -DNTDOMAIN
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).
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.
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. lkcl02nov97 - done, as of 1.9.18alpha11! added new options
58 "domain hosts allow/deny" too :-) ]
60 4) if using NT server to log in, run the User Manager for Domains, and
61 add the capability to "Log in Locally" to the policies, which you would
62 have to do even if you were logging in to another NT PDC instead of a
65 5) set up the following parameters in smb.conf
67 ; substitute your workgroup here
70 ; a description of domain sids can be found elsewhere.
71 ; you **MUST** begin the domain SID with S-1-5-21.
72 ; the rest is up to you.
73 domain sid = S-1-5-21-123-456-789-123
75 ; tells workstations to use SAMBA as its Primary Domain Controller.
78 6) make sure samba is running before the next step is carried out. if
79 this is your first time, just for fun you might like to switch the
80 debug log level to about 10. the NT pipes produces some very pretty
81 output when decoding requests and generating responses, which would
82 be particularly useful to see in tcpdump at some point.
84 7) In the NT Network Settings, change the domain to SAMBA. Do
85 not attempt to create an account using the other part of the dialog:
86 it will fail at present.
88 You should get a wonderful message saying "Welcome to the SAMBA Domain."
90 If you don't, then please first increase your debug log levels and also
91 get a tcpdump (or preferably NetMonitor) trace and examine it carefully.
92 You should see a NETLOGON, a SAMLOGON on UDP port 138. If you don't,
93 then you probably don't have "domain logons = yes" or there is some other
94 problem in resolving the NetBIOS name SAMBA<1c>.
96 On port 139, you should see a LSA_OPEN_POLICY, two LSA_QUERY_INFOs (one
97 for a domain SID of S-1-3... and another for S-1-5) and then an LSA_CLOSE
100 You may see a pipe connection to a wksta service being refused: this
101 is acceptable, we have found. You may also see a "Net Server Get Info"
102 being issued on the srvsvc pipe.
104 Assuming you got the Welcome message, go through the obligatory reboot...
106 8) When pressing Ctrl-Alt-Delete, the NT login box should have three entries.
107 If there is a delay of about twenty seconds between pressing Ctrl-Alt-Delete
108 and the appearance of this login dialog, then there might be a problem:
109 at this stage the workstation is issuing an LSA_ENUMTRUSTEDDOMAIN request
111 The domain box should have two entries: the hostname and the SAMBA domain.
112 Any local accounts are under the hostname domain, from which you will be
113 able to shut down the machine etc. At present, we do not specify that
114 the NT user logging in is a member of any groups, so will have no
115 priveleges, including the ability to shut down the machine [lkcl02nov97 -
116 done, as of samba-1.9.18alpha3! see "domain admin/guest users" and
117 "domain groups" parameters].
119 Select the SAMBA domain, and type in a valid username and password for
120 which there is a valid entry in the samba server's smbpasswd LM/NT OWF
121 database. At present, the password is ignored, to allow access to the
122 domain, but *not* ignored for accesses to Samba's SMB services: that's
123 completely separate from the SAM Logon process. Even if you log in a
124 user to a domain, your users will still need to connect to Samba SMB
125 shares with valid username / passwords, for that share.
127 You should see an LSA_REQ_CHAL, followed by LSA_AUTH2, LSA_NET_SRV_PWSET,
128 and LSA_SAM_LOGON. The SAM Logon will be particularly large (the response
129 can be approximately 600 bytes) as it contains user info.
131 Also, there will probably be a "Net Server Get Info" and a "Net Share Enum"
132 amongst this lot. If the SAM Logon is successful, the dialog should
133 disappear, and a standard SMB connection established to download the
134 profile specified in the SAM Logon (if it was).
136 At this point, you _may_ encounter difficulties in creating a remote
137 profile, and the login may terminate (generating an LSA_SAM_LOGOFF). If
138 this occurs, then either find an existing profile on the samba server and
139 copy it into the location specified by the "logon path" smb.conf parameter
140 for the user logging in, or log in on the local machine, and use the
141 System | Profiles control panel to make a copy of the _local_ profile onto
142 the samba server. This process is described and documented in the NT
145 9) Play around. Look at the Samba Server: see if it can be found in the
146 browse lists. Check that it is accessible; run some applications.
147 Generally stress things. Laugh a lot. Logout of the NT machine
148 (generating an LSA_SAM_LOGOFF) and log back in again. Try logging in
149 two users simultaneously. Try logging the same user in twice.
150 Make Samba fall over, and then send bug reports to us, with NTDOM: at
151 the start of the subject line, as "samba-bugs@samba.anu.edu.au".
153 Your reports, testing, patches, criticism and encouragement will help us