added full netbench simulation in smbtorture. It now reads a 4MB load
[Samba/gbeck.git] / docs / yodldocs / DOMAIN_MEMBER.yo
blob52b6d40088d1e4c062895e3fd18bd226eaed1fb2
1 mailto(samba-bugs@samba.org)
3 article(Joining an NT Domain with Samba 2.0)(Jeremy Allison, Samba Team)(11th November 1998)
5 center(Joining an NT Domain with Samba 2.0)
6 center(-----------------------------------)
8 In order for a Samba-2 server to join an NT domain, you must first add
9 the NetBIOS name of the Samba server to the NT domain on the PDC using
10 Server Manager for Domains.  This creates the machine account in the
11 domain (PDC) SAM.
13 Assume you have a Samba-2 server with a NetBIOS name of tt(SERV1) and are
14 joining an NT domain called tt(DOM), which has a PDC with a NetBIOS name
15 of tt(DOMPDC) and two backup domain controllers with NetBIOS names tt(DOMBDC1)
16 and tt(DOMBDC2).
18 In order to join the domain, first stop all Samba daemons and run the
19 command
21 tt(smbpasswd -j DOM -r DOMPDC)
23 as we are joining the domain DOM and the PDC for that domain (the only
24 machine that has write access to the domain SAM database). If this is
25 successful you will see the message:
27 tt(smbpasswd: Joined domain DOM.)
29 in your terminal window. See the url(bf(smbpasswd))(smbpasswd.8.html)
30 man page for more details.
32 This command goes through the machine account password change
33 protocol, then writes the new (random) machine account password for
34 this Samba server into the a file in the same directory in which an
35 smbpasswd file would be stored (normally :
37 tt(/usr/local/samba/private)
39 The filename looks like this:
41 tt(<NT DOMAIN NAME>.<Samba Server Name>.mac)
43 The tt(.mac) suffix stands for machine account password file. So in
44 our example above, the file would be called:
46 tt(DOM.SERV1.mac)
48 This file is created and owned by root and is not readable by any
49 other user. It is the key to the domain-level security for your
50 system, and should be treated as carefully as a shadow password file.
52 Now, before restarting the Samba daemons you must edit your
53 url(bf(smb.conf))(smb.conf.5.html) file to tell Samba it should now
54 use domain security.
56 Change (or add) your 
58 url(bf("security ="))(smb.conf.5.html#security)
60 line in the url(bf([global]))(smb.conf.5.html#global) section of your
61 url(bf(smb.conf))(smb.conf.5.html) to read:
63 tt(security = domain)
65 Next change the 
67 url(bf("workgroup ="))(smb.conf.5.html#workgroup)
69 line in the url(bf([global]))(smb.conf.5.html#global) section to read: 
71 tt(workgroup = DOM)
73 as this is the name of the domain we are joining. 
75 You must also have the parameter url(bf("encrypt passwords"))(smb.conf.5.html#encryptpasswords)
76 set to tt("yes") in order for your users to authenticate to the
77 NT PDC.
79 Finally, add (or modify) a:
81 url(bf("password server ="))(smb.conf.5.html#passwordserver)
83 line in the url(bf([global]))(smb.conf.5.html#global) section to read: 
85 tt(password server = DOMPDC DOMBDC1 DOMBDC2)
87 These are the primary and backup domain controllers Samba will attempt
88 to contact in order to authenticate users. Samba will try to contact
89 each of these servers in order, so you may want to rearrange this list
90 in order to spread out the authentication load among domain
91 controllers.
93 Currently, Samba requires that a defined list of domain controllers be
94 listed in this parameter in order to authenticate with domain-level
95 security. NT does not use this method, and will either broadcast or
96 use a WINS database in order to find domain controllers to
97 authenticate against.
99 Originally, I considered this idea for Samba, but dropped it because
100 it seemed so insecure.  However several Samba-2 alpha users have
101 requested that this feature be added to make Samba more NT-like, so
102 I'll probably add a special name of tt('*') (which means: act like NT
103 when looking for domain controllers) in a future release of the
104 code. At present, however, you need to know where your domain
105 controllers are.
107 Finally, restart your Samba daemons and get ready for clients to begin
108 using domain security!
111 center(Why is this better than security = server?)
112 center(------------------------------------------)
114 Currently, domain security in Samba doesn't free you from having to
115 create local Unix users to represent the users attaching to your
116 server. This means that if domain user tt(DOM\fred) attaches to your
117 domain security Samba server, there needs to be a local Unix user fred
118 to represent that user in the Unix filesystem. This is very similar to
119 the older Samba security mode url(bf("security=server"))(smb.conf.5.html#securityequalserver), where Samba would pass
120 through the authentication request to a Windows NT server in the same
121 way as a Windows 95 or Windows 98 server would.
123 The advantage to domain-level security is that the authentication in
124 domain-level security is passed down the authenticated RPC channel in
125 exactly the same way that an NT server would do it. This means Samba
126 servers now participate in domain trust relationships in exactly the
127 same way NT servers do (i.e., you can add Samba servers into a
128 resource domain and have the authentication passed on from a resource
129 domain PDC to an account domain PDC.
131 In addition, with url(bf("security=server"))(smb.conf.5.html#securityequalserver) every Samba daemon on a
132 server has to keep a connection open to the authenticating server for
133 as long as that daemon lasts. This can drain the connection resources
134 on a Microsoft NT server and cause it to run out of available
135 connections. With url(bf("security =domain"))(smb.conf.5.html#securityequaldomain), however, the Samba
136 daemons connect to the PDC/BDC only for as long as is necessary to
137 authenticate the user, and then drop the connection, thus conserving
138 PDC connection resources.
140 And finally, acting in the same manner as an NT server authenticating
141 to a PDC means that as part of the authentication reply, the Samba
142 server gets the user identification information such as the user SID,
143 the list of NT groups the user belongs to, etc. All this information
144 will allow Samba to be extended in the future into a mode the
145 developers currently call appliance mode. In this mode, no local Unix
146 users will be necessary, and Samba will generate Unix uids and gids
147 from the information passed back from the PDC when a user is
148 authenticated, making a Samba server truly plug and play in an NT
149 domain environment. Watch for this code soon.
151 em(NOTE:) Much of the text of this document was first published in the
152 Web magazine url(bf("LinuxWorld"))(http://www.linuxworld.com) as the article url(bf("Doing the NIS/NT Samba"))(http://www.linuxworld.com/linuxworld/lw-1998-10/lw-10-samba.html).