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