Very large number of markup fixes, layout updates, etc.
[nivanova/samba-autobuild/.git] / docs / docbook / projdoc / InterdomainTrusts.xml
1 <chapter id="InterdomainTrusts">
2 <chapterinfo>
3         &author.jht;
4         &author.mimir;
5         <pubdate>April 3, 2003</pubdate>
6 </chapterinfo>
7
8 <title>Interdomain Trust Relationships</title>
9
10 <para>
11 Samba-3 supports NT4 style domain trust relationships. This is feature that many sites
12 will want to use if they migrate to Samba-3 from and NT4 style domain and do NOT want to
13 adopt Active Directory or an LDAP based authentication back end. This section explains
14 some background information regarding trust relationships and how to create them. It is now
15 possible for Samba-3 to NT4 trust (and vice versa), as well as Samba3 to Samba3 trusts.
16 </para>
17
18 <sect1>
19 <title>Features and Benefits</title>
20
21 <para>
22 Samba-3 can participate in Samba-to-Samba as well as in Samba-to-MS Windows NT4 style
23 trust relationships. This imparts to Samba similar scalability as is possible with
24 MS Windows NT4.
25 </para>
26
27 <para>
28 Given that Samba-3 has the capability to function with a scalable backend authentication
29 database such as LDAP, and given it's ability to run in Primary as well as Backup Domain control
30 modes, the administrator would be well advised to consider alternatives to the use of
31 Interdomain trusts simplt because by the very nature of how this works it is fragile.
32 That was after all a key reason for the development and adoption of Microsoft Active Directory.
33 </para>
34
35 </sect1>
36
37 <sect1>
38 <title>Trust Relationship Background</title>
39
40 <para>
41 MS Windows NT3.x/4.0 type security domains employ a non-hierarchical security structure.
42 The limitations of this architecture as it affects the scalability of MS Windows networking
43 in large organisations is well known. Additionally, the flat-name space that results from
44 this design significantly impacts the delegation of administrative responsibilities in
45 large and diverse organisations.
46 </para>
47
48 <para>
49 Microsoft developed Active Directory Service (ADS), based on Kerberos and LDAP, as a means
50 of circumventing the limitations of the older technologies. Not every organisation is ready
51 or willing to embrace ADS. For small companies the older NT4 style domain security paradigm
52 is quite adequate, there thus remains an entrenched user base for whom there is no direct
53 desire to go through a disruptive change to adopt ADS.
54 </para>
55
56 <para>
57 Microsoft introduced with MS Windows NT the ability to allow differing security domains
58 to affect a mechanism so that users from one domain may be given access rights and privileges
59 in another domain. The language that describes this capability is couched in terms of
60 <emphasis>Trusts</emphasis>. Specifically, one domain will <emphasis>trust</emphasis> the users
61 from another domain. The domain from which users are available to another security domain is
62 said to be a trusted domain. The domain in which those users have assigned rights and privileges
63 is the trusting domain. With NT3.x/4.0 all trust relationships are always in one direction only,
64 thus if users in both domains are to have privileges and rights in each others' domain, then it is
65 necessary to establish two (2) relationships, one in each direction.
66 </para>
67
68 <para>
69 In an NT4 style MS security domain, all trusts are non-transitive. This means that if there
70 are three (3) domains (let's call them RED, WHITE, and BLUE) where RED and WHITE have a trust
71 relationship, and WHITE and BLUE have a trust relationship, then it holds that there is no
72 implied trust between the RED and BLUE domains. ie: Relationships are explicit and not
73 transitive.
74 </para>
75
76 <para>
77 New to MS Windows 2000 ADS security contexts is the fact that trust relationships are two-way
78 by default. Also, all inter-ADS domain trusts are transitive. In the case of the RED, WHITE and BLUE
79 domains above, with Windows 2000 and ADS the RED and BLUE domains CAN trust each other. This is
80 an inherent feature of ADS domains. Samba-3 implements MS Windows NT4
81 style Interdomain trusts and interoperates with MS Windows 200x ADS
82 security domains in similar manner to MS Windows NT4 style domains.
83 </para>
84
85 </sect1>
86
87 <sect1>
88 <title>Native MS Windows NT4 Trusts Configuration</title>
89
90 <para>
91 There are two steps to creating an interdomain trust relationship.
92 </para>
93
94 <sect2>
95 <title>NT4 as the Trusting Domain (ie. creating the trusted account)</title>
96
97 <para>
98 For MS Windows NT4, all domain trust relationships are configured using the 
99 <application>Domain User Manager</application>. To affect a two way trust relationship it is 
100 necessary for each domain administrator to make available (for use by an external domain) it's 
101 security resources. This is done from the Domain User Manager Policies entry on the menu bar. 
102 From the <guimenu>Policy</guimenu> menu, select <guimenuitem>Trust Relationships</guimenuitem>, then
103 next to the lower box that is labelled <guilabel>Permitted to Trust this Domain</guilabel> are two 
104 buttons, <guibutton>Add</guibutton> and <guibutton>Remove</guibutton>. The <guibutton>Add</guibutton>
105 button will open a panel in which needs to be entered the remote domain that will be able to assign
106 user rights to your domain. In addition it is necessary to enter a password
107 that is specific to this trust relationship. The password needs to be
108 typed twice (for standard confirmation).
109 </para>
110
111 </sect2>
112
113 <sect2>
114 <title>NT4 as the Trusted Domain (ie. creating trusted account's password)</title>
115
116 <para>
117 A trust relationship will work only when the other (trusting) domain makes the appropriate connections
118 with the trusted domain. To consumate the trust relationship the administrator will launch the
119 Domain User Manager, from the menu select Policies, then select Trust Relationships, then click on the
120 <guibutton>Add</guibutton> button that is next to the box that is labelled 
121 <guilabel>Trusted Domains</guilabel>. A panel will open in which must be entered the name of the remote 
122 domain as well as the password assigned to that trust.
123 </para>
124
125 </sect2>
126 </sect1>
127
128 <sect1>
129 <title>Configuring Samba NT-style Domain Trusts</title>
130
131 <para>
132 This description is meant to be a fairly short introduction about how to set up a Samba server so
133 that it could participate in interdomain trust relationships. Trust relationship support in Samba
134 is in its early stage, so lot of things don't work yet.
135 </para>
136
137 <para>
138 Each of the procedures described below is treated as they were performed with Windows NT4 Server on
139 one end. The remote end could just as well be another Samba-3 domain. It can be clearly seen, after
140 reading this document, that combining Samba-specific parts of what's written below leads to trust
141 between domains in purely Samba environment.
142 </para>
143
144 <sect2>
145 <title>Samba-3 as the Trusting Domain</title>
146
147 <para>
148 In order to set the Samba PDC to be the trusted party of the relationship first you need
149 to create special account for the domain that will be the trusting party. To do that,
150 you can use the 'smbpasswd' utility. Creating the trusted domain account is very
151 similiar to creating a trusted machine account. Suppose, your domain is
152 called SAMBA, and the remote domain is called RUMBA. The first step
153 will be to issue this command from your favourite shell:
154 </para>
155
156 <para>
157 <screen>
158 &rootprompt; <userinput>smbpasswd -a -i rumba</userinput>
159         New SMB password: XXXXXXXX
160         Retype SMB password: XXXXXXXX
161         Added user rumba$
162 </screen>
163
164 where <option>-a</option> means to add a new account into the
165 passdb database and <option>-i</option> means: ''create this
166 account with the InterDomain trust flag''
167 </para>
168
169 <para>
170 The account name will be 'rumba$' (the name of the remote domain)
171 </para>
172
173 <para>
174 After issuing this command you'll be asked to enter the password for
175 the account. You can use any password you want, but be aware that Windows NT will
176 not change this password until 7 days following account creation.
177 After the command returns successfully, you can look at the entry for the new account
178 (in the stardard way depending on your configuration) and see that account's name is
179 really RUMBA$ and it has 'I' flag in the flags field. Now you're ready to confirm
180 the trust by establishing it from Windows NT Server.
181 </para>
182
183 <para>
184 Open <application>User Manager for Domains</application> and from menu
185 <guimenu>Policies</guimenu> select <guimenuitem>Trust Relationships...</guimenuitem>.
186 Right beside <guilabel>Trusted domains</guilabel> list box press the 
187 <guimenu>Add...</guimenu> button. You will be prompted for
188 the trusted domain name and the relationship password. Type in SAMBA, as this is
189 your domain name, and the password used at the time of account creation.
190 Press OK and, if everything went without incident, you will see 
191 <computeroutput>Trusted domain relationship successfully 
192 established</computeroutput> message.
193 </para>
194
195 </sect2>
196 <sect2>
197 <title>Samba-3 as the Trusted Domain</title>
198
199 <para>
200 This time activities are somewhat reversed. Again, we'll assume that your domain
201 controlled by the Samba PDC is called SAMBA and NT-controlled domain is called RUMBA.
202 </para>
203
204 <para>
205 The very first thing requirement is to add an account for the SAMBA domain on RUMBA's PDC.
206 </para>
207
208 <para>
209 Launch the <application>Domain User Manager</application>, then from the menu select
210 <guimenu>Policies</guimenu>, <guimenuitem>Trust Relationships</guimenuitem>.
211 Now, next to <guilabel>Trusted Domains</guilabel> box press the <guibutton>Add</guibutton>
212 button, and type in the name of the trusted domain (SAMBA) and password securing
213 the relationship.
214 </para>
215
216 <para>
217 The password can be arbitrarily chosen. It is easy to change the password
218 from the Samba server whenever you want. After confirming the password your account is
219 ready for use. Now it's Samba's turn.
220 </para>
221
222 <para>
223 Using your favourite shell while being logged in as root, issue this command:
224 </para>
225
226 <para>
227 &rootprompt;<userinput>net rpc trustdom establish rumba</userinput>
228 </para>
229
230 <para>
231 You will be prompted for the password you just typed on your Windows NT4 Server box.
232 Do not worry if you see an error message that mentions a returned code of
233 <errorname>NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT</errorname>. It means the
234 password you gave is correct and the NT4 Server says the account is
235 ready for interdomain connection and not for ordinary
236 connection. After that, be patient it can take a while (especially
237 in large networks), you should see the <computeroutput>Success</computeroutput> message.
238 Congratulations! Your trust relationship has just been established.
239 </para>
240
241 <note><para>
242 Note that you have to run this command as root because you must have write access to
243 the <filename>secrets.tdb</filename> file.
244 </para></note>
245
246 </sect2>
247 </sect1>
248
249 <sect1>
250 <title>Common Errors</title>
251
252 <para>
253 Interdomain trust relationships should NOT be attempted on networks that are unstable
254 or that suffer regular outages. Network stability and integrity are key concerns with
255 distributed trusted domains.
256 </para>
257
258 </sect1>
259
260 </chapter>