1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Samba as a NT4 domain member</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
11 TITLE="SAMBA Project Documentation"
12 HREF="samba-howto-collection.html"><LINK
14 TITLE="Type of installation"
15 HREF="type.html"><LINK
17 TITLE="Samba as a ADS domain member"
20 TITLE="Optional configuration"
21 HREF="optional.html"></HEAD
32 SUMMARY="Header navigation table"
41 >SAMBA Project Documentation</TH
76 NAME="DOMAIN-SECURITY">Chapter 9. Samba as a NT4 domain member</H1
82 NAME="AEN1273">9.1. Joining an NT Domain with Samba 2.2</H1
84 >Assume you have a Samba 2.x server with a NetBIOS name of
88 > and are joining an NT domain called
92 >, which has a PDC with a NetBIOS name
96 > and two backup domain controllers
97 with NetBIOS names <TT
106 >In order to join the domain, first stop all Samba daemons
107 and run the command:</P
115 >smbpasswd -j DOM -r DOMPDC
119 >Administrator%password</I
125 >as we are joining the domain DOM and the PDC for that domain
126 (the only machine that has write access to the domain SAM database)
130 >Administrator%password</I
133 the login name and password for an account which has the necessary
134 privilege to add machines to the domain. If this is successful
135 you will see the message:</P
138 CLASS="COMPUTEROUTPUT"
139 >smbpasswd: Joined domain DOM.</TT
143 >in your terminal window. See the <A
144 HREF="smbpasswd.8.html"
147 > man page for more details.</P
149 >There is existing development code to join a domain
150 without having to create the machine trust account on the PDC
151 beforehand. This code will hopefully be available soon
152 in release branches as well.</P
154 >This command goes through the machine account password
155 change protocol, then writes the new (random) machine account
156 password for this Samba server into a file in the same directory
157 in which an smbpasswd file would be stored - normally :</P
161 >/usr/local/samba/private</TT
164 >In Samba 2.0.x, the filename looks like this:</P
171 ><NT DOMAIN NAME></I
185 > suffix stands for machine account
186 password file. So in our example above, the file would be called:</P
193 >In Samba 2.2, this file has been replaced with a TDB
194 (Trivial Database) file named <TT
200 >This file is created and owned by root and is not
201 readable by any other user. It is the key to the domain-level
202 security for your system, and should be treated as carefully
203 as a shadow password file.</P
205 >Now, before restarting the Samba daemons you must
207 HREF="smb.conf.5.html"
214 > file to tell Samba it should now use domain security.</P
216 >Change (or add) your <A
217 HREF="smb.conf.5.html#SECURITY"
225 > line in the [global] section
226 of your smb.conf to read:</P
230 >security = domain</B
234 HREF="smb.conf.5.html#WORKGROUP"
242 > line in the [global] section to read: </P
249 >as this is the name of the domain we are joining. </P
251 >You must also have the parameter <A
252 HREF="smb.conf.5.html#ENCRYPTPASSWORDS"
257 >encrypt passwords</I
264 > in order for your users to authenticate to the NT PDC.</P
266 >Finally, add (or modify) a <A
267 HREF="smb.conf.5.html#PASSWORDSERVER"
272 >password server =</I
275 > line in the [global]
280 >password server = DOMPDC DOMBDC1 DOMBDC2</B
283 >These are the primary and backup domain controllers Samba
284 will attempt to contact in order to authenticate users. Samba will
285 try to contact each of these servers in order, so you may want to
286 rearrange this list in order to spread out the authentication load
287 among domain controllers.</P
289 >Alternatively, if you want smbd to automatically determine
290 the list of Domain controllers to use for authentication, you may
291 set this line to be :</P
295 >password server = *</B
298 >This method, which was introduced in Samba 2.0.6,
299 allows Samba to use exactly the same mechanism that NT does. This
300 method either broadcasts or uses a WINS database in order to
301 find domain controllers to authenticate against.</P
303 >Finally, restart your Samba daemons and get ready for
304 clients to begin using domain security!</P
311 NAME="AEN1337">9.2. Samba and Windows 2000 Domains</H1
313 >Many people have asked regarding the state of Samba's ability to participate in
314 a Windows 2000 Domain. Samba 3.0 is able to act as a member server of a Windows
315 2000 domain operating in mixed or native mode.</P
317 >There is much confusion between the circumstances that require a "mixed" mode
318 Win2k DC and a when this host can be switched to "native" mode. A "mixed" mode
319 Win2k domain controller is only needed if Windows NT BDCs must exist in the same
320 domain. By default, a Win2k DC in "native" mode will still support
321 NetBIOS and NTLMv1 for authentication of legacy clients such as Windows 9x and
322 NT 4.0. Samba has the same requirements as a Windows NT 4.0 member server.</P
324 >The steps for adding a Samba 2.2 host to a Win2k domain are the same as those
325 for adding a Samba server to a Windows NT 4.0 domain. The only exception is that
326 the "Server Manager" from NT 4 has been replaced by the "Active Directory Users and
327 Computers" MMC (Microsoft Management Console) plugin.</P
334 NAME="AEN1342">9.3. Why is this better than security = server?</H1
336 >Currently, domain security in Samba doesn't free you from
337 having to create local Unix users to represent the users attaching
338 to your server. This means that if domain user <TT
342 > attaches to your domain security Samba server, there needs
343 to be a local Unix user fred to represent that user in the Unix
344 filesystem. This is very similar to the older Samba security mode
346 HREF="smb.conf.5.html#SECURITYEQUALSSERVER"
348 >security = server</A
350 where Samba would pass through the authentication request to a Windows
351 NT server in the same way as a Windows 95 or Windows 98 server would.
354 >Please refer to the <A
359 > for information on a system to automatically
360 assign UNIX uids and gids to Windows NT Domain users and groups.
361 This code is available in development branches only at the moment,
362 but will be moved to release branches soon.</P
364 >The advantage to domain-level security is that the
365 authentication in domain-level security is passed down the authenticated
366 RPC channel in exactly the same way that an NT server would do it. This
367 means Samba servers now participate in domain trust relationships in
368 exactly the same way NT servers do (i.e., you can add Samba servers into
369 a resource domain and have the authentication passed on from a resource
370 domain PDC to an account domain PDC.</P
372 >In addition, with <B
374 >security = server</B
376 daemon on a server has to keep a connection open to the
377 authenticating server for as long as that daemon lasts. This can drain
378 the connection resources on a Microsoft NT server and cause it to run
379 out of available connections. With <B
381 >security = domain</B
383 however, the Samba daemons connect to the PDC/BDC only for as long
384 as is necessary to authenticate the user, and then drop the connection,
385 thus conserving PDC connection resources.</P
387 >And finally, acting in the same manner as an NT server
388 authenticating to a PDC means that as part of the authentication
389 reply, the Samba server gets the user identification information such
390 as the user SID, the list of NT groups the user belongs to, etc. All
391 this information will allow Samba to be extended in the future into
392 a mode the developers currently call appliance mode. In this mode,
393 no local Unix users will be necessary, and Samba will generate Unix
394 uids and gids from the information passed back from the PDC when a
395 user is authenticated, making a Samba server truly plug and play
396 in an NT domain environment. Watch for this code soon.</P
404 > Much of the text of this document
405 was first published in the Web magazine <A
406 HREF="http://www.linuxworld.com"
411 HREF="http://www.linuxworld.com/linuxworld/lw-1998-10/lw-10-samba.html"
423 SUMMARY="Footer navigation table"
443 HREF="samba-howto-collection.html"
462 >Samba as a ADS domain member</TD
476 >Optional configuration</TD